narrow: make warning about possibly dirty files respect ui.relative-paths
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 18 Apr 2019 03:05:42 +0530
changeset 42150 770f5f586ae5
parent 42145 607a0de9bae3
child 42151 7116fc614cfc
narrow: make warning about possibly dirty files respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D6264
mercurial/narrowspec.py
--- a/mercurial/narrowspec.py	Tue Apr 16 15:50:20 2019 +0200
+++ b/mercurial/narrowspec.py	Thu Apr 18 03:05:42 2019 +0530
@@ -15,6 +15,7 @@
     match as matchmod,
     merge,
     repository,
+    scmutil,
     sparse,
     util,
 )
@@ -302,8 +303,9 @@
     else:
         trackeddirty.extend(lookup)
     _deletecleanfiles(repo, clean)
+    uipathfn = scmutil.getuipathfn(repo)
     for f in sorted(trackeddirty):
-        repo.ui.status(_('not deleting possibly dirty file %s\n') % f)
+        repo.ui.status(_('not deleting possibly dirty file %s\n') % uipathfn(f))
     for f in clean + trackeddirty:
         ds.drop(f)