##// END OF EJS Templates
rebase: use "rebase.collapse" as "editform" for "--collapse" always...
FUJIWARA Katsunori -
r22206:6122ad50 default
parent child Browse files
Show More
@@ -376,6 +376,8 b' def rebase(ui, repo, **opts):'
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:
@@ -383,8 +385,8 b' def rebase(ui, repo, **opts):'
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():
@@ -148,7 +148,12 b' Rebasing G onto H with custom message:'
148 abort: message can only be specified with collapse
148 abort: message can only be specified with collapse
149 [255]
149 [255]
150
150
151 $ hg rebase --source 4 --collapse -m 'custom message'
151 $ cat > $TESTTMP/checkeditform.sh <<EOF
152 > env | grep HGEDITFORM
153 > true
154 > EOF
155 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg rebase --source 4 --collapse -m 'custom message' -e
156 HGEDITFORM=rebase.collapse
152 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
157 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
153
158
154 $ hg tglog
159 $ hg tglog
General Comments 0
You need to be logged in to leave comments. Login now