--- a/mercurial/logcmdutil.py Wed Feb 06 23:12:56 2019 -0800
+++ b/mercurial/logcmdutil.py Wed Feb 06 23:56:59 2019 -0800
@@ -66,6 +66,8 @@
else:
relroot = ''
copysourcematch = None
+ def compose(f, g):
+ return lambda x: f(g(x))
def pathfn(f):
return posixpath.join(prefix, f)
if relroot != '':
@@ -84,11 +86,12 @@
checkroot = (repo.ui.configbool('devel', 'all-warnings') or
repo.ui.configbool('devel', 'check-relroot'))
- def pathfn(f):
+ def relrootpathfn(f):
if checkroot and not f.startswith(relroot):
raise AssertionError(
"file %s doesn't start with relroot %s" % (f, relroot))
- return posixpath.join(prefix, f[len(relroot):])
+ return f[len(relroot):]
+ pathfn = compose(relrootpathfn, pathfn)
if stat:
diffopts = diffopts.copy(context=0, noprefix=False)