# HG changeset patch # User FUJIWARA Katsunori # Date 2014-05-05 12:26:40 # Node ID 19d98da5c01893e7782da52dc5768c32ac99a58b # Parent 25d6fdc0294a5d6accabc7696cb97a0569688ae9 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 @@ def collapse(repo, first, last, commitop 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):