Mercurial > hg
diff mercurial/commands.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 | 0f894d2203c8 |
children | 3948cb4d0ae7 |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jun 30 22:36:49 2015 -0700 +++ b/mercurial/commands.py Tue Jun 30 22:39:28 2015 -0700 @@ -1523,21 +1523,10 @@ match, extra=extra) - active = repo._activebookmark - marks = old.bookmarks() node = cmdutil.amend(ui, repo, commitfunc, old, extra, pats, opts) if node == old.node(): ui.status(_("nothing changed\n")) return 1 - elif marks: - ui.debug('moving bookmarks %r from %s to %s\n' % - (marks, old.hex(), hex(node))) - newmarks = repo._bookmarks - for bm in marks: - newmarks[bm] = node - if bm == active: - bookmarks.activate(repo, bm) - newmarks.write() else: def commitfunc(ui, repo, message, match, opts): backup = ui.backupconfig('phases', 'new-commit')