diff -r 035cae1d197f -r 74f53d3bd685 mercurial/logcmdutil.py --- 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