hgext/blackbox.py
changeset 34299 b1d4ac068961
parent 34276 b90bd9a98c8b
child 34300 e6723c939344
--- a/hgext/blackbox.py	Mon Sep 11 20:07:41 2017 -0400
+++ b/hgext/blackbox.py	Thu Sep 21 11:03:37 2017 -0700
@@ -77,9 +77,13 @@
     class blackboxui(ui.__class__):
         @property
         def _bbvfs(self):
+            vfs = None
             repo = getattr(self, '_bbrepo', None)
             if repo:
-                return repo.vfs
+                vfs = repo.vfs
+                if not vfs.isdir('.'):
+                    vfs = None
+            return vfs
 
         @util.propertycache
         def track(self):
@@ -136,6 +140,10 @@
 
             if not ui:
                 return
+            vfs = ui._bbvfs
+            if not vfs:
+                return
+
             repo = getattr(ui, '_bbrepo', None)
             if not lastui or repo:
                 lastui = ui