From 2327836b0bb0e0d4e3a616d99e92064a1777ab0a Mon Sep 17 00:00:00 2001 From: Patrick Mezard Date: Tue, 28 Apr 2009 21:16:35 +0200 Subject: [PATCH] cmdutil: fix islocalrepo() under Windows --- cmdutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdutil.py b/cmdutil.py index 764ca67273..0e181c4ba0 100644 --- a/cmdutil.py +++ b/cmdutil.py @@ -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)),