[PATCH 3 of 5] blackbox: simply update global lastui variable at once

Yuya Nishihara yuya at tcha.org
Wed Nov 14 08:32:40 EST 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1541922209 -32400
#      Sun Nov 11 16:43:29 2018 +0900
# Node ID ac34d1daab7fddeafc6a9f171965f82c24c40759
# Parent  e5def171282a30ea82bad7b5319308d655224685
blackbox: simply update global lastui variable at once

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -156,7 +156,7 @@ def wrapui(ui):
                 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 @@ def wrapui(ui):
 
             vfs = ui._bbvfs
             repo = ui._bbrepo
-            lastui = ui
 
             if getattr(ui, '_bbinlog', False):
                 # recursion and failure guard


More information about the Mercurial-devel mailing list