changeset 45021:cb097496138a stable

py3: pass URL as str Before the patch, HTTP(S) URLs were never recognized as a Subversion repository on Python 3.
author Manuel Jacob <me@manueljacob.de>
date Tue, 30 Jun 2020 05:04:36 +0200
parents 697212a830fb
children e3b19004087a
files hgext/convert/subversion.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/subversion.py	Tue Jun 30 04:55:52 2020 +0200
+++ b/hgext/convert/subversion.py	Tue Jun 30 05:04:36 2020 +0200
@@ -284,7 +284,9 @@
 def httpcheck(ui, path, proto):
     try:
         opener = urlreq.buildopener()
-        rsp = opener.open(b'%s://%s/!svn/ver/0/.svn' % (proto, path), b'rb')
+        rsp = opener.open(
+            pycompat.strurl(b'%s://%s/!svn/ver/0/.svn' % (proto, path)), b'rb'
+        )
         data = rsp.read()
     except urlerr.httperror as inst:
         if inst.code != 404: