Page MenuHomePhabricator

addremove: respect ui.relative-paths
ClosedPublic

Authored by martinvonz on Feb 11 2019, 12:50 PM.

Details

Summary

I previously changed these code paths while trying to not change any
behavior to avoid inconsistencies between them in the intermediate
commits. They're now all ready to be switched over to respecting
ui.relative-paths.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Feb 11 2019, 12:50 PM
This revision was automatically updated to reflect the committed changes.

Ironic given the subject line that I missed this hunk:

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -256,7 +256,7 @@ def addremove(ui, repo, *pats, **opts):
         opts['similarity'] = '100'
     matcher = scmutil.match(repo[None], pats, opts)
     relative = scmutil.anypats(pats, opts)
-    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
     return scmutil.addremove(repo, matcher, "", uipathfn, opts)
 
 @command('annotate|blame',

I'll fold that in in flight since the commit is not yet public.

Ironic given the subject line that I missed this hunk:

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -256,7 +256,7 @@ def addremove(ui, repo, *pats, **opts):
         opts['similarity'] = '100'
     matcher = scmutil.match(repo[None], pats, opts)
     relative = scmutil.anypats(pats, opts)
-    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
     return scmutil.addremove(repo, matcher, "", uipathfn, opts)
 @command('annotate|blame',

I'll fold that in in flight since the commit is not yet public.

Hmm, the same thing for hg forget. I'll fix that too if people don't mind.