changeset 289:75d4fde9aa2e

cmdutil: fix islocalrepo() under Windows
author Patrick Mezard <pmezard@gmail.com>
date Tue, 28 Apr 2009 21:16:35 +0200
parents 982c46e7d167
children 153266401676
files cmdutil.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)),