mercurial/chgserver.py
changeset 34887 7bf7544fd6cc
parent 34839 110040e715c9
child 35033 d3d35a55e03b
equal deleted inserted replaced
34886:dbb542326582 34887:7bf7544fd6cc
   106     for section in _configsections:
   106     for section in _configsections:
   107         sectionitems.append(ui.configitems(section))
   107         sectionitems.append(ui.configitems(section))
   108     for section, item in _configsectionitems:
   108     for section, item in _configsectionitems:
   109         sectionitems.append(ui.config(section, item))
   109         sectionitems.append(ui.config(section, item))
   110     sectionhash = _hashlist(sectionitems)
   110     sectionhash = _hashlist(sectionitems)
       
   111     # If $CHGHG is set, the change to $HG should not trigger a new chg server
       
   112     if 'CHGHG' in encoding.environ:
       
   113         ignored = {'HG'}
       
   114     else:
       
   115         ignored = set()
   111     envitems = [(k, v) for k, v in encoding.environ.iteritems()
   116     envitems = [(k, v) for k, v in encoding.environ.iteritems()
   112                 if _envre.match(k)]
   117                 if _envre.match(k) and k not in ignored]
   113     envhash = _hashlist(sorted(envitems))
   118     envhash = _hashlist(sorted(envitems))
   114     return sectionhash[:6] + envhash[:6]
   119     return sectionhash[:6] + envhash[:6]
   115 
   120 
   116 def _getmtimepaths(ui):
   121 def _getmtimepaths(ui):
   117     """get a list of paths that should be checked to detect change
   122     """get a list of paths that should be checked to detect change