changeset 41655:df59b1078983

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 11:56:39 -0800
parents f164076427b2
children dadbfcc63b3e
files mercurial/logcmdutil.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)