comparison mercurial/localrepo.py @ 16200:9d4a2942a732 stable

dirstate: add filecache support
author Idan Kamara <idankk86@gmail.com>
date Thu, 01 Mar 2012 17:39:58 +0200
parents fa8488565afd
children 85db991780b7 b9c4302310e5
comparison
equal deleted inserted replaced
16199:8181bd808dc5 16200:9d4a2942a732
899 899
900 This is different to dirstate.invalidate() that it doesn't always 900 This is different to dirstate.invalidate() that it doesn't always
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:
911 # dirstate is invalidated separately in invalidatedirstate() 914 # dirstate is invalidated separately in invalidatedirstate()
912 if k == 'dirstate': 915 if k == 'dirstate':