Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bookmarks.py @ 46907:ffd3e823a7e5
urlutil: extract `url` related code from `util` into the new module
The new module is well fitting for this new code. And this will be useful to
make the gathered code collaborate more later.
Differential Revision: https://phab.mercurial-scm.org/D10374
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 12 Apr 2021 03:01:04 +0200 |
parents | 6266d19556ad |
children | d55b71393907 |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Sun Apr 11 23:54:35 2021 +0200 +++ b/mercurial/bookmarks.py Mon Apr 12 03:01:04 2021 +0200 @@ -27,6 +27,9 @@ txnutil, util, ) +from .utils import ( + urlutil, +) # label constants # until 3.5, bookmarks.current was the advertised name, not @@ -597,10 +600,10 @@ # try to use an @pathalias suffix # if an @pathalias already exists, we overwrite (update) it if path.startswith(b"file:"): - path = util.url(path).path + path = urlutil.url(path).path for p, u in ui.configitems(b"paths"): if u.startswith(b"file:"): - u = util.url(u).path + u = urlutil.url(u).path if path == u: return b'%s@%s' % (b, p)