diff mercurial/dirstate.py @ 15668:8e020155e76c stable

dirstate: prevent useless util.fspath() invocation for '.' at first of dirstate.walk() on case insensitive filesystem, normalization of '.' causes util.fspath() invocation, but '.' is not cached in it. this invocation is not only useless, but also harmful: initial "hg tag" causes creation of ".hgtags" file after dirstate.walk(), and looking up ".hgtags" in cache will fail, because directory contents of root is already cached at util.fspath() invocation for '.'.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 16 Dec 2011 21:09:40 +0900
parents b2fd4746414a
children d6c19cfa03ce
line wrap: on
line diff
--- a/mercurial/dirstate.py	Fri Dec 16 21:09:40 2011 +0900
+++ b/mercurial/dirstate.py	Fri Dec 16 21:09:40 2011 +0900
@@ -69,6 +69,7 @@
         f = {}
         for name in self._map:
             f[util.normcase(name)] = name
+        f['.'] = '.' # prevents useless util.fspath() invocation
         return f
 
     @propertycache