comparison mercurial/chgserver.py @ 34839:110040e715c9

test-show: make it compatible with chg The show extension reads `commands.show.aliasprefix` config in its `extsetup` and that causes issues with chg. This patch adds that config item to chg confighash to solve the issue. Test Plan: `run-tests.py -l --chg test-show.t` Differential Revision: https://phab.mercurial-scm.org/D1158
author Jun Wu <quark@fb.com>
date Tue, 17 Oct 2017 10:41:56 -0700
parents 37b7581e5737
children 7bf7544fd6cc
comparison
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]