Patchwork D5748: resolve: respect ui.relative-paths

login
register
mail settings
Submitter phabricator
Date Feb. 2, 2019, 2:11 a.m.
Message ID <a02fa58d494efad3a5429bc3d4373dbc@localhost.localdomain>
Download mbox | patch
Permalink /patch/38317/
State Not Applicable
Headers show

Comments

phabricator - Feb. 2, 2019, 2:11 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5ce3f5a445ea: resolve: respect ui.relative-paths (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5748?vs=13662&id=13692

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

AFFECTED FILES
  mercurial/commands.py
  tests/test-resolve.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -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)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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