Commits

Alexis S. L. Carvalho  committed b2f1d97

don't use hasattr in repo.invalidate

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

  • Participants
  • Parent commits 6440e25

Comments (0)

Files changed (1)

File 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