diff --git a/mercurial/profiling.py b/mercurial/profiling.py --- a/mercurial/profiling.py +++ b/mercurial/profiling.py @@ -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