diff mercurial/hgweb/webcommands.py @ 34433:2e32c6a31cc7

annotate: introduce attr for storing per-line annotate data We're going to extend this a bit -- at first by simply adding whether this was a skipped child. We're well on our way to outgrowing tuples, though -- adding more and more fields to tuples becomes annoying very quickly. Differential Revision: https://phab.mercurial-scm.org/D898
author Siddharth Agarwal <sid0@fb.com>
date Mon, 02 Oct 2017 02:34:47 -0700
parents 407ebe7a9b93
children f12de15c5711
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Mon Oct 02 02:34:47 2017 -0700
+++ b/mercurial/hgweb/webcommands.py	Mon Oct 02 02:34:47 2017 -0700
@@ -906,7 +906,8 @@
 
         previousrev = None
         blockparitygen = paritygen(1)
-        for lineno, ((f, targetline), l) in enumerate(lines):
+        for lineno, (aline, l) in enumerate(lines):
+            f = aline.fctx
             rev = f.rev()
             if rev != previousrev:
                 blockhead = True
@@ -924,7 +925,7 @@
                    "file": f.path(),
                    "blockhead": blockhead,
                    "blockparity": blockparity,
-                   "targetline": targetline,
+                   "targetline": aline.lineno,
                    "line": l,
                    "lineno": lineno + 1,
                    "lineid": "l%d" % (lineno + 1),