Mercurial > hg
diff hgext/rebase.py @ 22206:6122ad50e38f
rebase: use "rebase.collapse" as "editform" for "--collapse" always
Before this patch, if both "--message" and "--collapse" are specified
for "hg rebase", "rebaes.normal" is used as "editform" unexpectedly.
Unlike patches before and after in this series for improvement, this
is bug fix patch.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 15 Aug 2014 23:05:53 +0900 |
parents | 021becbf024a |
children | d0d3e5c6eb3c |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Aug 15 23:05:53 2014 +0900 +++ b/hgext/rebase.py Fri Aug 15 23:05:53 2014 +0900 @@ -376,6 +376,8 @@ if collapsef and not keepopen: p1, p2 = defineparents(repo, min(state), target, state, targetancestors) + editopt = opts.get('edit') + editform = 'rebase.collapse' if collapsemsg: commitmsg = collapsemsg else: @@ -383,8 +385,8 @@ for rebased in state: if rebased not in skipped and state[rebased] > nullmerge: commitmsg += '\n* %s' % repo[rebased].description() - editform = 'rebase.collapse' - editor = cmdutil.getcommiteditor(edit=True, editform=editform) + editopt = True + editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, extrafn=extrafn, editor=editor) for oldrev in state.iterkeys():