Show More
@@ -434,7 +434,7 b' def listfilediffs(tmpl, files, node, max' | |||||
434 | if len(files) > max: |
|
434 | if len(files) > max: | |
435 | yield tmpl('fileellipses') |
|
435 | yield tmpl('fileellipses') | |
436 |
|
436 | |||
437 | def diffs(web, tmpl, ctx, basectx, files, style): |
|
437 | def diffs(web, tmpl, ctx, basectx, files, style, linerange=None): | |
438 |
|
438 | |||
439 | def prettyprintlines(lines, blockno): |
|
439 | def prettyprintlines(lines, blockno): | |
440 | for lineno, l in enumerate(lines, 1): |
|
440 | for lineno, l in enumerate(lines, 1): | |
@@ -470,6 +470,11 b' def diffs(web, tmpl, ctx, basectx, files' | |||||
470 | header = header[1:] |
|
470 | header = header[1:] | |
471 | lines = [h + '\n' for h in header] |
|
471 | lines = [h + '\n' for h in header] | |
472 | for hunkrange, hunklines in hunks: |
|
472 | for hunkrange, hunklines in hunks: | |
|
473 | if linerange is not None and hunkrange is not None: | |||
|
474 | s1, l1, s2, l2 = hunkrange | |||
|
475 | lb, ub = linerange | |||
|
476 | if not (lb <= s2 < ub or lb < s2 + l2 <= ub): | |||
|
477 | continue | |||
473 | lines.extend(hunklines) |
|
478 | lines.extend(hunklines) | |
474 | if lines: |
|
479 | if lines: | |
475 | yield tmpl('diffblock', parity=next(parity), blockno=blockno, |
|
480 | yield tmpl('diffblock', parity=next(parity), blockno=blockno, |
General Comments 0
You need to be logged in to leave comments.
Login now