##// END OF EJS Templates
dirstate: remove _filefoldmap property cache...
Durham Goode -
r34677:bfddc3d6 default
parent child Browse files
Show More
@@ -549,8 +549,8 b' def perfdirstatefoldmap(ui, repo, **opts'
549 549 dirstate = repo.dirstate
550 550 'a' in dirstate
551 551 def d():
552 dirstate._filefoldmap.get('a')
553 del dirstate._filefoldmap
552 dirstate._map.filefoldmap.get('a')
553 del dirstate._map.filefoldmap
554 554 timer(d)
555 555 fm.end()
556 556
@@ -133,10 +133,6 b' class dirstate(object):'
133 133 return self._map
134 134
135 135 @propertycache
136 def _filefoldmap(self):
137 return self._map.filefoldmap()
138
139 @propertycache
140 136 def _dirfoldmap(self):
141 137 f = {}
142 138 normcase = util.normcase
@@ -380,7 +376,7 b' class dirstate(object):'
380 376 rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
381 377 check whether the dirstate has changed before rereading it.'''
382 378
383 for a in ("_map", "_filefoldmap", "_dirfoldmap", "_branch",
379 for a in ("_map", "_dirfoldmap", "_branch",
384 380 "_dirs", "_ignore"):
385 381 if a in self.__dict__:
386 382 delattr(self, a)
@@ -412,10 +408,10 b' class dirstate(object):'
412 408 if self[f] not in "?r" and "_dirs" in self.__dict__:
413 409 self._dirs.delpath(f)
414 410
415 if "_filefoldmap" in self.__dict__:
411 if "filefoldmap" in self._map.__dict__:
416 412 normed = util.normcase(f)
417 if normed in self._filefoldmap:
418 del self._filefoldmap[normed]
413 if normed in self._map.filefoldmap:
414 del self._map.filefoldmap[normed]
419 415
420 416 self._updatedfiles.add(f)
421 417
@@ -563,18 +559,18 b' class dirstate(object):'
563 559
564 560 def _normalizefile(self, path, isknown, ignoremissing=False, exists=None):
565 561 normed = util.normcase(path)
566 folded = self._filefoldmap.get(normed, None)
562 folded = self._map.filefoldmap.get(normed, None)
567 563 if folded is None:
568 564 if isknown:
569 565 folded = path
570 566 else:
571 567 folded = self._discoverpath(path, normed, ignoremissing, exists,
572 self._filefoldmap)
568 self._map.filefoldmap)
573 569 return folded
574 570
575 571 def _normalize(self, path, isknown, ignoremissing=False, exists=None):
576 572 normed = util.normcase(path)
577 folded = self._filefoldmap.get(normed, None)
573 folded = self._map.filefoldmap.get(normed, None)
578 574 if folded is None:
579 575 folded = self._dirfoldmap.get(normed, None)
580 576 if folded is None:
@@ -1270,6 +1266,7 b' class dirstatemap(object):'
1270 1266 otherparent.add(fname)
1271 1267 return nonnorm, otherparent
1272 1268
1269 @propertycache
1273 1270 def filefoldmap(self):
1274 1271 """Returns a dictionary mapping normalized case paths to their
1275 1272 non-normalized versions.
General Comments 0
You need to be logged in to leave comments. Login now