FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 11 May 2014 00:49:36 +0900] rev 21421
mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qnew)
This patch also replaces "editor = False" by "editor =
cmdutil.getcommiteditor()", because:
- the latter allows to hook commit message determination easily,
even in the case without "--edit"
- the latter can avoid regression (or additional care) around saving
"last-message.txt", even if MQ's "newcommit()" changes its
implementation logic from "localrepository.commit" to
"localrepository.commitctx" with "memctx" in the future
to save commit message into "last-messge.txt" with "memctx",
"editor" should be valid function.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 11 May 2014 00:49:36 +0900] rev 21420
mq: fold the code path to invoke editor into specific logic (qnew)
This factoring simplifies the succeeding patch to switch from
"ui.edit()" to "getcommiteditor()" for qnew.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 11 May 2014 00:49:36 +0900] rev 21419
cmdutil: enhance "getcommiteditor()" for specific usages in MQ
This patch introduces "finishdesc" and "extramsg" arguments into
"getcommiteditor()" for specific usages in MQ.
"finishdesc" will be used to treat the commit message as "[mq];
patch-file-name" (default MQ commit message), if it is left as empty,
instead of aborting commit process.
"extramsg" will be used to show the line below:
HG: Leave message empty to use default message
instead of:
HG: Leave message empty to abort commit
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 11 May 2014 00:49:36 +0900] rev 21418
tag: use the editor gotten by "getcommiteditor()" instead of "ui.edit()"
This patch also enhances "test-tag.t", because "hg tag" hasn't been
explicitly tested around editor invocation and "--edit" option.