##// END OF EJS Templates
hgweb: start enumerate at 1 in webutil.diffs's inner function prettyprintlines
Denis Laxalde -
r31275:e2f14104 default
parent child Browse files
Show More
@@ -420,8 +420,8 b' def diffs(repo, tmpl, ctx, basectx, file'
420
420
421 blockcount = countgen()
421 blockcount = countgen()
422 def prettyprintlines(diff, blockno):
422 def prettyprintlines(diff, blockno):
423 for lineno, l in enumerate(diff.splitlines(True)):
423 for lineno, l in enumerate(diff.splitlines(True), 1):
424 difflineno = "%d.%d" % (blockno, lineno + 1)
424 difflineno = "%d.%d" % (blockno, lineno)
425 if l.startswith('+'):
425 if l.startswith('+'):
426 ltype = "difflineplus"
426 ltype = "difflineplus"
427 elif l.startswith('-'):
427 elif l.startswith('-'):
@@ -432,7 +432,7 b' def diffs(repo, tmpl, ctx, basectx, file'
432 ltype = "diffline"
432 ltype = "diffline"
433 yield tmpl(ltype,
433 yield tmpl(ltype,
434 line=l,
434 line=l,
435 lineno=lineno + 1,
435 lineno=lineno,
436 lineid="l%s" % difflineno,
436 lineid="l%s" % difflineno,
437 linenumber="% 8s" % difflineno)
437 linenumber="% 8s" % difflineno)
438
438
General Comments 0
You need to be logged in to leave comments. Login now