diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -303,7 +303,7 @@ _wraphttpresponse(resp) # record the url we got redirected to - resp_url = resp.geturl() + resp_url = pycompat.bytesurl(resp.geturl()) if resp_url.endswith(qs): resp_url = resp_url[:-len(qs)] if self._url.rstrip('/') != resp_url.rstrip('/'):