# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1529757778 -7200 # Sat Jun 23 14:42:58 2018 +0200 # Node ID d2d2b80cc405fdb1e93c257e7290851069040ca8 # Parent 6f1fd2975f98351086353b56ff4e9dfb54421648 # EXP-Topic diff-cleanup # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r d2d2b80cc405 webutil: pass a diffopts object to context.diff
diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -41,6 +41,7 @@ from .. import ( ) from ..utils import ( + diffutil, stringutil, ) @@ -206,8 +207,8 @@ def _siblings(siblings=None, hiderev=Non return templateutil.mappinggenerator(_ctxsgen, args=(siblings,)) def difffeatureopts(req, ui, section): - diffopts = patch.difffeatureopts(ui, untrusted=True, - section=section, whitespace=True) + diffopts = diffutil.difffeatureopts(ui, untrusted=True, + section=section, whitespace=True) for k in ('ignorews', 'ignorewsamount', 'ignorewseol', 'ignoreblanklines'): v = req.qsparams.get(k) @@ -657,8 +658,9 @@ def compare(contextnum, leftlines, right def diffstatgen(ctx, basectx): '''Generator function that provides the diffstat data.''' + diffopts = patch.diffopts(ctx._repo.ui, {'noprefix': False}) stats = patch.diffstatdata( - util.iterlines(ctx.diff(basectx, opts={'noprefix': False}))) + util.iterlines(ctx.diff(basectx, opts=diffopts))) maxname, maxtotal, addtotal, removetotal, binary = patch.diffstatsum(stats) while True: yield stats, maxname, maxtotal, addtotal, removetotal, binary _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel