comparison mercurial/cmdutil.py @ 25693:a6c1eac2fb1e

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 30 Jun 2015 22:36:49 -0700
parents 328739ea70c3
children 5ede49f4383a
comparison
equal deleted inserted replaced
25692:9f6e0e7ef828 25693:a6c1eac2fb1e
2613 bms = repo.nodebookmarks(old.node()) 2613 bms = repo.nodebookmarks(old.node())
2614 if bms: 2614 if bms:
2615 marks = repo._bookmarks 2615 marks = repo._bookmarks
2616 for bm in bms: 2616 for bm in bms:
2617 marks[bm] = newid 2617 marks[bm] = newid
2618 marks.write() 2618 marks.recordchange(tr)
2619 #commit the whole amend process 2619 #commit the whole amend process
2620 createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt) 2620 createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
2621 if createmarkers and newid != old.node(): 2621 if createmarkers and newid != old.node():
2622 # mark the new changeset as successor of the rewritten one 2622 # mark the new changeset as successor of the rewritten one
2623 new = repo[newid] 2623 new = repo[newid]