diff mercurial/hgweb/webcommands.py @ 31665:c2dbd818e884

hgweb: handle "parity" internally in webutil.diffs() There's apparently no reason to have the "parity" of diff blocks that webutil.diffs() generates coming from outside the function. So have it internally managed. We thus now pass a "web" object to webutil.diffs() to get access to both "repo" and "stripecount" attribute.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Mon, 13 Mar 2017 10:40:19 +0100
parents abb92b3d370e
children f36dc643ffdc
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Mon Mar 27 09:44:36 2017 +0900
+++ b/mercurial/hgweb/webcommands.py	Mon Mar 13 10:40:19 2017 +0100
@@ -756,12 +756,11 @@
         ctx = fctx.changectx()
     basectx = ctx.p1()
 
-    parity = paritygen(web.stripecount)
     style = web.config('web', 'style', 'paper')
     if 'style' in req.form:
         style = req.form['style'][0]
 
-    diffs = webutil.diffs(web.repo, tmpl, ctx, basectx, [path], parity, style)
+    diffs = webutil.diffs(web, tmpl, ctx, basectx, [path], style)
     if fctx is not None:
         rename = webutil.renamelink(fctx)
         ctx = fctx