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.
--- 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)