Show More
@@ -756,12 +756,11 b' def filediff(web, req, tmpl):' | |||||
756 | ctx = fctx.changectx() |
|
756 | ctx = fctx.changectx() | |
757 | basectx = ctx.p1() |
|
757 | basectx = ctx.p1() | |
758 |
|
758 | |||
759 | parity = paritygen(web.stripecount) |
|
|||
760 | style = web.config('web', 'style', 'paper') |
|
759 | style = web.config('web', 'style', 'paper') | |
761 | if 'style' in req.form: |
|
760 | if 'style' in req.form: | |
762 | style = req.form['style'][0] |
|
761 | style = req.form['style'][0] | |
763 |
|
762 | |||
764 |
diffs = webutil.diffs(web |
|
763 | diffs = webutil.diffs(web, tmpl, ctx, basectx, [path], style) | |
765 | if fctx is not None: |
|
764 | if fctx is not None: | |
766 | rename = webutil.renamelink(fctx) |
|
765 | rename = webutil.renamelink(fctx) | |
767 | ctx = fctx |
|
766 | ctx = fctx |
@@ -388,8 +388,7 b' def changesetentry(web, req, tmpl, ctx):' | |||||
388 | if 'style' in req.form: |
|
388 | if 'style' in req.form: | |
389 | style = req.form['style'][0] |
|
389 | style = req.form['style'][0] | |
390 |
|
390 | |||
391 | parity = paritygen(web.stripecount) |
|
391 | diff = diffs(web, tmpl, ctx, basectx, None, style) | |
392 | diff = diffs(web.repo, tmpl, ctx, basectx, None, parity, style) |
|
|||
393 |
|
392 | |||
394 | parity = paritygen(web.stripecount) |
|
393 | parity = paritygen(web.stripecount) | |
395 | diffstatsgen = diffstatgen(ctx, basectx) |
|
394 | diffstatsgen = diffstatgen(ctx, basectx) | |
@@ -414,7 +413,7 b' def listfilediffs(tmpl, files, node, max' | |||||
414 | if len(files) > max: |
|
413 | if len(files) > max: | |
415 | yield tmpl('fileellipses') |
|
414 | yield tmpl('fileellipses') | |
416 |
|
415 | |||
417 |
def diffs( |
|
416 | def diffs(web, tmpl, ctx, basectx, files, style): | |
418 |
|
417 | |||
419 | def prettyprintlines(lines, blockno): |
|
418 | def prettyprintlines(lines, blockno): | |
420 | for lineno, l in enumerate(lines, 1): |
|
419 | for lineno, l in enumerate(lines, 1): | |
@@ -433,6 +432,7 b' def diffs(repo, tmpl, ctx, basectx, file' | |||||
433 | lineid="l%s" % difflineno, |
|
432 | lineid="l%s" % difflineno, | |
434 | linenumber="% 8s" % difflineno) |
|
433 | linenumber="% 8s" % difflineno) | |
435 |
|
434 | |||
|
435 | repo = web.repo | |||
436 | if files: |
|
436 | if files: | |
437 | m = match.exact(repo.root, repo.getcwd(), files) |
|
437 | m = match.exact(repo.root, repo.getcwd(), files) | |
438 | else: |
|
438 | else: | |
@@ -441,6 +441,7 b' def diffs(repo, tmpl, ctx, basectx, file' | |||||
441 | diffopts = patch.diffopts(repo.ui, untrusted=True) |
|
441 | diffopts = patch.diffopts(repo.ui, untrusted=True) | |
442 | node1 = basectx.node() |
|
442 | node1 = basectx.node() | |
443 | node2 = ctx.node() |
|
443 | node2 = ctx.node() | |
|
444 | parity = paritygen(web.stripecount) | |||
444 |
|
445 | |||
445 | diffhunks = patch.diffhunks(repo, node1, node2, m, opts=diffopts) |
|
446 | diffhunks = patch.diffhunks(repo, node1, node2, m, opts=diffopts) | |
446 | for blockno, (header, hunks) in enumerate(diffhunks, 1): |
|
447 | for blockno, (header, hunks) in enumerate(diffhunks, 1): |
General Comments 0
You need to be logged in to leave comments.
Login now