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

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 14, 2018, 1:32 p.m.
Message ID <ac34d1daab7fddeafc6a.1542202360@mimosa>
Download mbox | patch
Permalink /patch/36575/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 14, 2018, 1:32 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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

Patch

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