Mercurial > hg
changeset 38520:02633fe3883a
context: also take all other arguments than `patch.diff` accept
This is needed to use `context.diff` as a full replacement of `patch.diff`
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 23 May 2018 15:31:40 +0200 |
parents | 4455e5d4d59c |
children | c1a7bbf9984d |
files | mercurial/context.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Tue May 22 15:02:52 2018 +0200 +++ b/mercurial/context.py Wed May 23 15:31:40 2018 +0200 @@ -294,14 +294,19 @@ 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()