Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 15670:d6c19cfa03ce stable
icasefs: avoid normcase()-ing in util.fspath() for efficiency
'dirstate._normalize()', the only caller of 'util.fspath()', has
already normcase()-ed path before invocation of it.
normcase()-ed root can be cached on dirstate side, too.
so, this patch changes 'util.fspath()' API specification to avoid
normcase()-ing in it.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 16 Dec 2011 21:09:40 +0900 |
parents | 8e020155e76c |
children | a814f8fcc65a e43c140eb08f |
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 @@ -65,6 +65,10 @@ return self._copymap @propertycache + def _normroot(self): + return util.normcase(self._root) + + @propertycache def _foldmap(self): f = {} for name in self._map: @@ -384,7 +388,7 @@ folded = path else: folded = self._foldmap.setdefault(normed, - util.fspath(path, self._root)) + util.fspath(normed, self._normroot)) return folded def normalize(self, path, isknown=False):