bookmark: add a `bmstore.recordupdate` to plug bookmarks into the transaction
Instead of manually writing bookmarks when they are updated, we can just record this
update to the transaction and rely on it to update the on-disk file.
--- a/mercurial/bookmarks.py Sat Sep 27 03:10:33 2014 -0700
+++ b/mercurial/bookmarks.py Sun Sep 28 00:41:55 2014 -0700
@@ -47,6 +47,13 @@
if inst.errno != errno.ENOENT:
raise
+ def recordchange(self, tr):
+ """record that bookmarks have been changed in a transaction
+
+ The transaction is then responsible for updating the file content."""
+ tr.addfilegenerator('bookmarks', ('bookmarks',), self._write,
+ vfs=self._repo.vfs)
+
def write(self):
'''Write bookmarks