##// END OF EJS Templates
hgweb: explictly pass basectx in webutil.diffs...
Denis Laxalde -
r31082:abb92b3d default
parent child Browse files
Show More
@@ -754,13 +754,14 b' def filediff(web, req, tmpl):'
754 if fctx is not None:
754 if fctx is not None:
755 path = fctx.path()
755 path = fctx.path()
756 ctx = fctx.changectx()
756 ctx = fctx.changectx()
757 basectx = ctx.p1()
757
758
758 parity = paritygen(web.stripecount)
759 parity = paritygen(web.stripecount)
759 style = web.config('web', 'style', 'paper')
760 style = web.config('web', 'style', 'paper')
760 if 'style' in req.form:
761 if 'style' in req.form:
761 style = req.form['style'][0]
762 style = req.form['style'][0]
762
763
763 diffs = webutil.diffs(web.repo, tmpl, ctx, None, [path], parity, style)
764 diffs = webutil.diffs(web.repo, tmpl, ctx, basectx, [path], parity, style)
764 if fctx is not None:
765 if fctx is not None:
765 rename = webutil.renamelink(fctx)
766 rename = webutil.renamelink(fctx)
766 ctx = fctx
767 ctx = fctx
@@ -442,14 +442,7 b' def diffs(repo, tmpl, ctx, basectx, file'
442 m = match.always(repo.root, repo.getcwd())
442 m = match.always(repo.root, repo.getcwd())
443
443
444 diffopts = patch.diffopts(repo.ui, untrusted=True)
444 diffopts = patch.diffopts(repo.ui, untrusted=True)
445 if basectx is None:
445 node1 = basectx.node()
446 parents = ctx.parents()
447 if parents:
448 node1 = parents[0].node()
449 else:
450 node1 = nullid
451 else:
452 node1 = basectx.node()
453 node2 = ctx.node()
446 node2 = ctx.node()
454
447
455 block = []
448 block = []
General Comments 0
You need to be logged in to leave comments. Login now