Mercurial > hg
changeset 27382:de7bcbc68042
perf: adjust perfstartup() for Windows
The /dev/null redirect was causing the following error:
The system cannot find the path specified.
Adjusting HGRCPATH as part of the command line causes the system to try to
execute 'HGRCPATH'.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 13 Dec 2015 18:13:44 -0500 |
parents | 988367ac2a2a |
children | b1160299a175 |
files | contrib/perf.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Sun Dec 13 15:36:20 2015 -0500 +++ b/contrib/perf.py Sun Dec 13 18:13:44 2015 -0500 @@ -306,7 +306,11 @@ timer, fm = gettimer(ui, opts) cmd = sys.argv[0] def d(): - os.system("HGRCPATH= %s version -q > /dev/null" % cmd) + if os.name != 'nt': + os.system("HGRCPATH= %s version -q > /dev/null" % cmd) + else: + os.environ['HGRCPATH'] = '' + os.system("%s version -q > NUL" % cmd) timer(d) fm.end()