py3: pass URL as str stable
authorManuel Jacob <me@manueljacob.de>
Tue, 30 Jun 2020 05:04:36 +0200
branchstable
changeset 45021 cb097496138a
parent 45020 697212a830fb
child 45022 e3b19004087a
py3: pass URL as str Before the patch, HTTP(S) URLs were never recognized as a Subversion repository on Python 3.
hgext/convert/subversion.py
--- 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: