Patchwork D5875: locate: respect ui.relative-paths

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

Comments

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5875?vs=13868&id=13884

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3683,11 +3683,12 @@ 
         filesgen = sorted(repo.dirstate.matches(m))
     else:
         filesgen = ctx.matches(m)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=bool(pats))
     for abs in filesgen:
         if opts.get('fullpath'):
             ui.write(repo.wjoin(abs), end)
         else:
-            ui.write(((pats and m.rel(abs)) or abs), end)
+            ui.write(uipathfn(abs), end)
         ret = 0
 
     return ret