comparison mercurial/logexchange.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 89a2afe31e82
children 6000f5b25c9b
comparison
equal deleted inserted replaced
46906:33524c46a092 46907:ffd3e823a7e5
12 12
13 from . import ( 13 from . import (
14 pycompat, 14 pycompat,
15 util, 15 util,
16 vfs as vfsmod, 16 vfs as vfsmod,
17 )
18 from .utils import (
19 urlutil,
17 ) 20 )
18 21
19 # directory name in .hg/ in which remotenames files will be present 22 # directory name in .hg/ in which remotenames files will be present
20 remotenamedir = b'logexchange' 23 remotenamedir = b'logexchange'
21 24
115 rpath = remote._url 118 rpath = remote._url
116 119
117 # represent the remotepath with user defined path name if exists 120 # represent the remotepath with user defined path name if exists
118 for path, url in repo.ui.configitems(b'paths'): 121 for path, url in repo.ui.configitems(b'paths'):
119 # remove auth info from user defined url 122 # remove auth info from user defined url
120 noauthurl = util.removeauth(url) 123 noauthurl = urlutil.removeauth(url)
121 124
122 # Standardize on unix style paths, otherwise some {remotenames} end up 125 # Standardize on unix style paths, otherwise some {remotenames} end up
123 # being an absolute path on Windows. 126 # being an absolute path on Windows.
124 url = util.pconvert(bytes(url)) 127 url = util.pconvert(bytes(url))
125 noauthurl = util.pconvert(noauthurl) 128 noauthurl = util.pconvert(noauthurl)