amend: collaborate with the transaction when moving bookmarks
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 30 Jun 2015 22:36:49 -0700
changeset 25693 a6c1eac2fb1e
parent 25692 9f6e0e7ef828
child 25694 5ede49f4383a
amend: collaborate with the transaction when moving bookmarks We have code moving bookmarks from the old changeset to the new one within the transaction scope. Yet this code was still writing to disk instead of handing the change to the transaction. This changeset fixes this.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Mon Jun 29 17:10:36 2015 -0400
+++ b/mercurial/cmdutil.py	Tue Jun 30 22:36:49 2015 -0700
@@ -2615,7 +2615,7 @@
                     marks = repo._bookmarks
                     for bm in bms:
                         marks[bm] = newid
-                    marks.write()
+                    marks.recordchange(tr)
             #commit the whole amend process
             createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
             if createmarkers and newid != old.node():