Mercurial > hg-stable
comparison contrib/perf.py @ 32906:04fa5520d167
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 16 Jun 2017 20:49:32 -0400 |
parents | 2b0a8b0f3435 |
children | b3538c03a804 |
comparison
equal
deleted
inserted
replaced
32905:28a0e6a4e824 | 32906:04fa5520d167 |
---|---|
659 cmd = sys.argv[0] | 659 cmd = sys.argv[0] |
660 def d(): | 660 def d(): |
661 if os.name != 'nt': | 661 if os.name != 'nt': |
662 os.system("HGRCPATH= %s version -q > /dev/null" % cmd) | 662 os.system("HGRCPATH= %s version -q > /dev/null" % cmd) |
663 else: | 663 else: |
664 os.environ['HGRCPATH'] = '' | 664 os.environ['HGRCPATH'] = ' ' |
665 os.system("%s version -q > NUL" % cmd) | 665 os.system("%s version -q > NUL" % cmd) |
666 timer(d) | 666 timer(d) |
667 fm.end() | 667 fm.end() |
668 | 668 |
669 @command('perfparents', formatteropts) | 669 @command('perfparents', formatteropts) |