Mercurial > public > mercurial-scm > hg
diff mercurial/httppeer.py @ 50421:ed052780ad5e
peer: rename makepeer() ? _make_peer()
In httppeer and sshpeer, there previously were makepeer() and make_peer(),
which was confusing. Therefore, this changeset renames one of the functions.
makepeer() was the internal function called by make_peer() and some debug
command. This function is renamed to _make_peer().
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 07 Apr 2023 15:42:49 +0200 |
parents | cfe8d88a453e |
children | 3a2df812e1c7 |
line wrap: on
line diff
--- a/mercurial/httppeer.py Tue Apr 04 11:58:35 2023 +0200 +++ b/mercurial/httppeer.py Fri Apr 07 15:42:49 2023 +0200 @@ -592,7 +592,7 @@ return respurl, info -def makepeer(ui, path, opener=None, requestbuilder=urlreq.request): +def _make_peer(ui, path, opener=None, requestbuilder=urlreq.request): """Construct an appropriate HTTP peer instance. ``opener`` is an ``url.opener`` that should be used to establish @@ -628,7 +628,7 @@ _(b'Python support for SSL and HTTPS is not installed') ) - inst = makepeer(ui, path) + inst = _make_peer(ui, path) return inst except error.RepoError as httpexception: