Submitter | phabricator |
---|---|
Date | July 7, 2019, 4:14 p.m. |
Message ID | <differential-rev-PHID-DREV-6byvg3mr7cv3wqq2c7zv-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/40805/ |
State | Superseded |
Headers | show |
Comments
durin42 added inline comments. INLINE COMMENTS > blackbox.py:97 > self._trackedevents = set(ui.configlist('blackbox', 'track')) > + self._untrackedevents = {'chgserver', 'cmdserver', 'extension'} > self._maxfiles = ui.configint('blackbox', 'maxfiles') Let's make this configurable, and this is the default. Maybe blackbox.ignore, with a default of the things you've specified? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6611/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6611 To: valentin.gatienbaron, #hg-reviewers Cc: durin42, mercurial-devel
valentin.gatienbaron added inline comments. valentin.gatienbaron marked an inline comment as done. INLINE COMMENTS > durin42 wrote in blackbox.py:97 > Let's make this configurable, and this is the default. Maybe blackbox.ignore, with a default of the things you've specified? I made the ignore list configurable, although it seems to be of limited utility: you can replace the default, but extending seems like the more useful thing to do. Extending the list requires repeating the default, and the default may not be particularly stable across versions. I changed the priority of tracked and ignored, so tracked takes predecence. This means that `tracked = *, cmdserver` would log cmdserver events, as that seems a bit better to me and maybe that's why you wanted the configurability. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6611/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6611 To: valentin.gatienbaron, #hg-reviewers Cc: durin42, mercurial-devel
Patch
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