# HG changeset patch # User Martin von Zweigbergk # Date 1549655799 28800 # Node ID df59b10789832554ab24e395d1703d021faa244f # Parent f164076427b2288accf1a8f7a492b4e1d02865ab diff: respect ui.relative-paths for warning about path outside --root I set legacyrelativevalue=True rather than being based on what patterns the user passed (as the current match.uipath() does). I think it simply doesn't really matter for this message (there are not even any tests for it). Differential Revision: https://phab.mercurial-scm.org/D5905 diff -r f164076427b2 -r df59b1078983 mercurial/logcmdutil.py --- a/mercurial/logcmdutil.py Thu Feb 07 23:29:14 2019 -0800 +++ b/mercurial/logcmdutil.py Fri Feb 08 11:56:39 2019 -0800 @@ -73,12 +73,13 @@ if relroot != '': # XXX relative roots currently don't work if the root is within a # subrepo - uirelroot = match.uipath(relroot) + uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) + uirelroot = uipathfn(pathfn(relroot)) relroot += '/' for matchroot in match.files(): if not matchroot.startswith(relroot): - ui.warn(_('warning: %s not inside relative root %s\n') % ( - match.uipath(matchroot), uirelroot)) + ui.warn(_('warning: %s not inside relative root %s\n') % + (uipathfn(pathfn(matchroot)), uirelroot)) relrootmatch = scmutil.match(ctx2, pats=[relroot], default='path') match = matchmod.intersectmatchers(match, relrootmatch)