mercurial/commands.py
changeset 21412 6f6ccb0bb6af
parent 21404 ca275f7ec576
child 21413 edc55317de90
--- a/mercurial/commands.py	Sun May 11 00:49:35 2014 +0900
+++ b/mercurial/commands.py	Sun May 11 00:49:35 2014 +0900
@@ -487,13 +487,12 @@
             cmdutil.revert(ui, repo, rctx, repo.dirstate.parents())
 
 
-        e = cmdutil.commiteditor
-        if not opts['message'] and not opts['logfile']:
-            # we don't translate commit messages
-            opts['message'] = "Backed out changeset %s" % short(node)
-            e = cmdutil.commitforceeditor
-
         def commitfunc(ui, repo, message, match, opts):
+            e = cmdutil.commiteditor
+            if not message:
+                # we don't translate commit messages
+                message = "Backed out changeset %s" % short(node)
+                e = cmdutil.commitforceeditor
             return repo.commit(message, opts.get('user'), opts.get('date'),
                                match, editor=e)
         newnode = cmdutil.commit(ui, repo, commitfunc, [], opts)