[Updated] D8600: scmutil: clarify getuipathfn comment

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Sat May 30 16:24:29 UTC 2020


Closed by commit rHGd044b66d8429: scmutil: clarify getuipathfn comment (authored by valentin.gatienbaron).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8600?vs=21531&id=21535

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8600/new/

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -804,8 +804,8 @@
     if relative:
         cwd = repo.getcwd()
         if cwd != b'':
-            # this branch is correct when cwd == b'', ie cwd = repo root,
-            # but it's slower
+            # this branch would work even if cwd == b'' (ie cwd = repo
+            # root), but its generality makes the returned function slower
             pathto = repo.pathto
             return lambda f: pathto(f, cwd)
     if repo.ui.configbool(b'ui', b'slash'):



To: valentin.gatienbaron, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200530/5d77760e/attachment-0002.html>


More information about the Mercurial-patches mailing list