53
53
h = self._branch.get_history()
54
54
util.set_context(kw)
57
revid = h.fix_revid(args[0])
62
path = '/'.join(args[1:])
63
if not path.startswith('/'):
66
file_id = kw.get('file_id', None)
67
if (file_id is None) and (path is None):
68
raise HTTPError(400, 'No file_id or filename provided to annotate')
71
file_id = h.get_file_id(revid, path)
74
revid_list, revid = h.get_file_view(revid, file_id)
76
self.log.exception('Exception fetching changes')
77
raise InternalError('Could not fetch changes')
79
# no navbar for revisions
80
navigation = util.Container()
83
path = h.get_path(revid, file_id)
84
filename = os.path.basename(path)
87
'branch': self._branch,
94
'navigation': navigation,
95
'change': h.get_changes([ revid ])[0],
96
'contents': list(h.annotate_file(file_id, revid)),
99
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,))