Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 33509:a3acacbd0ff3
bookmark: remove a useless 'recordchange' in the amend code
We do not touch the bookmarks store in this code, just the active bookmark, not
covered by the transaction. So it seems we can safely drop this call and the
tests agree with us.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 10 Jul 2017 17:48:33 +0200 |
parents | 0407a51b9d8c |
children | 4cd4344a53c4 |
comparison
equal
deleted
inserted
replaced
33508:d09de637cbc8 | 33509:a3acacbd0ff3 |
---|---|
2748 | 2748 |
2749 ui.note(_('amending changeset %s\n') % old) | 2749 ui.note(_('amending changeset %s\n') % old) |
2750 base = old.p1() | 2750 base = old.p1() |
2751 | 2751 |
2752 newid = None | 2752 newid = None |
2753 with repo.wlock(), repo.lock(), repo.transaction('amend') as tr: | 2753 with repo.wlock(), repo.lock(), repo.transaction('amend'): |
2754 # See if we got a message from -m or -l, if not, open the editor | 2754 # See if we got a message from -m or -l, if not, open the editor |
2755 # with the message of the changeset to amend | 2755 # with the message of the changeset to amend |
2756 message = logmessage(ui, opts) | 2756 message = logmessage(ui, opts) |
2757 # ensure logfile does not conflict with later enforcement of the | 2757 # ensure logfile does not conflict with later enforcement of the |
2758 # message. potential logfile content has been processed by | 2758 # message. potential logfile content has been processed by |
2766 repo._bookmarks.active = None | 2766 repo._bookmarks.active = None |
2767 opts['message'] = 'temporary amend commit for %s' % old | 2767 opts['message'] = 'temporary amend commit for %s' % old |
2768 node = commit(ui, repo, commitfunc, pats, opts) | 2768 node = commit(ui, repo, commitfunc, pats, opts) |
2769 finally: | 2769 finally: |
2770 repo._bookmarks.active = activebookmark | 2770 repo._bookmarks.active = activebookmark |
2771 repo._bookmarks.recordchange(tr) | |
2772 ui.callhooks = True | 2771 ui.callhooks = True |
2773 ctx = repo[node] | 2772 ctx = repo[node] |
2774 | 2773 |
2775 # Participating changesets: | 2774 # Participating changesets: |
2776 # | 2775 # |