diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -4512,7 +4512,7 @@ def debugwireproto(ui, repo, path=None, peer = None else: ui.write(_(b'creating ssh peer from handshake results\n')) - peer = sshpeer.makepeer( + peer = sshpeer._make_peer( ui, url, proc, @@ -4568,7 +4568,7 @@ def debugwireproto(ui, repo, path=None, ) else: peer_path = urlutil.try_path(ui, path) - peer = httppeer.makepeer(ui, peer_path, opener=opener) + peer = httppeer._make_peer(ui, peer_path, opener=opener) # We /could/ populate stdin/stdout with sock.makefile()... else: diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -592,7 +592,7 @@ def performhandshake(ui, url, opener, re 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 @@ def make_peer(ui, path, create, intents= _(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: diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py --- a/mercurial/sshpeer.py +++ b/mercurial/sshpeer.py @@ -568,7 +568,7 @@ class sshv1peer(wireprotov1peer.wirepeer self._readerr() -def makepeer(ui, path, proc, stdin, stdout, stderr, autoreadstderr=True): +def _make_peer(ui, path, proc, stdin, stdout, stderr, autoreadstderr=True): """Make a peer instance from existing pipes. ``path`` and ``proc`` are stored on the eventual peer instance and may @@ -658,7 +658,7 @@ def make_peer(ui, path, create, intents= ui, sshcmd, args, remotecmd, remotepath, sshenv ) - peer = makepeer(ui, path, proc, stdin, stdout, stderr) + peer = _make_peer(ui, path, proc, stdin, stdout, stderr) # Finally, if supported by the server, notify it about our own # capabilities.