resolve: respect ui.relative-paths
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 29 Jan 2019 12:01:13 -0800
changeset 41511 72a9aacff645
parent 41510 faa49a5914bb
child 41512 16454d938299
resolve: respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D5748
mercurial/commands.py
tests/test-resolve.t
--- a/mercurial/commands.py	Wed Jan 30 12:05:43 2019 -0800
+++ b/mercurial/commands.py	Tue Jan 29 12:01:13 2019 -0800
@@ -4840,6 +4840,8 @@
                                  b'$$ &Yes $$ &No')):
                 raise error.Abort(_('user quit'))
 
+    uipathfn = scmutil.getuipathfn(repo)
+
     if show:
         ui.pager('resolve')
         fm = ui.formatter('resolve', opts)
@@ -4867,7 +4869,8 @@
             fm.startitem()
             fm.context(ctx=wctx)
             fm.condwrite(not nostatus, 'mergestatus', '%s ', key, label=label)
-            fm.write('path', '%s\n', f, label=label)
+            fm.data(path=f)
+            fm.plain('%s\n' % uipathfn(f), label=label)
         fm.end()
         return 0
 
--- a/tests/test-resolve.t	Wed Jan 30 12:05:43 2019 -0800
+++ b/tests/test-resolve.t	Tue Jan 29 12:01:13 2019 -0800
@@ -67,6 +67,9 @@
   $ hg resolve -l
   R file1
   U file2
+  $ hg resolve -l --config ui.relative-paths=yes
+  R ../file1
+  U ../file2
   $ hg resolve --re-merge filez file2
   arguments do not match paths that need resolving
   (try: hg resolve --re-merge path:filez path:file2)