hgext/blackbox.py
changeset 40648 85372dc0cca3
parent 40647 6d9a87fb8c89
child 40730 55b053af7196
--- a/hgext/blackbox.py	Sun Nov 11 17:25:34 2018 +0900
+++ b/hgext/blackbox.py	Sun Nov 11 17:29:46 2018 +0900
@@ -131,7 +131,7 @@
     def __init__(self, ui):
         self._repo = None
         self._inlog = False
-        self.track = ui.configlist('blackbox', 'track')
+        self._trackedevents = set(ui.configlist('blackbox', 'track'))
 
     @property
     def _bbvfs(self):
@@ -142,9 +142,12 @@
                 vfs = None
         return vfs
 
+    def tracked(self, event):
+        return b'*' in self._trackedevents or event in self._trackedevents
+
     def log(self, ui, event, msg, opts):
         global _lastlogger
-        if not '*' in self.track and not event in self.track:
+        if not self.tracked(event):
             return
 
         if self._bbvfs: