diff mercurial/cmdutil.py @ 17863:034e55bbf7c0 stable

amend: fix incompatibity between logfile and message option (issue3675) Bug introduced by 9732473aa24b
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 24 Oct 2012 15:37:32 +0200
parents 578fcc22b469
children 8f85151ce201
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Oct 24 11:51:24 2012 +0200
+++ b/mercurial/cmdutil.py	Wed Oct 24 15:37:32 2012 +0200
@@ -1611,6 +1611,10 @@
             # 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)
+            # ensure logfile does not conflict with later enforcement of the
+            # message. potential logfile content has been processed by
+            # `logmessage` anyway.
+            opts.pop('logfile')
             # First, do a regular commit to record all changes in the working
             # directory (if there are any)
             ui.callhooks = False