Make annotate use linkrev instead of rev
authorBrendan Cully <brendan@kublai.com>
Sun, 15 Oct 2006 17:38:07 -0700
changeset 3401 a004164dbeef
parent 3400 d8eba1c3ce9b
child 3402 372999405787
Make annotate use linkrev instead of rev
mercurial/commands.py
mercurial/hgweb/hgweb_mod.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -628,7 +628,7 @@ def annotate(ui, repo, *pats, **opts):
         raise util.Abort(_('at least one file name or pattern required'))
 
     opmap = [['user', lambda x: ui.shortuser(x.user())],
-             ['number', lambda x: str(x.rev())],
+             ['number', lambda x: str(x.linkrev())],
              ['changeset', lambda x: short(x.node())],
              ['date', getdate], ['follow', lambda x: x.path()]]
     if (not opts['user'] and not opts['changeset'] and not opts['date']
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -385,7 +385,7 @@ class hgweb(object):
 
                 yield {"parity": parity,
                        "node": hex(f.node()),
-                       "rev": f.rev(),
+                       "rev": f.linkrev(),
                        "author": name,
                        "file": f.path(),
                        "line": l}