backout: pass 'editform' argument to 'cmdutil.getcommiteditor'
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sat, 02 Aug 2014 21:46:27 +0900
changeset 22007 a5bb0c4001ae
parent 22006 7e71a65bf94f
child 22008 b02ab548ab5c
backout: pass 'editform' argument to 'cmdutil.getcommiteditor' This patch passes 'editform' argument according to the format below: COMMAND[.ROUTE] - ROUTE: name of route, if there are two or more routes in COMMAND In this patch, ROUTE is omitted..
mercurial/commands.py
--- a/mercurial/commands.py	Sat Aug 02 21:46:26 2014 +0900
+++ b/mercurial/commands.py	Sat Aug 02 21:46:27 2014 +0900
@@ -505,11 +505,12 @@
 
 
         def commitfunc(ui, repo, message, match, opts):
-            e = cmdutil.getcommiteditor(**opts)
+            editform = 'backout'
+            e = cmdutil.getcommiteditor(editform=editform, **opts)
             if not message:
                 # we don't translate commit messages
                 message = "Backed out changeset %s" % short(node)
-                e = cmdutil.getcommiteditor(edit=True)
+                e = cmdutil.getcommiteditor(edit=True, editform=editform)
             return repo.commit(message, opts.get('user'), opts.get('date'),
                                match, editor=e)
         newnode = cmdutil.commit(ui, repo, commitfunc, [], opts)