bookmarks: properly invalidate volatile sets when writing bookmarks stable
authorAugie Fackler <augie@google.com>
Wed, 04 May 2016 22:44:30 -0400
branchstable
changeset 29066 e6f490e32863
parent 29065 dae4552390fc
child 29082 77de985d7c91
bookmarks: properly invalidate volatile sets when writing bookmarks This corrects a regression introduced during the 3.7 cycle, but which went undetected due to the surviving-but-deprecated write() method on bmstore.
mercurial/bookmarks.py
tests/test-obsolete.t
--- a/mercurial/bookmarks.py	Thu May 05 15:41:37 2016 +0200
+++ b/mercurial/bookmarks.py	Wed May 04 22:44:30 2016 -0400
@@ -181,6 +181,7 @@
         for name, node in self.iteritems():
             fp.write("%s %s\n" % (hex(node), encoding.fromlocal(name)))
         self._clean = True
+        self._repo.invalidatevolatilesets()
 
     def expandname(self, bname):
         if bname == '.':
--- a/tests/test-obsolete.t	Thu May 05 15:41:37 2016 +0200
+++ b/tests/test-obsolete.t	Wed May 04 22:44:30 2016 -0400
@@ -1009,11 +1009,9 @@
   $ echo "hello" > b
   $ hg commit --amend -m "message"
   $ hg book bookb -r 13bedc178fce --hidden
-  cache inconsistency
   $ hg log -r 13bedc178fce
   5:13bedc178fce (draft) [ bookb] add b
   $ hg book -d bookb
-  cache inconsistency
   $ hg log -r 13bedc178fce
   abort: hidden revision '13bedc178fce'!
   (use --hidden to access hidden revisions)