D1177: chgserver: do not treat HG as sensitive environ when CHGHG is set

quark (Jun Wu) phabricator at mercurial-scm.org
Wed Oct 18 17:59:26 EDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc5150f6b8268: chgserver: do not treat HG as sensitive environ when CHGHG is set (authored by quark, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1177?vs=3001&id=3002

REVISION DETAIL
  https://phab.mercurial-scm.org/D1177

AFFECTED FILES
  mercurial/chgserver.py

CHANGE DETAILS

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -108,8 +108,13 @@
     for section, item in _configsectionitems:
         sectionitems.append(ui.config(section, item))
     sectionhash = _hashlist(sectionitems)
+    # If $CHGHG is set, the change to $HG should not trigger a new chg server
+    if 'CHGHG' in encoding.environ:
+        ignored = {'HG'}
+    else:
+        ignored = set()
     envitems = [(k, v) for k, v in encoding.environ.iteritems()
-                if _envre.match(k)]
+                if _envre.match(k) and k not in ignored]
     envhash = _hashlist(sorted(envitems))
     return sectionhash[:6] + envhash[:6]
 



To: quark, #hg-reviewers, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list