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'.
--- 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()