[PATCH 1 of 2] amend: collaborate with the transaction when moving bookmarks
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Jul 1 06:04:27 UTC 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1435729009 25200
# Tue Jun 30 22:36:49 2015 -0700
# Node ID cc88486e842ce1cf3b696606b98505ae52031afc
# Parent c76e8d14383a44a740d986d87db6f58276fb57e8
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 fix this.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2613,11 +2613,11 @@ def amend(ui, repo, commitfunc, old, ext
bms = repo.nodebookmarks(old.node())
if bms:
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():
# mark the new changeset as successor of the rewritten one
new = repo[newid]
More information about the Mercurial-devel
mailing list