From patchwork Mon May 5 12:33:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [7, of, 9] histedit: pass "editor" argument to "memctx.__init__()" for "collapse" command From: Katsunori FUJIWARA X-Patchwork-Id: 4639 Message-Id: <66ca0c1187fd5bb4b959.1399293187@feefifofum> To: mercurial-devel@selenic.com Date: Mon, 05 May 2014 21:33:07 +0900 # HG changeset patch # User FUJIWARA Katsunori # Date 1399292800 -32400 # Mon May 05 21:26:40 2014 +0900 # Branch stable # Node ID 66ca0c1187fd5bb4b959d38aef3b21892ebd0b15 # Parent cd4a83a83ed9f038645cdab9d710b3ca0a4eb481 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. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -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):