comparison mercurial/localrepo.py @ 6371:b2f1d97d10eb

don't use hasattr in repo.invalidate hasattr ends up calling __getattr__ which will instantiate the very attributes we want to remove.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 23 Mar 2008 21:03:24 -0300
parents 6440e25a1ba3
children 0d4e068e9e52
comparison
equal deleted inserted replaced
6370:6440e25a1ba3 6371:b2f1d97d10eb
631 finally: 631 finally:
632 del lock, wlock 632 del lock, wlock
633 633
634 def invalidate(self): 634 def invalidate(self):
635 for a in "changelog manifest".split(): 635 for a in "changelog manifest".split():
636 if hasattr(self, a): 636 if a in self.__dict__:
637 self.__delattr__(a) 637 delattr(self, a)
638 self.tagscache = None 638 self.tagscache = None
639 self._tagstypecache = None 639 self._tagstypecache = None
640 self.nodetagscache = None 640 self.nodetagscache = None
641 self.branchcache = None 641 self.branchcache = None
642 self._ubranchcache = None 642 self._ubranchcache = None