53
53
h = self._branch.get_history()
54
54
util.set_context(kw)
57
revid = h.fix_revid(args[0])
63
path = '/'.join(args[1:])
64
if not path.startswith('/'):
67
file_id = kw.get('file_id', None)
68
if (file_id is None) and (path is None):
69
raise HTTPError(400, 'No file_id or filename provided to annotate')
72
file_id = h.get_file_id(revid, path)
74
# no navbar for revisions
75
navigation = util.Container()
78
path = h.get_path(revid, file_id)
79
filename = os.path.basename(path)
82
'branch': self._branch,
89
'navigation': navigation,
90
'change': h.get_changes([ revid ])[0],
91
'contents': list(h.annotate_file(file_id, revid)),
94
self.log.info('/annotate: %r secs' % (time.time() - z,))
59
revid = h.fix_revid(args[0])
65
path = '/'.join(args[1:])
66
if not path.startswith('/'):
69
file_id = kw.get('file_id', None)
70
if (file_id is None) and (path is None):
71
raise HTTPError(400, 'No file_id or filename provided to annotate')
74
file_id = h.get_file_id(revid, path)
76
# no navbar for revisions
77
navigation = util.Container()
80
path = h.get_path(revid, file_id)
81
filename = os.path.basename(path)
84
'branch': self._branch,
91
'navigation': navigation,
92
'change': h.get_changes([ revid ])[0],
93
'contents': list(h.annotate_file(file_id, revid)),
96
self.log.info('/annotate: %r secs' % (time.time() - z,))