Fix issue 1782 don't do url2pathname conversion for urls
And only replace os-dependent path separators when necessary
--- a/hgext/convert/subversion.py Tue Sep 29 23:49:42 2009 -0500
+++ b/hgext/convert/subversion.py Fri Aug 07 01:15:16 2009 +0200
@@ -153,11 +153,13 @@
def issvnurl(url):
try:
proto, path = url.split('://', 1)
- path = urllib.url2pathname(path)
+ if proto == 'file':
+ path = urllib.url2pathname(path)
except ValueError:
proto = 'file'
path = os.path.abspath(url)
- path = path.replace(os.sep, '/')
+ if proto == 'file':
+ path = path.replace(os.sep, '/')
check = protomap.get(proto, lambda p, p2: False)
while '/' in path:
if check(path, proto):