cmdutil: fix islocalrepo() under Windows

This commit is contained in:
Patrick Mezard 2009-04-28 21:16:35 +02:00
parent 0933c6ae94
commit 2327836b0b

View File

@ -286,7 +286,8 @@ def islocalrepo(url):
return False
if '#' in url.split('/')[-1]: # strip off #anchor
url = url[:url.rfind('#')]
path = urllib.unquote(url[len('file://'):])
path = url[len('file://'):]
path = urllib.url2pathname(path).replace(os.sep, '/')
while '/' in path:
if reduce(lambda x,y: x and y,
map(lambda p: os.path.exists(os.path.join(path, p)),