[PATCH] httppeer: fix make_peer static - fixed for url-path argument. It has migrated to url-object, but legacy code passed just string
alexraynepe196 at gmail.com
alexraynepe196 at gmail.com
Thu Jun 22 21:00:57 UTC 2023
# HG changeset patch
# User alexrayne
# Date 1687465008 -10800
# Thu Jun 22 23:16:48 2023 +0300
# Node ID f0da5dd7a1d6274b62b7852dc05ac56b57381820
# Parent 68c4f8f3c9f43ae3773ed1dcfe7ed8cd0334bb27
httppeer: fix make_peer static - fixed for url-path argument. It has migrated to url-object, but legacy code passed just string
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -663,8 +663,10 @@
return inst
except error.RepoError as httpexception:
try:
- r = statichttprepo.make_peer(ui, b"static-" + path.loc, create)
ui.note(_(b'(falling back to static-http)\n'))
+ # path.url.scheme = b"static-" + path.url.scheme;
+ spath = urlutil.path(ui, None, rawloc=b"static-"+path.rawloc, validate_path=False)
+ r = statichttprepo.make_peer(ui, spath, create)
return r
except error.RepoError:
raise httpexception # use the original http RepoError instead
More information about the Mercurial-devel
mailing list