# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1527082300 -7200 # Wed May 23 15:31:40 2018 +0200 # Node ID e6ba698b9c7354f21e2ae764a11e043872990d79 # Parent ba68e0459f1fc2d1d86496c4ae42ab99adf08d11 # EXP-Topic diff-cleanup # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r e6ba698b9c73 context: also take all other arguments than `patch.diff` accept
This is needed to use `context.diff` as a full replacement of `patch.diff` diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -294,14 +294,19 @@ class basectx(object): auditor=r.nofsauditor, ctx=self, listsubrepos=listsubrepos, badfn=badfn) - def diff(self, ctx2=None, match=None, opts=None): + def diff(self, ctx2=None, match=None, changes=None, opts=None, + losedatafn=None, prefix='', relroot='', copy=None, + hunksfilterfn=None): """Returns a diff generator for the given contexts and matcher""" if ctx2 is None: ctx2 = self.p1() if ctx2 is not None: ctx2 = self._repo[ctx2] diffopts = patch.diffopts(self._repo.ui, opts) - return patch.diff(self._repo, ctx2, self, match=match, opts=diffopts) + return patch.diff(self._repo, ctx2, self, match=match, changes=changes, + opts=diffopts, losedatafn=losedatafn, prefix=prefix, + relroot=relroot, copy=copy, + hunksfilterfn=hunksfilterfn) def dirs(self): return self._manifest.dirs() _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel