histedit: pass "editor" argument to "memctx.__init__()" for "collapse" command
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 05 May 2014 21:26:40 +0900
changeset 21239 19d98da5c018
parent 21238 25d6fdc0294a
child 21240 1a833fcf5a14
histedit: pass "editor" argument to "memctx.__init__()" for "collapse" command The preceding patch causes that "memctx.__init__()" with "editor" argument invokes editor and saves edited commit message into ".hg/last-message.txt". This patch passes "editor" argument to "memctx.__init__()" instead of explicit invocations of "commitforceeditor()" and "savecommitmessage()" for "collapse" command.
hgext/histedit.py
--- a/hgext/histedit.py	Mon May 05 21:26:40 2014 +0900
+++ b/hgext/histedit.py	Mon May 05 21:26:40 2014 +0900
@@ -298,9 +298,8 @@
                          filectxfn=filectxfn,
                          user=user,
                          date=date,
-                         extra=extra)
-    new._text = cmdutil.commitforceeditor(repo, new, [])
-    repo.savecommitmessage(new.description())
+                         extra=extra,
+                         editor=cmdutil.commitforceeditor)
     return repo.commitctx(new)
 
 def pick(ui, repo, ctx, ha, opts):