Mercurial > public > mercurial-scm > hg
diff mercurial/logcmdutil.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 | 035cae1d197f |
children | 3d094bfaf885 |
line wrap: on
line diff
--- a/mercurial/logcmdutil.py Wed Feb 06 17:46:20 2019 -0800 +++ b/mercurial/logcmdutil.py Wed Feb 06 22:52:49 2019 -0800 @@ -64,6 +64,7 @@ relroot = pathutil.canonpath(repo.root, repo.getcwd(), root) else: relroot = '' + copysourcematch = None if relroot != '': # XXX relative roots currently don't work if the root is within a # subrepo @@ -76,6 +77,7 @@ relrootmatch = scmutil.match(ctx2, pats=[relroot], default='path') match = matchmod.intersectmatchers(match, relrootmatch) + copysourcematch = relrootmatch if stat: diffopts = diffopts.copy(context=0, noprefix=False) @@ -84,7 +86,8 @@ width = ui.termwidth() - graphwidth chunks = ctx2.diff(ctx1, match, changes, opts=diffopts, prefix=prefix, - relroot=relroot, hunksfilterfn=hunksfilterfn) + relroot=relroot, copysourcematch=copysourcematch, + hunksfilterfn=hunksfilterfn) if fp is not None or ui.canwritewithoutlabels(): out = fp or ui