# HG changeset patch # User Alexis S. L. Carvalho # Date 2008-03-24 00:03:24 # Node ID b2f1d97d10ebccf03b0ecdc5090f53d0b8df0a66 # Parent 6440e25a1ba3fb3383076c0ab5a90ffecd6a4e27 don't use hasattr in repo.invalidate hasattr ends up calling __getattr__ which will instantiate the very attributes we want to remove. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -633,8 +633,8 @@ class localrepository(repo.repository): 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