Mercurial > hg
changeset 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 | bcc27ee3a37b |
children | d932dc655881 effa05849027 |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
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):