Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/hgweb_mod.py @ 6125:74406f50bd46
Make hgweb annotate link to target line numbers (issue623)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 15 Feb 2008 21:34:16 +0100 |
parents | f7f25f58693a |
children | 50a277e6ceae |
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py Fri Feb 15 20:06:47 2008 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Fri Feb 15 21:34:16 2008 +0100 @@ -636,7 +636,8 @@ def annotate(**map): last = None - for lineno, (f, l) in enumerate(fctx.annotate(follow=True)): + lines = enumerate(fctx.annotate(follow=True, linenumber=True)) + for lineno, ((f, targetline), l) in lines: fnode = f.filenode() name = self.repo.ui.shortuser(f.user()) @@ -648,6 +649,7 @@ "rev": f.rev(), "author": name, "file": f.path(), + "targetline": targetline, "line": l, "lineid": "l%d" % (lineno + 1), "linenumber": "% 6d" % (lineno + 1)}