--- a/mercurial/statprof.py Sun Dec 18 01:54:36 2016 +0530
+++ b/mercurial/statprof.py Sun Dec 18 02:06:00 2016 +0530
@@ -117,6 +117,7 @@
import time
from . import (
+ encoding,
pycompat,
)
@@ -324,7 +325,7 @@
state.accumulate_time(clock())
state.last_start_time = None
- statprofpath = os.environ.get('STATPROF_DEST')
+ statprofpath = encoding.environ.get('STATPROF_DEST')
if statprofpath:
save_data(statprofpath)
@@ -680,7 +681,7 @@
def write_to_flame(data, fp, scriptpath=None, outputfile=None, **kwargs):
if scriptpath is None:
- scriptpath = os.environ['HOME'] + '/flamegraph.pl'
+ scriptpath = encoding.environ['HOME'] + '/flamegraph.pl'
if not os.path.exists(scriptpath):
print("error: missing %s" % scriptpath, file=fp)
print("get it here: https://github.com/brendangregg/FlameGraph",