Patchwork [4,of,6] perf: ensure HGRCPATH is exported on Windows

login
register
mail settings
Submitter Matt Harbison
Date June 17, 2017, 3:05 a.m.
Message ID <5d2a1f1074cd9ca09892.1497668737@Envy>
Download mbox | patch
Permalink /patch/21442/
State Accepted
Headers show

Comments

Matt Harbison - June 17, 2017, 3:05 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1497660572 14400
#      Fri Jun 16 20:49:32 2017 -0400
# Node ID 5d2a1f1074cd9ca0989204c47841cd12c7a54c5d
# Parent  95f24a8bc2b2663f43c6f3c60e5270659d1425d6
perf: ensure HGRCPATH is exported on Windows

After dropping the garbage collector hack, `hg perfstartup` started yelling
about not being able to import the evolve extension, which I have in my user
config.  Launching `env` shows that an empty HGRCPATH isn't exported to the
environment.  Since `env` doesn't quote, I have no idea if the variable is
trimmed, but Mercurial doesn't complain when processing it.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -661,7 +661,7 @@ 
         if os.name != 'nt':
             os.system("HGRCPATH= %s version -q > /dev/null" % cmd)
         else:
-            os.environ['HGRCPATH'] = ''
+            os.environ['HGRCPATH'] = ' '
             os.system("%s version -q > NUL" % cmd)
     timer(d)
     fm.end()