diff mercurial/commands.py @ 21413:edc55317de90

backout: use "getcommiteditor()" instead of explicit editor choice This patch also enhances "test-backout.t", because "hg backout" hasn't been explicitly tested around editor invocation and '--edit' option.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 11 May 2014 00:49:36 +0900
parents 6f6ccb0bb6af
children 37a302f0e297
line wrap: on
line diff
--- a/mercurial/commands.py	Sun May 11 00:49:35 2014 +0900
+++ b/mercurial/commands.py	Sun May 11 00:49:36 2014 +0900
@@ -488,11 +488,11 @@
 
 
         def commitfunc(ui, repo, message, match, opts):
-            e = cmdutil.commiteditor
+            e = cmdutil.getcommiteditor()
             if not message:
                 # we don't translate commit messages
                 message = "Backed out changeset %s" % short(node)
-                e = cmdutil.commitforceeditor
+                e = cmdutil.getcommiteditor(edit=True)
             return repo.commit(message, opts.get('user'), opts.get('date'),
                                match, editor=e)
         newnode = cmdutil.commit(ui, repo, commitfunc, [], opts)