diff mercurial/commands.py @ 27148:39163708825c

commit: preserve extra when amending with commit --amend The new extra propagation needs to be accounted for in cmdutil.amend, when checking for a no-changes fast-path.
author Mike Edgar <adgar@google.com>
date Sat, 28 Nov 2015 04:11:57 -0500
parents 804abe8999f3
children 3fe8cb40c9c5
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Nov 28 04:11:38 2015 -0500
+++ b/mercurial/commands.py	Sat Nov 28 04:11:57 2015 -0500
@@ -1617,6 +1617,9 @@
         if not allowunstable and old.children():
             raise error.Abort(_('cannot amend changeset with children'))
 
+        newextra = extra.copy()
+        newextra['branch'] = branch
+        extra = newextra
         # commitfunc is used only for temporary amend commit by cmdutil.amend
         def commitfunc(ui, repo, message, match, opts):
             return repo.commit(message,