# HG changeset patch # User Edouard Gomez # Date 1244239717 -7200 # Node ID 46b5b4301fcc251dcfdfa645fde4817c21b68288 # Parent fccdf5ca5065ee51d662a338e04964b811a6833f convert: default to file protocol when no :// found for svn repo url Edited by pmezard: add path separator normalization diff -r fccdf5ca5065 -r 46b5b4301fcc hgext/convert/subversion.py --- a/hgext/convert/subversion.py Tue Jun 09 09:25:34 2009 -0400 +++ b/hgext/convert/subversion.py Sat Jun 06 00:08:37 2009 +0200 @@ -161,10 +161,13 @@ 'file': filecheck, } def issvnurl(url): - if not '://' in url: - return False - proto, path = url.split('://', 1) - path = urllib.url2pathname(path).replace(os.sep, '/') + try: + proto, path = url.split('://', 1) + path = urllib.url2pathname(path) + except ValueError: + proto = 'file' + path = os.path.abspath(url) + path = path.replace(os.sep, '/') check = protomap.get(proto, lambda p, p2: False) while '/' in path: if check(path, proto):