Mercurial > hg
changeset 29475:fb7fc877ed17
rebase: move local variable 'currentbookmarks' to the RR class
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Fri, 01 Jul 2016 14:09:53 +0200 |
parents | 56641501adde |
children | 48188ceb3c43 |
files | hgext/rebase.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Jul 01 14:09:53 2016 +0200 +++ b/hgext/rebase.py Fri Jul 01 14:09:53 2016 +0200 @@ -135,6 +135,7 @@ # dict will be what contains most of the rebase progress state. self.state = {} self.activebookmark = None + self.currentbookmarks = None self.target = None self.skipped = set() self.targetancestors = set() @@ -492,7 +493,7 @@ inclusive=True) # Keep track of the current bookmarks in order to reset them later - currentbookmarks = repo._bookmarks.copy() + rbsrt.currentbookmarks = repo._bookmarks.copy() rbsrt.activebookmark = rbsrt.activebookmark or repo._activebookmark if rbsrt.activebookmark: bookmarks.deactivate(repo) @@ -616,7 +617,7 @@ if 'qtip' in repo.tags(): updatemq(repo, rbsrt.state, rbsrt.skipped, **opts) - if currentbookmarks: + if rbsrt.currentbookmarks: # Nodeids are needed to reset bookmarks nstate = {} for k, v in rbsrt.state.iteritems(): @@ -648,8 +649,9 @@ clearrebased(ui, repo, rbsrt.state, rbsrt.skipped, collapsedas) with repo.transaction('bookmark') as tr: - if currentbookmarks: - updatebookmarks(repo, targetnode, nstate, currentbookmarks, tr) + if rbsrt.currentbookmarks: + updatebookmarks(repo, targetnode, nstate, + rbsrt.currentbookmarks, tr) if rbsrt.activebookmark not in repo._bookmarks: # active bookmark was divergent one and has been deleted rbsrt.activebookmark = None