[Commented On] D10448: bookmark: use `list_paths` to access path definition
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Mon May 3 13:53:11 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27420.
â
refresh by Heptapod after a successful CI run (ð ð)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10448?vs=27236&id=27420
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10448/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10448
AFFECTED FILES
mercurial/bookmarks.py
CHANGE DETAILS
diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -600,11 +600,12 @@
# if an @pathalias already exists, we overwrite (update) it
if path.startswith(b"file:"):
path = urlutil.url(path).path
- for p, u in ui.configitems(b"paths"):
- if u.startswith(b"file:"):
- u = urlutil.url(u).path
- if path == u:
- return b'%s@%s' % (b, p)
+ for name, p in urlutil.list_paths(ui):
+ loc = p.rawloc
+ if loc.startswith(b"file:"):
+ loc = urlutil.url(loc).path
+ if path == loc:
+ return b'%s@%s' % (b, name)
# assign a unique "@number" suffix newly
for x in range(1, 100):
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210503/085d05e0/attachment-0001.html>
More information about the Mercurial-patches
mailing list