diff mercurial/bookmarks.py @ 25569:2612e6dab189

repoview: invalidate 'visible' filtered revisions when bookmarks change Context: the result of computehidden, used to compute the 'visible' revisions is cached. Its output can change when: 1) new obsolete commits are created 2) new bookmarks are created or deleted 3) new tags are created or deleted 4) the parents of the working copy change We currently correctly invalidate the cache only in the case 1). This patch fixes the second case (bookmarks) by invalidating the cache once a bookmark is added or removed.
author Laurent Charignon <lcharignon@fb.com>
date Sat, 13 Jun 2015 00:51:43 -0700
parents 847fce27effc
children 328739ea70c3
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Fri Jun 12 22:09:41 2015 -0400
+++ b/mercurial/bookmarks.py	Sat Jun 13 00:51:43 2015 -0700
@@ -80,6 +80,7 @@
         '''
         repo = self._repo
         self._writerepo(repo)
+        repo.invalidatevolatilesets()
 
     def _writerepo(self, repo):
         """Factored out for extensibility"""