--- a/hgdemandimport/tracing.py Sat Oct 05 10:29:34 2019 -0400
+++ b/hgdemandimport/tracing.py Sun Oct 06 09:45:02 2019 -0400
@@ -14,6 +14,7 @@
_checked = False
_session = 'none'
+
def _isactive():
global _pipe, _session, _checked
if _pipe is None:
@@ -26,6 +27,7 @@
_session = os.environ.get('HGCATAPULTSESSION', 'none')
return True
+
@contextlib.contextmanager
def log(whencefmt, *whenceargs):
if not _isactive():
@@ -48,6 +50,7 @@
except IOError:
pass
+
def counter(label, amount, *labelargs):
if not _isactive():
return