Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 25694:5ede49f4383a
amend: stop updating the bookmarks twice
There was code to move the bookmarks around both in the 'cmdutil' help and in
the main 'commit' function. We kill the 'commit' version as it is performed
outside the transaction.
The debug note is moved into cmdutil.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 30 Jun 2015 22:39:28 -0700 |
parents | a6c1eac2fb1e |
children | c87373179ff3 |
comparison
equal
deleted
inserted
replaced
25693:a6c1eac2fb1e | 25694:5ede49f4383a |
---|---|
2612 # Move bookmarks from old parent to amend commit | 2612 # Move bookmarks from old parent to amend commit |
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 ui.debug('moving bookmarks %r from %s to %s\n' % | |
2618 (marks, old.hex(), hex(newid))) | |
2617 marks[bm] = newid | 2619 marks[bm] = newid |
2618 marks.recordchange(tr) | 2620 marks.recordchange(tr) |
2619 #commit the whole amend process | 2621 #commit the whole amend process |
2620 createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt) | 2622 createmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt) |
2621 if createmarkers and newid != old.node(): | 2623 if createmarkers and newid != old.node(): |