py3: convert sorting field to sysstr
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 12 Oct 2018 17:31:10 +0200
changeset 40192 b8f6a99ad89b
parent 40191 4b7eb862692e
child 40193 b25fbe7e494e
py3: convert sorting field to sysstr This is used as part of an attribute name check and needs to be native str. Differential Revision: https://phab.mercurial-scm.org/D5008
mercurial/profiling.py
--- a/mercurial/profiling.py	Fri Oct 12 17:25:02 2018 +0200
+++ b/mercurial/profiling.py	Fri Oct 12 17:31:10 2018 +0200
@@ -61,7 +61,7 @@
         else:
             # format == 'text'
             stats = lsprof.Stats(p.getstats())
-            stats.sort(field)
+            stats.sort(pycompat.sysstr(field))
             stats.pprint(limit=limit, file=fp, climit=climit)
 
 @contextlib.contextmanager