Commit 2a729b5a authored by Yuya Nishihara's avatar Yuya Nishihara

compat: adapt to new naming of annotate template keywords

parent d1096e703b61
......@@ -1118,12 +1118,16 @@ class _AnnotateViewControl(_AbstractViewControl):
links = []
fctxcache = {} # (path, rev): fctx
for l in data[0]['lines']:
path, rev = l['file'], l['rev']
try:
path, rev, lineno = l['path'], l['rev'], l['lineno']
except KeyError:
# hg<4.8 (34ba47117164, 47cb6750dea3)
path, rev, lineno = l['file'], l['rev'], l['line_number']
try:
fctx = fctxcache[path, rev]
except KeyError:
fctx = fctxcache[path, rev] = repo[rev][path]
links.append((fctx, l['line_number']))
links.append((fctx, lineno))
self._links = links
self._updateView()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment