Mercurial > hg
diff mercurial/dirstate.py @ 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 | 8c136043867b |
children | df96a0d1d79d |
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 = {}