# HG changeset patch # User Paul Molodowitch # Date 1261094008 28800 # Node ID 153d688cdd0691682373933984fbe9c57c23de3d # Parent 7648f32713f2d615bb79155b5b2c79a60a94ea17 bookmarks: add invalidate() to bookmark_repo Cached bookmark information would not be reset when repo.invalidate() was called, meaning (for instanced) guis would be left with out-of-date bookmark info. This patch fixes that by overriding bookmark_repo.invalidate() diff -r 7648f32713f2 -r 153d688cdd06 hgext/bookmarks.py --- a/hgext/bookmarks.py Tue Jan 12 22:49:10 2010 +0900 +++ b/hgext/bookmarks.py Thu Dec 17 15:53:28 2009 -0800 @@ -296,6 +296,13 @@ 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(repo, attr) + repo.__class__ = bookmark_repo def uisetup(ui):