# HG changeset patch # User Matt Mackall # Date 2011-02-10 19:46:27 # Node ID f26a51857dc755cbc9a299b65565245bacda6931 # Parent b67867940bd1c4d6c711874cf3755650e418761d bookmarks: merge invalidation into core diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -233,13 +233,6 @@ def reposetup(ui, repo): tags.update(self._bookmarks) return (tags, tagtypes) - if hasattr(repo, 'invalidate'): - def invalidate(self): - super(bookmark_repo, self).invalidate() - for attr in ('_bookmarks', '_bookmarkcurrent'): - if attr in self.__dict__: - delattr(self, attr) - repo.__class__ = bookmark_repo def pull(oldpull, ui, repo, source="default", **opts): diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -743,7 +743,7 @@ class localrepository(repo.repository): self._branchcachetip = None def invalidate(self): - for a in ("changelog", "manifest"): + for a in ("changelog", "manifest", "_bookmarks", "_bookmarkscurrent"): if a in self.__dict__: delattr(self, a) self.invalidatecaches()