D6611: blackbox: disable extremely verbose logging (issue6110)

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Sun Jul 7 16:14:01 UTC 2019


valentin.gatienbaron created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is maybe not the best way to go about fixing this, but anything
  is better than the status quo.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6611

AFFECTED FILES
  hgext/blackbox.py

CHANGE DETAILS

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -94,12 +94,14 @@
     def __init__(self, ui, repo):
         self._repo = repo
         self._trackedevents = set(ui.configlist('blackbox', 'track'))
+        self._untrackedevents = {'chgserver', 'cmdserver', 'extension'}
         self._maxfiles = ui.configint('blackbox', 'maxfiles')
         self._maxsize = ui.configbytes('blackbox', 'maxsize')
         self._inlog = False
 
     def tracked(self, event):
-        return b'*' in self._trackedevents or event in self._trackedevents
+        return ((b'*' in self._trackedevents or event in self._trackedevents)
+                and event not in self._untrackedevents)
 
     def log(self, ui, event, msg, opts):
         # self._log() -> ctx.dirty() may create new subrepo instance, which



To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list