##// END OF EJS Templates
rebase: remove now-unnecessary arguments to _abort()...
Martin von Zweigbergk -
r40892:2041991f default
parent child Browse files
Show More
@@ -347,9 +347,7 b' class rebaseruntime(object):'
347
347
348 if isabort:
348 if isabort:
349 backup = backup and self.backupf
349 backup = backup and self.backupf
350 return self._abort(self.repo, self.originalwd, self.destmap,
350 return self._abort(backup=backup, suppwarns=suppwarns)
351 self.state, activebookmark=self.activebookmark,
352 backup=backup, suppwarns=suppwarns)
353
351
354 def _preparenewrebase(self, destmap):
352 def _preparenewrebase(self, destmap):
355 if not destmap:
353 if not destmap:
@@ -653,20 +651,17 b' class rebaseruntime(object):'
653 repo['.'].node() == repo._bookmarks[self.activebookmark]):
651 repo['.'].node() == repo._bookmarks[self.activebookmark]):
654 bookmarks.activate(repo, self.activebookmark)
652 bookmarks.activate(repo, self.activebookmark)
655
653
656 def _abort(self, repo, originalwd, destmap, state, activebookmark=None,
654 def _abort(self, backup=True, suppwarns=False):
657 backup=True, suppwarns=False):
655 '''Restore the repository to its original state.'''
658 '''Restore the repository to its original state. Additional args:
659
656
660 activebookmark: the name of the bookmark that should be active after the
657 repo = self.repo
661 restore'''
662
663 try:
658 try:
664 # If the first commits in the rebased set get skipped during the
659 # If the first commits in the rebased set get skipped during the
665 # rebase, their values within the state mapping will be the dest
660 # rebase, their values within the state mapping will be the dest
666 # rev id. The rebased list must must not contain the dest rev
661 # rev id. The rebased list must must not contain the dest rev
667 # (issue4896)
662 # (issue4896)
668 rebased = [s for r, s in state.items()
663 rebased = [s for r, s in self.state.items()
669 if s >= 0 and s != r and s != destmap[r]]
664 if s >= 0 and s != r and s != self.destmap[r]]
670 immutable = [d for d in rebased if not repo[d].mutable()]
665 immutable = [d for d in rebased if not repo[d].mutable()]
671 cleanup = True
666 cleanup = True
672 if immutable:
667 if immutable:
@@ -690,21 +685,21 b' class rebaseruntime(object):'
690 c.node() for c in repo.set('roots(%ld)', rebased)]
685 c.node() for c in repo.set('roots(%ld)', rebased)]
691
686
692 updateifonnodes = set(rebased)
687 updateifonnodes = set(rebased)
693 updateifonnodes.update(destmap.values())
688 updateifonnodes.update(self.destmap.values())
694 updateifonnodes.add(originalwd)
689 updateifonnodes.add(self.originalwd)
695 shouldupdate = repo['.'].rev() in updateifonnodes
690 shouldupdate = repo['.'].rev() in updateifonnodes
696
691
697 # Update away from the rebase if necessary
692 # Update away from the rebase if necessary
698 if shouldupdate or needupdate(repo, state):
693 if shouldupdate or needupdate(repo, self.state):
699 mergemod.update(repo, originalwd, branchmerge=False,
694 mergemod.update(repo, self.originalwd, branchmerge=False,
700 force=True)
695 force=True)
701
696
702 # Strip from the first rebased revision
697 # Strip from the first rebased revision
703 if rebased:
698 if rebased:
704 repair.strip(repo.ui, repo, strippoints, backup=backup)
699 repair.strip(repo.ui, repo, strippoints, backup=backup)
705
700
706 if activebookmark and activebookmark in repo._bookmarks:
701 if self.activebookmark and self.activebookmark in repo._bookmarks:
707 bookmarks.activate(repo, activebookmark)
702 bookmarks.activate(repo, self.activebookmark)
708
703
709 finally:
704 finally:
710 clearstatus(repo)
705 clearstatus(repo)
General Comments 0
You need to be logged in to leave comments. Login now