Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshpeer.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 | d4ba4d51f85f |
children | 04688c51f81f |
line wrap: on
line diff
--- a/mercurial/sshpeer.py Sun Apr 11 23:54:35 2021 +0200 +++ b/mercurial/sshpeer.py Mon Apr 12 03:01:04 2021 +0200 @@ -24,6 +24,7 @@ from .utils import ( procutil, stringutil, + urlutil, ) @@ -662,11 +663,11 @@ The returned object conforms to the ``wireprotov1peer.wirepeer`` interface. """ - u = util.url(path, parsequery=False, parsefragment=False) + u = urlutil.url(path, parsequery=False, parsefragment=False) if u.scheme != b'ssh' or not u.host or u.path is None: raise error.RepoError(_(b"couldn't parse location %s") % path) - util.checksafessh(path) + urlutil.checksafessh(path) if u.passwd is not None: raise error.RepoError(_(b'password in URL not supported'))