Mercurial > public > mercurial-scm > hg
diff hgext/rebase.py @ 21410:5b70ece79ea7
rebase: use "getcommiteditor()" instead of explicit editor choice
This patch also enhances "test-rebase-scenario-global.t", because "hg
rebase" hasn't been explicitly tested around editor invocation and
"--edit" option.
In the other hand, this patch doesn't enhance tests in "hg rebase
--collapse" case, because it is already tested in
"test-rebase-collapse.t".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 11 May 2014 00:49:35 +0900 |
parents | 799c494189a9 |
children | 3b40e32e88c3 |
line wrap: on
line diff
--- a/hgext/rebase.py Sun May 11 00:49:35 2014 +0900 +++ b/hgext/rebase.py Sun May 11 00:49:35 2014 +0900 @@ -138,9 +138,7 @@ skipped = set() targetancestors = set() - editor = None - if opts.get('edit'): - editor = cmdutil.commitforceeditor + editor = cmdutil.getcommiteditor(**opts) lock = wlock = None try: @@ -376,7 +374,7 @@ for rebased in state: if rebased not in skipped and state[rebased] > nullmerge: commitmsg += '\n* %s' % repo[rebased].description() - editor = cmdutil.commitforceeditor + editor = cmdutil.getcommiteditor(edit=True) newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, extrafn=extrafn, editor=editor) for oldrev in state.iterkeys():