diff mercurial/httppeer.py @ 49750:f075a9463ee7

peer: use a dedicated name for the `peer` constructor We want to change the argument it takes, so we rather make them different function.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 02 Dec 2022 18:04:51 +0100
parents 78af51ba73c5
children a6e2a668c746
line wrap: on
line diff
--- a/mercurial/httppeer.py	Fri Dec 02 18:04:37 2022 +0100
+++ b/mercurial/httppeer.py	Fri Dec 02 18:04:51 2022 +0100
@@ -621,7 +621,7 @@
     )
 
 
-def instance(ui, path, create, intents=None, createopts=None):
+def make_peer(ui, path, create, intents=None, createopts=None):
     if create:
         raise error.Abort(_(b'cannot create new http repository'))
     try:
@@ -635,7 +635,7 @@
         return inst
     except error.RepoError as httpexception:
         try:
-            r = statichttprepo.instance(ui, b"static-" + path, create)
+            r = statichttprepo.make_peer(ui, b"static-" + path, create)
             ui.note(_(b'(falling back to static-http)\n'))
             return r
         except error.RepoError: