diff mercurial/cmdutil.py @ 41668:e41449818bee

copy: respect ui.relative-paths in copy/rename Differential Revision: https://phab.mercurial-scm.org/D5907
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 13:00:05 -0800
parents 16a49c778bde
children 05433ad59c52
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Feb 08 12:00:44 2019 -0800
+++ b/mercurial/cmdutil.py	Fri Feb 08 13:00:05 2019 -0800
@@ -1135,6 +1135,7 @@
     dryrun = opts.get("dry_run")
     wctx = repo[None]
 
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
     def walkpat(pat):
         srcs = []
         if after:
@@ -1144,7 +1145,7 @@
         m = scmutil.match(wctx, [pat], opts, globbed=True)
         for abs in wctx.walk(m):
             state = repo.dirstate[abs]
-            rel = m.rel(abs)
+            rel = uipathfn(abs)
             exact = m.exact(abs)
             if state in badstates:
                 if exact and state == '?':