[PATCH] httppeer: fix make_peer static - fixed for url-path argument. It has migrated to url-object, but legacy code passed just string
Raphaël Gomès
raphael.gomes at octobus.net
Mon Jun 26 09:58:47 UTC 2023
Thanks for your patch.
You've left a comment-out line. Is this just forgotten debug code or did
you mean to do something more there?
Also a small detail, but the `ui.note` was moved from after the call to
`make_peer`, which makes for a small difference in observed behavior. I
don't think it matters too much, but it's unrelated to the change.
On a more meta note, sending patches via Heptapod is strongly recommended:
- it runs the CI on your submissions (which would have caught the
invalid message title length and improper formatting, just for the
things I can see reading this patch)
- it makes back-and-forth review a lot easier
- it makes the reviewer's job simpler overall
If you don't want to bother, I understand completely and you can keep
sending patches via the mailing list if they're not too frequent.
Otherwise, tell me if you need any help figuring out Heptapod.
Raphaël
On 6/22/23 23:00, alexraynepe196 at gmail.com wrote:
> # 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