--- a/mercurial/hgweb/webutil.py Fri Mar 03 17:20:11 2017 +0100
+++ b/mercurial/hgweb/webutil.py Mon Mar 06 09:44:39 2017 +0100
@@ -420,8 +420,8 @@
blockcount = countgen()
def prettyprintlines(diff, blockno):
- for lineno, l in enumerate(diff.splitlines(True)):
- difflineno = "%d.%d" % (blockno, lineno + 1)
+ for lineno, l in enumerate(diff.splitlines(True), 1):
+ difflineno = "%d.%d" % (blockno, lineno)
if l.startswith('+'):
ltype = "difflineplus"
elif l.startswith('-'):
@@ -432,7 +432,7 @@
ltype = "diffline"
yield tmpl(ltype,
line=l,
- lineno=lineno + 1,
+ lineno=lineno,
lineid="l%s" % difflineno,
linenumber="% 8s" % difflineno)