D5936: addremove: respect ui.relative-paths

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

D5936: addremove: respect ui.relative-paths

pulkit (Pulkit Goyal)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION 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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/commands.py
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1125,7 +1125,7 @@
     # TODO: We should probably have the caller pass in uipathfn and apply it to
     # the messages above too. forcerelativevalue=True is consistent with how
     # it used to work.
-    uipathfn = getuipathfn(repo, forcerelativevalue=True)
+    uipathfn = getuipathfn(repo, legacyrelativevalue=True)
     renames = _findrenames(repo, m, added + unknown, removed + deleted,
                            similarity, uipathfn)
 
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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
 
@@ -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)
 
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2398,7 +2398,7 @@
     with dsguard or util.nullcontextmanager():
         if dsguard:
             relative = scmutil.anypats(pats, opts)
-            uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+            uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
             if scmutil.addremove(repo, matcher, "", uipathfn, opts) != 0:
                 raise error.Abort(
                     _("failed to mark all new/missing files as added/removed"))
@@ -2478,7 +2478,7 @@
         # was specified.
         matcher = scmutil.match(wctx, pats, opts)
         relative = scmutil.anypats(pats, opts)
-        uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+        uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
         if (opts.get('addremove')
             and scmutil.addremove(repo, matcher, "", uipathfn, opts)):
             raise error.Abort(



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5936: addremove: respect ui.relative-paths

pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf44ab808eb91: addremove: respect ui.relative-paths (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5936?vs=14032&id=14059

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

AFFECTED FILES
  mercurial/cmdutil.py
  mercurial/commands.py
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1125,7 +1125,7 @@
     # TODO: We should probably have the caller pass in uipathfn and apply it to
     # the messages above too. forcerelativevalue=True is consistent with how
     # it used to work.
-    uipathfn = getuipathfn(repo, forcerelativevalue=True)
+    uipathfn = getuipathfn(repo, legacyrelativevalue=True)
     renames = _findrenames(repo, m, added + unknown, removed + deleted,
                            similarity, uipathfn)
 
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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
 
@@ -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)
 
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2401,7 +2401,7 @@
     with dsguard or util.nullcontextmanager():
         if dsguard:
             relative = scmutil.anypats(pats, opts)
-            uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+            uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
             if scmutil.addremove(repo, matcher, "", uipathfn, opts) != 0:
                 raise error.Abort(
                     _("failed to mark all new/missing files as added/removed"))
@@ -2481,7 +2481,7 @@
         # was specified.
         matcher = scmutil.match(wctx, pats, opts)
         relative = scmutil.anypats(pats, opts)
-        uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+        uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
         if (opts.get('addremove')
             and scmutil.addremove(repo, matcher, "", uipathfn, opts)):
             raise error.Abort(



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5936: addremove: respect ui.relative-paths

pulkit (Pulkit Goyal)
In reply to this post by pulkit (Pulkit Goyal)
martinvonz added a comment.


  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.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D5936: addremove: respect ui.relative-paths

pulkit (Pulkit Goyal)
In reply to this post by pulkit (Pulkit Goyal)
martinvonz added a comment.


  In https://phab.mercurial-scm.org/D5936#86976, @martinvonz wrote:
 
  > 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.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel