##// END OF EJS Templates
dirstate: add filecache support
Idan Kamara -
r16200:9d4a2942 stable
parent child Browse files
Show More
@@ -52,6 +52,7 b' class dirstate(object):'
52 self._dirtypl = False
52 self._dirtypl = False
53 self._lastnormaltime = 0
53 self._lastnormaltime = 0
54 self._ui = ui
54 self._ui = ui
55 self._filecache = {}
55
56
56 @propertycache
57 @propertycache
57 def _map(self):
58 def _map(self):
@@ -901,10 +901,13 b' class localrepository(repo.repository):'
901 rereads the dirstate. Use dirstate.invalidate() if you want to
901 rereads the dirstate. Use dirstate.invalidate() if you want to
902 explicitly read the dirstate again (i.e. restoring it to a previous
902 explicitly read the dirstate again (i.e. restoring it to a previous
903 known good state).'''
903 known good state).'''
904 try:
904 if 'dirstate' in self.__dict__:
905 for k in self.dirstate._filecache:
906 try:
907 delattr(self.dirstate, k)
908 except AttributeError:
909 pass
905 delattr(self, 'dirstate')
910 delattr(self, 'dirstate')
906 except AttributeError:
907 pass
908
911
909 def invalidate(self):
912 def invalidate(self):
910 for k in self._filecache:
913 for k in self._filecache:
General Comments 0
You need to be logged in to leave comments. Login now