changeset 32271:6096d27dc119

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.
author Jun Wu <quark@fb.com>
date Wed, 10 May 2017 11:55:22 -0700
parents 218ca8526ec0
children 78496ac30025
files mercurial/chgserver.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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_.*