[PATCH 2 of 3] py3: restore perfstartup() prior to b456b2e0ad9f on Windows
Matt Harbison
mharbison72 at gmail.com
Wed Oct 17 22:09:01 EDT 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1539655330 14400
# Mon Oct 15 22:02:10 2018 -0400
# Node ID 0f8e789ea9450bd401cadd53cdf1cb81ec688cb2
# Parent d09e43b6d57e02680191b71823afa69a2e80581b
py3: restore perfstartup() prior to b456b2e0ad9f on Windows
Otherwise the test errors out with:
--- c:/Users/Matt/projects/hg_py3/tests/test-contrib-perf.t
+++ c:/Users/Matt/projects/hg_py3/tests/test-contrib-perf.t.err
@@ -184,6 +184,8 @@
$ hg perfrevrange
$ hg perfrevset 'all()'
$ hg perfstartup
+ 'b'c:' is not recognized as an internal or external command,
+ operable program or batch file.
$ hg perfstatus
$ hg perftags
$ hg perftemplating
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -970,13 +970,13 @@ def perfindex(ui, repo, **opts):
def perfstartup(ui, repo, **opts):
opts = _byteskwargs(opts)
timer, fm = gettimer(ui, opts)
- cmd = fsencode(sys.argv[0])
def d():
if os.name != r'nt':
- os.system(b"HGRCPATH= %s version -q > /dev/null" % cmd)
+ os.system(b"HGRCPATH= %s version -q > /dev/null" %
+ fsencode(sys.argv[0]))
else:
os.environ[r'HGRCPATH'] = r' '
- os.system(r"%s version -q > NUL" % cmd)
+ os.system(r"%s version -q > NUL" % sys.argv[0])
timer(d)
fm.end()
More information about the Mercurial-devel
mailing list