Patchwork D5910: automv: respect ui.relative-paths

login
register
mail settings
Submitter phabricator
Date Feb. 10, 2019, 3:40 a.m.
Message ID <e5a06d252a922c02e7148e3a7741f09e@localhost.localdomain>
Download mbox | patch
Permalink /patch/38635/
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 rHGf89aad980025: automv: respect ui.relative-paths (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5910?vs=13937&id=13992

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

AFFECTED FILES
  hgext/automv.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/automv.py b/hgext/automv.py
--- a/hgext/automv.py
+++ b/hgext/automv.py
@@ -64,7 +64,8 @@ 
         if threshold > 0:
             match = scmutil.match(repo[None], pats, opts)
             added, removed = _interestingfiles(repo, match)
-            renames = _findrenames(repo, match, added, removed,
+            uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
+            renames = _findrenames(repo, uipathfn, added, removed,
                                    threshold / 100.0)
 
     with repo.wlock():
@@ -89,7 +90,7 @@ 
 
     return added, removed
 
-def _findrenames(repo, matcher, added, removed, similarity):
+def _findrenames(repo, uipathfn, added, removed, similarity):
     """Find what files in added are really moved files.
 
     Any file named in removed that is at least similarity% similar to a file
@@ -103,7 +104,7 @@ 
             if repo.ui.verbose:
                 repo.ui.status(
                     _('detected move of %s as %s (%d%% similar)\n') % (
-                        matcher.rel(src), matcher.rel(dst), score * 100))
+                        uipathfn(src), uipathfn(dst), score * 100))
             renames[dst] = src
     if renames:
         repo.ui.status(_('detected move of %d files\n') % len(renames))