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