# HG changeset patch # User FUJIWARA Katsunori # Date 2011-12-16 12:09:40 # Node ID 8e020155e76c0279cfef5ea4a5d669077069bca2 # Parent eacfd851cb9ee55c4400a01c83d0c159659a1749 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 '.'. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -69,6 +69,7 @@ class dirstate(object): f = {} for name in self._map: f[util.normcase(name)] = name + f['.'] = '.' # prevents useless util.fspath() invocation return f @propertycache