changeset 19103:0176d0db4671 stable

icasefs: ignore removed files at building "dirstate._foldmap" up on icasefs Before this patch, all files in dirstate are used to build "_foldmap" up on case insensitive filesystem regardless of their statuses. For example, when dirstate contains both removed file 'a' and added file 'A', "_foldmap" may be updated finally by removed file 'a'. This causes unexpected status information for added file 'A' at "hg status" invocation. This patch ignores removed files at building "_foldmap" up on case insensitive filessytem. This patch doesn't add any test, because this issue is difficult to reproduce intentionally: it depends on iteration order of "dirstate._map".
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 30 Apr 2013 05:00:48 +0900
parents 294e901f102a
children 370d9ea027b1
files mercurial/dirstate.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Wed May 01 11:20:16 2013 -0300
+++ b/mercurial/dirstate.py	Tue Apr 30 05:00:48 2013 +0900
@@ -59,8 +59,9 @@
     @propertycache
     def _foldmap(self):
         f = {}
-        for name in self._map:
-            f[util.normcase(name)] = name
+        for name, s in self._map.iteritems():
+            if s[0] != 'r':
+                f[util.normcase(name)] = name
         for name in self._dirs:
             f[util.normcase(name)] = name
         f['.'] = '.' # prevents useless util.fspath() invocation