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