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

Matt Harbison mharbison72 at gmail.com
Fri Jun 16 23:05:37 EDT 2017


# HG changeset patch
# User Matt Harbison <matt_harbison at 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.

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


More information about the Mercurial-devel mailing list