# HG changeset patch # User Grauw # Date 2009-08-06 23:15:16 # Node ID e3ce0c30798b911660d397cd5b07c8bc39297556 # Parent bcc27ee3a37ba4c9673b42e568ec2424da8bec8d Fix issue 1782 don't do url2pathname conversion for urls And only replace os-dependent path separators when necessary diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -153,11 +153,13 @@ protomap = {'http': httpcheck, 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):