[PATCH 19 of 23 v3] rebase: move local variable 'currentbookmarks' to the RRS class
Kostia Balytskyi
ikostia at fb.com
Thu Jun 2 10:14:00 EDT 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1464872430 -3600
# Thu Jun 02 14:00:30 2016 +0100
# Node ID 40f1a9d56e1b7456a3dc0c353bb498b42bd53e0a
# Parent 89e2e7ca613afbb1b7c2441dc60ee562ec11aaf9
rebase: move local variable 'currentbookmarks' to the RRS class
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -134,6 +134,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()
@@ -496,7 +497,7 @@
inclusive=True)
# Keep track of the current bookmarks in order to reset them later
- currentbookmarks = repo._bookmarks.copy()
+ rtstate.currentbookmarks = repo._bookmarks.copy()
rtstate.activebookmark = rtstate.activebookmark or repo._activebookmark
if rtstate.activebookmark:
bookmarks.deactivate(repo)
@@ -620,7 +621,7 @@
if 'qtip' in repo.tags():
updatemq(repo, rtstate.state, rtstate.skipped, **opts)
- if currentbookmarks:
+ if rtstate.currentbookmarks:
# Nodeids are needed to reset bookmarks
nstate = {}
for k, v in rtstate.state.iteritems():
@@ -647,8 +648,9 @@
clearrebased(ui, repo, rtstate.state, rtstate.skipped, collapsedas)
with repo.transaction('bookmark') as tr:
- if currentbookmarks:
- updatebookmarks(repo, targetnode, nstate, currentbookmarks, tr)
+ if rtstate.currentbookmarks:
+ updatebookmarks(repo, targetnode, nstate,
+ rtstate.currentbookmarks, tr)
if rtstate.activebookmark not in repo._bookmarks:
# active bookmark was divergent one and has been deleted
rtstate.activebookmark = None
More information about the Mercurial-devel
mailing list