make normalize() work when cwd != repo.root
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 02 Sep 2008 22:04:09 +0200
changeset 6977 df96a0d1d79d
parent 6975 5e1a867e5d65
child 6978 2ca84555ba1f
make normalize() work when cwd != repo.root
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Sat Aug 02 19:34:50 2008 +0400
+++ b/mercurial/dirstate.py	Tue Sep 02 22:04:09 2008 +0200
@@ -349,7 +349,7 @@
     def _normalize(self, path):
         norm_path = os.path.normcase(os.path.normpath(path))
         if norm_path not in self._foldmap:
-            if not os.path.exists(path):
+            if not os.path.exists(os.path.join(self._root, path)):
                 return path
             self._foldmap[norm_path] = util.fspath(path, self._root)
         return self._foldmap[norm_path]