comparison 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
comparison
equal deleted inserted replaced
22205:9fa429723f26 22206:6122ad50e38f
374 ui.note(_('rebase merging completed\n')) 374 ui.note(_('rebase merging completed\n'))
375 375
376 if collapsef and not keepopen: 376 if collapsef and not keepopen:
377 p1, p2 = defineparents(repo, min(state), target, 377 p1, p2 = defineparents(repo, min(state), target,
378 state, targetancestors) 378 state, targetancestors)
379 editopt = opts.get('edit')
380 editform = 'rebase.collapse'
379 if collapsemsg: 381 if collapsemsg:
380 commitmsg = collapsemsg 382 commitmsg = collapsemsg
381 else: 383 else:
382 commitmsg = 'Collapsed revision' 384 commitmsg = 'Collapsed revision'
383 for rebased in state: 385 for rebased in state:
384 if rebased not in skipped and state[rebased] > nullmerge: 386 if rebased not in skipped and state[rebased] > nullmerge:
385 commitmsg += '\n* %s' % repo[rebased].description() 387 commitmsg += '\n* %s' % repo[rebased].description()
386 editform = 'rebase.collapse' 388 editopt = True
387 editor = cmdutil.getcommiteditor(edit=True, editform=editform) 389 editor = cmdutil.getcommiteditor(edit=editopt, editform=editform)
388 newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg, 390 newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
389 extrafn=extrafn, editor=editor) 391 extrafn=extrafn, editor=editor)
390 for oldrev in state.iterkeys(): 392 for oldrev in state.iterkeys():
391 if state[oldrev] > nullmerge: 393 if state[oldrev] > nullmerge:
392 state[oldrev] = newrev 394 state[oldrev] = newrev