blackbox: simply update global lastui variable at once
authorYuya Nishihara <yuya@tcha.org>
Sun, 11 Nov 2018 16:43:29 +0900
changeset 40632 da3bc2f54b02
parent 40631 345cdb93851b
child 40633 4a38a67d0e96
blackbox: simply update global lastui variable at once
hgext/blackbox.py
--- a/hgext/blackbox.py	Sun Nov 11 16:38:43 2018 +0900
+++ b/hgext/blackbox.py	Sun Nov 11 16:43:29 2018 +0900
@@ -156,7 +156,7 @@
                 return
 
             if self._bbvfs:
-                ui = self
+                ui = lastui = self
             elif lastui and lastui._bbvfs:
                 # certain ui instances exist outside the context of
                 # a repo, so just default to the last blackbox that
@@ -167,7 +167,6 @@
 
             vfs = ui._bbvfs
             repo = ui._bbrepo
-            lastui = ui
 
             if getattr(ui, '_bbinlog', False):
                 # recursion and failure guard