diff hgext/rebase.py @ 20766:95aab23a806b stable

rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse" Before this patch, "rebase --collapse --edit" without "--message" and "--logfile" invokes editor twice unexpectedly: 1. explicit "ui.edit()" invocation in rebase extension itself 2. indirect invocation in "localrepository.commit()" with "editor = commitforceeditor" assigned by "--edit" option This patch uses indirect "commitforceeditor" invocation instead of "ui.edit()" for "--collapse" without "--message" and "--logfile" to: - suppress redundant the former invocation - ensure editor invocation even when "--edit" is not specified
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 19 Mar 2014 01:07:41 +0900
parents f2a0a0e76b4c
children efbf15979538
line wrap: on
line diff
--- a/hgext/rebase.py	Wed Mar 19 01:07:41 2014 +0900
+++ b/hgext/rebase.py	Wed Mar 19 01:07:41 2014 +0900
@@ -369,7 +369,7 @@
                 for rebased in state:
                     if rebased not in skipped and state[rebased] > nullmerge:
                         commitmsg += '\n* %s' % repo[rebased].description()
-                commitmsg = ui.edit(commitmsg, repo.ui.username())
+                editor = cmdutil.commitforceeditor
             newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
                                   extrafn=extrafn, editor=editor)
             for oldrev in state.iterkeys():