##// END OF EJS Templates
rebase: move local variable 'currentbookmarks' to the RR class
Kostia Balytskyi -
r29475:fb7fc877 default
parent child Browse files
Show More
@@ -135,6 +135,7 b' class rebaseruntime(object):'
135 135 # dict will be what contains most of the rebase progress state.
136 136 self.state = {}
137 137 self.activebookmark = None
138 self.currentbookmarks = None
138 139 self.target = None
139 140 self.skipped = set()
140 141 self.targetancestors = set()
@@ -492,7 +493,7 b' def rebase(ui, repo, **opts):'
492 493 inclusive=True)
493 494
494 495 # Keep track of the current bookmarks in order to reset them later
495 currentbookmarks = repo._bookmarks.copy()
496 rbsrt.currentbookmarks = repo._bookmarks.copy()
496 497 rbsrt.activebookmark = rbsrt.activebookmark or repo._activebookmark
497 498 if rbsrt.activebookmark:
498 499 bookmarks.deactivate(repo)
@@ -616,7 +617,7 b' def rebase(ui, repo, **opts):'
616 617 if 'qtip' in repo.tags():
617 618 updatemq(repo, rbsrt.state, rbsrt.skipped, **opts)
618 619
619 if currentbookmarks:
620 if rbsrt.currentbookmarks:
620 621 # Nodeids are needed to reset bookmarks
621 622 nstate = {}
622 623 for k, v in rbsrt.state.iteritems():
@@ -648,8 +649,9 b' def rebase(ui, repo, **opts):'
648 649 clearrebased(ui, repo, rbsrt.state, rbsrt.skipped, collapsedas)
649 650
650 651 with repo.transaction('bookmark') as tr:
651 if currentbookmarks:
652 updatebookmarks(repo, targetnode, nstate, currentbookmarks, tr)
652 if rbsrt.currentbookmarks:
653 updatebookmarks(repo, targetnode, nstate,
654 rbsrt.currentbookmarks, tr)
653 655 if rbsrt.activebookmark not in repo._bookmarks:
654 656 # active bookmark was divergent one and has been deleted
655 657 rbsrt.activebookmark = None
General Comments 0
You need to be logged in to leave comments. Login now