Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 49862: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 | be3fcd9e5e52 |
children | ec30fe6917ec |
line wrap: on
line diff
--- 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,