comparison mercurial/context.py @ 41620:74f53d3bd685

patch: accept second matcher that applies only to copy sources (API) See previous patch for motivation. Differential Revision: https://phab.mercurial-scm.org/D5893
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 06 Feb 2019 22:52:49 -0800
parents fbd4ce55bcbd
children d4c9eebdd72d
comparison
equal deleted inserted replaced
41619:035cae1d197f 41620:74f53d3bd685
293 auditor=r.nofsauditor, ctx=self, 293 auditor=r.nofsauditor, ctx=self,
294 listsubrepos=listsubrepos, badfn=badfn) 294 listsubrepos=listsubrepos, badfn=badfn)
295 295
296 def diff(self, ctx2=None, match=None, changes=None, opts=None, 296 def diff(self, ctx2=None, match=None, changes=None, opts=None,
297 losedatafn=None, prefix='', relroot='', copy=None, 297 losedatafn=None, prefix='', relroot='', copy=None,
298 hunksfilterfn=None): 298 copysourcematch=None, hunksfilterfn=None):
299 """Returns a diff generator for the given contexts and matcher""" 299 """Returns a diff generator for the given contexts and matcher"""
300 if ctx2 is None: 300 if ctx2 is None:
301 ctx2 = self.p1() 301 ctx2 = self.p1()
302 if ctx2 is not None: 302 if ctx2 is not None:
303 ctx2 = self._repo[ctx2] 303 ctx2 = self._repo[ctx2]
304 return patch.diff(self._repo, ctx2, self, match=match, changes=changes, 304 return patch.diff(self._repo, ctx2, self, match=match, changes=changes,
305 opts=opts, losedatafn=losedatafn, prefix=prefix, 305 opts=opts, losedatafn=losedatafn, prefix=prefix,
306 relroot=relroot, copy=copy, 306 relroot=relroot, copy=copy,
307 copysourcematch=copysourcematch,
307 hunksfilterfn=hunksfilterfn) 308 hunksfilterfn=hunksfilterfn)
308 309
309 def dirs(self): 310 def dirs(self):
310 return self._manifest.dirs() 311 return self._manifest.dirs()
311 312