changeset 6975:5e1a867e5d65

Fix normalize fail on non-lowercase filename (Issue1273) regression introduced in 1e2850ed8171
author Andrei Vermel <avermel@mail.ru>
date Sat, 02 Aug 2008 19:34:50 +0400
parents 8997b81a33da
children b072266a83d1 df96a0d1d79d
files mercurial/dirstate.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Tue Sep 02 15:41:51 2008 +0200
+++ b/mercurial/dirstate.py	Sat Aug 02 19:34:50 2008 +0400
@@ -347,11 +347,12 @@
             self._ui.warn(_("not in dirstate: %s\n") % f)
 
     def _normalize(self, path):
-        if path not in self._foldmap:
+        norm_path = os.path.normcase(os.path.normpath(path))
+        if norm_path not in self._foldmap:
             if not os.path.exists(path):
                 return path
-            self._foldmap[path] = util.fspath(path, self._root)
-        return self._foldmap[path]
+            self._foldmap[norm_path] = util.fspath(path, self._root)
+        return self._foldmap[norm_path]
 
     def clear(self):
         self._map = {}