Show More
@@ -392,17 +392,17 b' def rebase(ui, repo, **opts):' | |||
|
392 | 392 | merging = repo[p2].rev() != nullrev |
|
393 | 393 | editform = cmdutil.mergeeditform(merging, 'rebase') |
|
394 | 394 | editor = cmdutil.getcommiteditor(editform=editform, **opts) |
|
395 |
new |
|
|
396 | editor=editor) | |
|
395 | newnode = concludenode(repo, rev, p1, p2, extrafn=extrafn, | |
|
396 | editor=editor) | |
|
397 | 397 | else: |
|
398 | 398 | # Skip commit if we are collapsing |
|
399 | 399 | repo.dirstate.beginparentchange() |
|
400 | 400 | repo.setparents(repo[p1].node()) |
|
401 | 401 | repo.dirstate.endparentchange() |
|
402 |
new |
|
|
402 | newnode = None | |
|
403 | 403 | # Update the state |
|
404 |
if new |
|
|
405 |
state[rev] = repo[new |
|
|
404 | if newnode is not None: | |
|
405 | state[rev] = repo[newnode].rev() | |
|
406 | 406 | else: |
|
407 | 407 | if not collapsef: |
|
408 | 408 | ui.note(_('no changes, revision %d skipped\n') % rev) |
@@ -427,11 +427,11 b' def rebase(ui, repo, **opts):' | |||
|
427 | 427 | commitmsg += '\n* %s' % repo[rebased].description() |
|
428 | 428 | editopt = True |
|
429 | 429 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
|
430 |
new |
|
|
431 | extrafn=extrafn, editor=editor) | |
|
430 | newnode = concludenode(repo, rev, p1, external, commitmsg=commitmsg, | |
|
431 | extrafn=extrafn, editor=editor) | |
|
432 | 432 | for oldrev in state.iterkeys(): |
|
433 | 433 | if state[oldrev] > nullmerge: |
|
434 |
state[oldrev] = new |
|
|
434 | state[oldrev] = newnode | |
|
435 | 435 | |
|
436 | 436 | if 'qtip' in repo.tags(): |
|
437 | 437 | updatemq(repo, state, skipped, **opts) |
@@ -459,7 +459,7 b' def rebase(ui, repo, **opts):' | |||
|
459 | 459 | if not keepf: |
|
460 | 460 | collapsedas = None |
|
461 | 461 | if collapsef: |
|
462 |
collapsedas = new |
|
|
462 | collapsedas = newnode | |
|
463 | 463 | clearrebased(ui, repo, state, skipped, collapsedas) |
|
464 | 464 | |
|
465 | 465 | if currentbookmarks: |
@@ -505,7 +505,8 b' def externalparent(repo, state, targetan' | |||
|
505 | 505 | ', '.join(str(p) for p in sorted(parents)))) |
|
506 | 506 | |
|
507 | 507 | def concludenode(repo, rev, p1, p2, commitmsg=None, editor=None, extrafn=None): |
|
508 |
'Commit the changes and store useful information in extra |
|
|
508 | '''Commit the changes and store useful information in extra. | |
|
509 | Return node of committed revision.''' | |
|
509 | 510 | try: |
|
510 | 511 | repo.dirstate.beginparentchange() |
|
511 | 512 | repo.setparents(repo[p1].node(), repo[p2].node()) |
@@ -522,13 +523,13 b' def concludenode(repo, rev, p1, p2, comm' | |||
|
522 | 523 | targetphase = max(ctx.phase(), phases.draft) |
|
523 | 524 | repo.ui.setconfig('phases', 'new-commit', targetphase, 'rebase') |
|
524 | 525 | # Commit might fail if unresolved files exist |
|
525 |
new |
|
|
526 | date=ctx.date(), extra=extra, editor=editor) | |
|
526 | newnode = repo.commit(text=commitmsg, user=ctx.user(), | |
|
527 | date=ctx.date(), extra=extra, editor=editor) | |
|
527 | 528 | finally: |
|
528 | 529 | repo.ui.restoreconfig(backup) |
|
529 | 530 | |
|
530 |
repo.dirstate.setbranch(repo[new |
|
|
531 |
return new |
|
|
531 | repo.dirstate.setbranch(repo[newnode].branch()) | |
|
532 | return newnode | |
|
532 | 533 | except util.Abort: |
|
533 | 534 | # Invalidate the previous setparents |
|
534 | 535 | repo.dirstate.invalidate() |
General Comments 0
You need to be logged in to leave comments.
Login now