static-http: have `statichttprepo.instance` return a peer object
It previously returned a statichttprepo object which could not be used for
anything but creating a peer. So lets put it into the peer bucket with a peer
behavior.
--- a/mercurial/hg.py Wed Nov 30 12:22:02 2022 +0100
+++ b/mercurial/hg.py Tue Nov 29 22:03:10 2022 +0100
@@ -147,13 +147,13 @@
b'bundle': bundlerepo,
b'union': unionrepo,
b'file': LocalFactory,
- b'static-http': statichttprepo,
}
peer_schemes = {
b'http': httppeer,
b'https': httppeer,
b'ssh': sshpeer,
+ b'static-http': statichttprepo,
}
--- a/mercurial/statichttprepo.py Wed Nov 30 12:22:02 2022 +0100
+++ b/mercurial/statichttprepo.py Tue Nov 29 22:03:10 2022 +0100
@@ -262,4 +262,4 @@
def instance(ui, path, create, intents=None, createopts=None):
if create:
raise error.Abort(_(b'cannot create new static-http repository'))
- return statichttprepository(ui, path[7:])
+ return statichttprepository(ui, path[7:]).peer()