diff mercurial/hgweb/hgweb_mod.py @ 3181:fc379b91f602

hgweb: make annotate line revisions point to annotation for that rev
author Brendan Cully <brendan@kublai.com>
date Wed, 27 Sep 2006 09:10:31 -0700
parents 3466bd7b9754
children 8683c7a637ad
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Wed Sep 27 09:10:29 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Sep 27 09:10:31 2006 -0700
@@ -398,16 +398,16 @@
         def annotate(**map):
             parity = 0
             last = None
-            for f, l in fctx.annotate():
-                cnode = f.node()
+            for f, l in fctx.annotate(follow=True):
+                fnode = f.filenode()
                 name = self.repo.ui.shortuser(f.user())
 
-                if last != cnode:
+                if last != fnode:
                     parity = 1 - parity
-                    last = cnode
+                    last = fnode
 
                 yield {"parity": parity,
-                       "node": hex(cnode),
+                       "node": hex(fnode),
                        "rev": f.rev(),
                        "author": name,
                        "file": f.path(),