[PATCH 1 of 2] Fix issue 1782 don’t do url2pathname conversion for urls
Laurens Holst
laurens.nospam at grauw.nl
Mon Sep 28 17:20:29 CDT 2009
# HG changeset patch
# User Grauw <laurens.hg at grauw.nl>
# Date 1249600516 -7200
# Node ID 844c64c7cc2123c5ae16fbfcd27f16fa3e232eca
# Parent 3e673c988c85ada261f9f87555c894cf1f429386
Fix issue 1782 dont do url2pathname conversion for urls
And only replace os-dependent path separators when necessary
diff -r 3e673c988c85 -r 844c64c7cc21 hgext/convert/subversion.py
--- a/hgext/convert/subversion.py Thu Sep 17 21:50:12 2009 +0200
+++ 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):
More information about the Mercurial-devel
mailing list