diff mercurial/commands.py @ 41685:b81ecf3571d5

addremove: respect ui.relative-paths 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. Differential Revision: https://phab.mercurial-scm.org/D5936
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 11 Feb 2019 09:40:24 -0800
parents 16a49c778bde
children 935e06e95b91
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Feb 11 09:12:23 2019 -0800
+++ b/mercurial/commands.py	Mon Feb 11 09:40:24 2019 -0800
@@ -180,7 +180,7 @@
     """
 
     m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts))
-    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
     rejected = cmdutil.add(ui, repo, m, "", uipathfn, False, **opts)
     return rejected and 1 or 0
 
@@ -256,7 +256,7 @@
         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',
@@ -2258,7 +2258,7 @@
 
     m = scmutil.match(repo[None], pats, opts)
     dryrun, interactive = opts.get('dry_run'), opts.get('interactive')
-    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
     rejected = cmdutil.forget(ui, repo, m, prefix="", uipathfn=uipathfn,
                               explicitonly=False, dryrun=dryrun,
                               interactive=interactive)[0]
@@ -4720,7 +4720,7 @@
 
     m = scmutil.match(repo[None], pats, opts)
     subrepos = opts.get('subrepos')
-    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
+    uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
     return cmdutil.remove(ui, repo, m, "", uipathfn, after, force, subrepos,
                           dryrun=dryrun)