Patchwork D5905: diff: respect ui.relative-paths for warning about path outside --root

login
register
mail settings
Submitter phabricator
Date Feb. 10, 2019, 3:40 a.m.
Message ID <aabb2783fcbb293256ede0daffea09cc@localhost.localdomain>
Download mbox | patch
Permalink /patch/38630/
State Not Applicable
Headers show

Comments

phabricator - Feb. 10, 2019, 3:40 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdf59b1078983: diff: respect ui.relative-paths for warning about path outside --root (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5905?vs=13930&id=13987

REVISION DETAIL
  https://phab.mercurial-scm.org/D5905

AFFECTED FILES
  mercurial/logcmdutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/logcmdutil.py b/mercurial/logcmdutil.py
--- a/mercurial/logcmdutil.py
+++ b/mercurial/logcmdutil.py
@@ -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)