mercurial/chgserver.py
changeset 34839 110040e715c9
parent 34485 37b7581e5737
child 34887 7bf7544fd6cc
equal deleted inserted replaced
34838:d3ea6a1c798f 34839:110040e715c9
    69 _configsections = [
    69 _configsections = [
    70     'alias',  # affects global state commands.table
    70     'alias',  # affects global state commands.table
    71     'eol',    # uses setconfig('eol', ...)
    71     'eol',    # uses setconfig('eol', ...)
    72     'extdiff',  # uisetup will register new commands
    72     'extdiff',  # uisetup will register new commands
    73     'extensions',
    73     'extensions',
       
    74 ]
       
    75 
       
    76 _configsectionitems = [
       
    77     ('commands', 'show.aliasprefix'), # show.py reads it in extsetup
    74 ]
    78 ]
    75 
    79 
    76 # sensitive environment variables affecting confighash
    80 # sensitive environment variables affecting confighash
    77 _envre = re.compile(r'''\A(?:
    81 _envre = re.compile(r'''\A(?:
    78                     CHGHG
    82                     CHGHG
    99     same time.
   103     same time.
   100     """
   104     """
   101     sectionitems = []
   105     sectionitems = []
   102     for section in _configsections:
   106     for section in _configsections:
   103         sectionitems.append(ui.configitems(section))
   107         sectionitems.append(ui.configitems(section))
       
   108     for section, item in _configsectionitems:
       
   109         sectionitems.append(ui.config(section, item))
   104     sectionhash = _hashlist(sectionitems)
   110     sectionhash = _hashlist(sectionitems)
   105     envitems = [(k, v) for k, v in encoding.environ.iteritems()
   111     envitems = [(k, v) for k, v in encoding.environ.iteritems()
   106                 if _envre.match(k)]
   112                 if _envre.match(k)]
   107     envhash = _hashlist(sorted(envitems))
   113     envhash = _hashlist(sorted(envitems))
   108     return sectionhash[:6] + envhash[:6]
   114     return sectionhash[:6] + envhash[:6]