diff hgext/convert/subversion.py @ 9521:e3ce0c30798b

Fix issue 1782 don't do url2pathname conversion for urls And only replace os-dependent path separators when necessary
author Grauw <laurens.hg@grauw.nl>
date Fri, 07 Aug 2009 01:15:16 +0200
parents e8441597d2ee
children d932dc655881 d80a251baf9a
line wrap: on
line diff
--- 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):