mercurial/hg.py
changeset 49750 f075a9463ee7
parent 49749 be3fcd9e5e52
child 49754 ec30fe6917ec
--- a/mercurial/hg.py	Fri Dec 02 18:04:37 2022 +0100
+++ b/mercurial/hg.py	Fri Dec 02 18:04:51 2022 +0100
@@ -168,11 +168,12 @@
         scheme = u.scheme or b'file'
         if scheme in peer_schemes:
             cls = peer_schemes[scheme]
+            cls.make_peer  # make sure we load the module
         elif scheme in repo_schemes:
             cls = repo_schemes[scheme]
+            cls.instance  # make sure we load the module
         else:
             cls = LocalFactory
-        cls.instance  # make sure we load the module
         if util.safehasattr(cls, 'islocal'):
             return cls.islocal(repo)  # pytype: disable=module-attr
         return False
@@ -253,7 +254,7 @@
         scheme = urlutil.url(path).scheme
     if scheme in peer_schemes:
         cls = peer_schemes[scheme]
-        peer = cls.instance(
+        peer = cls.make_peer(
             rui,
             path,
             create,