diff mercurial/dispatch.py @ 43238:101ae8bbfa02

cleanup: hgdemandimport.tracing accepts strings, not bytes This does mean that the resulting traces will have some b'' goo in them on Python 3, but I think that's a worthwile price to pay since it doesn't break any tests. Differential Revision: https://phab.mercurial-scm.org/D7108
author Augie Fackler <augie@google.com>
date Tue, 15 Oct 2019 11:06:04 -0400
parents 8ff1ecfadcd1
children 9f70512ae2cf
line wrap: on
line diff
--- a/mercurial/dispatch.py	Tue Oct 15 09:48:27 2019 -0400
+++ b/mercurial/dispatch.py	Tue Oct 15 11:06:04 2019 -0400
@@ -104,7 +104,7 @@
 def run():
     b"run the command in sys.argv"
     initstdio()
-    with tracing.log(b'parse args into request'):
+    with tracing.log('parse args into request'):
         req = request(pycompat.sysargv[1:])
     err = None
     try:
@@ -210,7 +210,7 @@
 
 def dispatch(req):
     """run the command specified in req.args; returns an integer status code"""
-    with tracing.log(b'dispatch.dispatch'):
+    with tracing.log('dispatch.dispatch'):
         if req.ferr:
             ferr = req.ferr
         elif req.ui:
@@ -297,7 +297,7 @@
 
 
 def _runcatch(req):
-    with tracing.log(b'dispatch._runcatch'):
+    with tracing.log('dispatch._runcatch'):
 
         def catchterm(*args):
             raise error.SignalInterrupt
@@ -1181,7 +1181,7 @@
 def _runcommand(ui, options, cmd, cmdfunc):
     """Run a command function, possibly with profiling enabled."""
     try:
-        with tracing.log(b"Running %s command" % cmd):
+        with tracing.log("Running %s command" % cmd):
             return cmdfunc()
     except error.SignatureError:
         raise error.CommandError(cmd, _(b'invalid arguments'))