chgserver: more explicit about sensitive environ variables
Environment variables like HGUSER, HGEDITOR, HGEDITFROM should not trigger
a new chgserver. This patch uses a whitelist for environ variables starting
with "HG" to reduce the number of servers.
I have went through `grep -o "[\"']HG[A-Z_0-9]*['\"]" -hR . | sort -u` so
the list should be up-to-date.
--- a/mercurial/chgserver.py Thu May 11 08:49:33 2017 -0700
+++ b/mercurial/chgserver.py Wed May 10 11:55:22 2017 -0700
@@ -75,7 +75,8 @@
# sensitive environment variables affecting confighash
_envre = re.compile(r'''\A(?:
CHGHG
- |HG(?:[A-Z].*)?
+ |HG(?:DEMANDIMPORT|EMITWARNINGS|MODULEPOLICY|PROF|RCPATH)?
+ |HG(?:ENCODING|PLAIN).*
|LANG(?:UAGE)?
|LC_.*
|LD_.*