Show More
@@ -519,7 +519,7 b' def listfilediffs(files, node, max):' | |||||
519 | return templateutil.mappedgenerator(_listfilediffsgen, |
|
519 | return templateutil.mappedgenerator(_listfilediffsgen, | |
520 | args=(files, node, max)) |
|
520 | args=(files, node, max)) | |
521 |
|
521 | |||
522 |
def _prettyprintdifflines(context |
|
522 | def _prettyprintdifflines(context, lines, blockno, lineidprefix): | |
523 | for lineno, l in enumerate(lines, 1): |
|
523 | for lineno, l in enumerate(lines, 1): | |
524 | difflineno = "%d.%d" % (blockno, lineno) |
|
524 | difflineno = "%d.%d" % (blockno, lineno) | |
525 | if l.startswith('+'): |
|
525 | if l.startswith('+'): | |
@@ -530,7 +530,7 b' def _prettyprintdifflines(context, tmpl,' | |||||
530 | ltype = "difflineat" |
|
530 | ltype = "difflineat" | |
531 | else: |
|
531 | else: | |
532 | ltype = "diffline" |
|
532 | ltype = "diffline" | |
533 |
yield |
|
533 | yield context.process(ltype, { | |
534 | 'line': l, |
|
534 | 'line': l, | |
535 | 'lineno': lineno, |
|
535 | 'lineno': lineno, | |
536 | 'lineid': lineidprefix + "l%s" % difflineno, |
|
536 | 'lineid': lineidprefix + "l%s" % difflineno, | |
@@ -563,7 +563,7 b' def diffs(web, ctx, basectx, files, styl' | |||||
563 | lines.extend(hunklines) |
|
563 | lines.extend(hunklines) | |
564 | if lines: |
|
564 | if lines: | |
565 | l = templateutil.mappedgenerator(_prettyprintdifflines, |
|
565 | l = templateutil.mappedgenerator(_prettyprintdifflines, | |
566 |
args=( |
|
566 | args=(lines, blockno, | |
567 | lineidprefix)) |
|
567 | lineidprefix)) | |
568 | yield web.tmpl.generate('diffblock', { |
|
568 | yield web.tmpl.generate('diffblock', { | |
569 | 'parity': next(parity), |
|
569 | 'parity': next(parity), |
General Comments 0
You need to be logged in to leave comments.
Login now