Show More
@@ -448,6 +448,36 b' class rebaseruntime(object):' | |||||
448 | ui.progress(_('rebasing'), None) |
|
448 | ui.progress(_('rebasing'), None) | |
449 | ui.note(_('rebase merging completed\n')) |
|
449 | ui.note(_('rebase merging completed\n')) | |
450 |
|
450 | |||
|
451 | def _concludenode(self, rev, p1, p2, editor, commitmsg=None): | |||
|
452 | '''Commit the wd changes with parents p1 and p2. | |||
|
453 | ||||
|
454 | Reuse commit info from rev but also store useful information in extra. | |||
|
455 | Return node of committed revision.''' | |||
|
456 | repo = self.repo | |||
|
457 | if self.inmemory: | |||
|
458 | newnode = concludememorynode(repo, rev, p1, p2, | |||
|
459 | wctx=self.wctx, | |||
|
460 | extrafn=_makeextrafn(self.extrafns), | |||
|
461 | commitmsg=commitmsg, | |||
|
462 | editor=editor, | |||
|
463 | keepbranches=self.keepbranchesf, | |||
|
464 | date=self.date) | |||
|
465 | mergemod.mergestate.clean(repo) | |||
|
466 | else: | |||
|
467 | newnode = concludenode(repo, rev, p1, p2, | |||
|
468 | extrafn=_makeextrafn(self.extrafns), | |||
|
469 | commitmsg=commitmsg, | |||
|
470 | editor=editor, | |||
|
471 | keepbranches=self.keepbranchesf, | |||
|
472 | date=self.date) | |||
|
473 | ||||
|
474 | if newnode is None: | |||
|
475 | # If it ended up being a no-op commit, then the normal | |||
|
476 | # merge state clean-up path doesn't happen, so do it | |||
|
477 | # here. Fix issue5494 | |||
|
478 | mergemod.mergestate.clean(repo) | |||
|
479 | return newnode | |||
|
480 | ||||
451 | def _rebasenode(self, tr, rev, allowdivergence, progressfn): |
|
481 | def _rebasenode(self, tr, rev, allowdivergence, progressfn): | |
452 | repo, ui, opts = self.repo, self.ui, self.opts |
|
482 | repo, ui, opts = self.repo, self.ui, self.opts | |
453 | dest = self.destmap[rev] |
|
483 | dest = self.destmap[rev] | |
@@ -503,26 +533,7 b' class rebaseruntime(object):' | |||||
503 | editform = cmdutil.mergeeditform(merging, 'rebase') |
|
533 | editform = cmdutil.mergeeditform(merging, 'rebase') | |
504 | editor = cmdutil.getcommiteditor(editform=editform, |
|
534 | editor = cmdutil.getcommiteditor(editform=editform, | |
505 | **pycompat.strkwargs(opts)) |
|
535 | **pycompat.strkwargs(opts)) | |
506 | if self.inmemory: |
|
536 | newnode = self._concludenode(rev, p1, p2, editor) | |
507 | newnode = concludememorynode(repo, rev, p1, p2, |
|
|||
508 | wctx=self.wctx, |
|
|||
509 | extrafn=_makeextrafn(self.extrafns), |
|
|||
510 | editor=editor, |
|
|||
511 | keepbranches=self.keepbranchesf, |
|
|||
512 | date=self.date) |
|
|||
513 | mergemod.mergestate.clean(repo) |
|
|||
514 | else: |
|
|||
515 | newnode = concludenode(repo, rev, p1, p2, |
|
|||
516 | extrafn=_makeextrafn(self.extrafns), |
|
|||
517 | editor=editor, |
|
|||
518 | keepbranches=self.keepbranchesf, |
|
|||
519 | date=self.date) |
|
|||
520 |
|
||||
521 | if newnode is None: |
|
|||
522 | # If it ended up being a no-op commit, then the normal |
|
|||
523 | # merge state clean-up path doesn't happen, so do it |
|
|||
524 | # here. Fix issue5494 |
|
|||
525 | mergemod.mergestate.clean(repo) |
|
|||
526 | else: |
|
537 | else: | |
527 | # Skip commit if we are collapsing |
|
538 | # Skip commit if we are collapsing | |
528 | if self.inmemory: |
|
539 | if self.inmemory: | |
@@ -572,27 +583,9 b' class rebaseruntime(object):' | |||||
572 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) |
|
583 | editor = cmdutil.getcommiteditor(edit=editopt, editform=editform) | |
573 | revtoreuse = max(self.state) |
|
584 | revtoreuse = max(self.state) | |
574 |
|
585 | |||
575 | if self.inmemory: |
|
586 | newnode = self._concludenode(revtoreuse, p1, self.external, | |
576 | newnode = concludememorynode(repo, revtoreuse, p1, |
|
587 | editor, commitmsg=commitmsg) | |
577 | self.external, |
|
|||
578 | commitmsg=commitmsg, |
|
|||
579 | extrafn=_makeextrafn(self.extrafns), |
|
|||
580 | editor=editor, |
|
|||
581 | keepbranches=self.keepbranchesf, |
|
|||
582 | date=self.date, wctx=self.wctx) |
|
|||
583 | else: |
|
|||
584 | newnode = concludenode(repo, revtoreuse, p1, self.external, |
|
|||
585 | commitmsg=commitmsg, |
|
|||
586 | extrafn=_makeextrafn(self.extrafns), |
|
|||
587 | editor=editor, |
|
|||
588 | keepbranches=self.keepbranchesf, |
|
|||
589 | date=self.date) |
|
|||
590 |
|
588 | |||
591 | if newnode is None: |
|
|||
592 | # If it ended up being a no-op commit, then the normal |
|
|||
593 | # merge state clean-up path doesn't happen, so do it |
|
|||
594 | # here. Fix issue5494 |
|
|||
595 | mergemod.mergestate.clean(repo) |
|
|||
596 | if newnode is not None: |
|
589 | if newnode is not None: | |
597 | newrev = repo[newnode].rev() |
|
590 | newrev = repo[newnode].rev() | |
598 | for oldrev in self.state: |
|
591 | for oldrev in self.state: |
General Comments 0
You need to be logged in to leave comments.
Login now