Commits

Anonymous committed b2f1d97

don't use hasattr in repo.invalidate

hasattr ends up calling __getattr__ which will instantiate the very
attributes we want to remove.

Comments (0)

Files changed (1)

mercurial/localrepo.py

 
     def invalidate(self):
         for a in "changelog manifest".split():
-            if hasattr(self, a):
-                self.__delattr__(a)
+            if a in self.__dict__:
+                delattr(self, a)
         self.tagscache = None
         self._tagstypecache = None
         self.nodetagscache = None