[PATCH 3 of 4] perf: adjust perfstartup() for Windows
Matt Harbison
mharbison72 at gmail.com
Sun Dec 13 20:56:41 CST 2015
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1450048424 18000
# Sun Dec 13 18:13:44 2015 -0500
# Node ID 2f3f443558ecd5176b9e6303cd98e1c97ad0f3db
# Parent 685b106ac877d0c28b0e4c2d9eed1b0498304401
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'.
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -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()
More information about the Mercurial-devel
mailing list