D5898: debugignore: 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
|

D5898: debugignore: respect ui.relative-paths

jeffpc (Jeff Sipek)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Not because I care about this, but I want to get rid of match.uipath()
  and it's easier to respect the config than not.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1086,6 +1086,7 @@
         ui.write("%s\n" % pycompat.byterepr(ignore))
     else:
         m = scmutil.match(repo[None], pats=files)
+        uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
         for f in m.files():
             nf = util.normpath(f)
             ignored = None
@@ -1102,16 +1103,16 @@
                             break
             if ignored:
                 if ignored == nf:
-                    ui.write(_("%s is ignored\n") % m.uipath(f))
+                    ui.write(_("%s is ignored\n") % uipathfn(f))
                 else:
                     ui.write(_("%s is ignored because of "
                                "containing folder %s\n")
-                             % (m.uipath(f), ignored))
+                             % (uipathfn(f), ignored))
                 ignorefile, lineno, line = ignoredata
                 ui.write(_("(ignore rule in %s, line %d: '%s')\n")
                          % (ignorefile, lineno, line))
             else:
-                ui.write(_("%s is not ignored\n") % m.uipath(f))
+                ui.write(_("%s is not ignored\n") % uipathfn(f))
 
 @command('debugindex', cmdutil.debugrevlogopts + cmdutil.formatteropts,
          _('-c|-m|FILE'))



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
|

D5898: debugignore: respect ui.relative-paths

jeffpc (Jeff Sipek)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbe8741d42836: debugignore: respect ui.relative-paths (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5898?vs=13918&id=13966

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

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1086,6 +1086,7 @@
         ui.write("%s\n" % pycompat.byterepr(ignore))
     else:
         m = scmutil.match(repo[None], pats=files)
+        uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
         for f in m.files():
             nf = util.normpath(f)
             ignored = None
@@ -1102,16 +1103,16 @@
                             break
             if ignored:
                 if ignored == nf:
-                    ui.write(_("%s is ignored\n") % m.uipath(f))
+                    ui.write(_("%s is ignored\n") % uipathfn(f))
                 else:
                     ui.write(_("%s is ignored because of "
                                "containing folder %s\n")
-                             % (m.uipath(f), ignored))
+                             % (uipathfn(f), ignored))
                 ignorefile, lineno, line = ignoredata
                 ui.write(_("(ignore rule in %s, line %d: '%s')\n")
                          % (ignorefile, lineno, line))
             else:
-                ui.write(_("%s is not ignored\n") % m.uipath(f))
+                ui.write(_("%s is not ignored\n") % uipathfn(f))
 
 @command('debugindex', cmdutil.debugrevlogopts + cmdutil.formatteropts,
          _('-c|-m|FILE'))



To: martinvonz, #hg-reviewers, pulkit
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
|

D5898: debugignore: respect ui.relative-paths

jeffpc (Jeff Sipek)
In reply to this post by jeffpc (Jeff Sipek)
mharbison72 added a comment.


  This seems to have converted a test from dos to unix style.  I'm not sure if that was intentional, or if this feature is still a WIP.  (Sorry, I've been busy lately, and haven't had time to follow this closely)
 
  https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/1274/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers, pulkit
Cc: mharbison72, 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
|

D5898: debugignore: respect ui.relative-paths

jeffpc (Jeff Sipek)
In reply to this post by jeffpc (Jeff Sipek)
martinvonz added a comment.


  In https://phab.mercurial-scm.org/D5898#87275, @mharbison72 wrote:
 
  > This seems to have converted a test from dos to unix style.  I'm not sure if that was intentional, or if this feature is still a WIP.  (Sorry, I've been busy lately, and haven't had time to follow this closely)
  >
  > https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/1274/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio
 
 
  It wasn't intentional, and it took me a while to figure out why it changed, but I'm pretty confident it's just changed in the tests, since the test runner sets `ui.slash`. The old code called `m.uipath()` and that called `util.pathto()`. The new code calls `repo.path()`, which calls `dirstate.pathto()`, which also calls `util.pathto()`. However, if `ui.slash` is set, `dirstate.pathto()` also calls `util.pconvert()` to convert it back to a slash-separated path. Please send a patch to update the test case if you have access to a Windows machine.

REPOSITORY
  rHG Mercurial

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

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