[PATCH] httppeer: fix make_peer static - fixed for url-path argument. It has migrated to url-object, but legacy code passed just string

Augie Fackler raf at durin42.com
Sat Jun 24 16:21:34 UTC 2023


Patch LGTM, but I'm not set up to push to heptapod - can someone else
handle that for me?

Thanks,
Augie

On Thu, Jun 22, 2023, 17:01 <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
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at lists.mercurial-scm.org
> https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20230624/706f03a5/attachment.html>


More information about the Mercurial-devel mailing list