# HG changeset patch # User Patrick Mezard # Date 1240946195 -7200 # Node ID 75d4fde9aa2e98f0abc3605d6564cc1d1bdad918 # Parent 982c46e7d167e361c50b35e7378d6753e7b92e81 cmdutil: fix islocalrepo() under Windows diff --git a/cmdutil.py b/cmdutil.py --- 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)),