bookmark: remove a useless 'recordchange' in the amend code
authorBoris Feld <boris.feld@octobus.net>
Mon, 10 Jul 2017 17:48:33 +0200
changeset 33509 a3acacbd0ff3
parent 33508 d09de637cbc8
child 33510 07b556d1b74e
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.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Sat Jul 15 23:46:33 2017 -0400
+++ b/mercurial/cmdutil.py	Mon Jul 10 17:48:33 2017 +0200
@@ -2750,7 +2750,7 @@
     base = old.p1()
 
     newid = None
-    with repo.wlock(), repo.lock(), repo.transaction('amend') as tr:
+    with repo.wlock(), repo.lock(), repo.transaction('amend'):
         # See if we got a message from -m or -l, if not, open the editor
         # with the message of the changeset to amend
         message = logmessage(ui, opts)
@@ -2768,7 +2768,6 @@
             node = commit(ui, repo, commitfunc, pats, opts)
         finally:
             repo._bookmarks.active = activebookmark
-            repo._bookmarks.recordchange(tr)
             ui.callhooks = True
         ctx = repo[node]