comparison mercurial/chgserver.py @ 31700:d73490957d61

chgserver: do not copy configs set by environment variables Config set by environment variables have a source like "$ENVNAME". They should not be copied because they will be recalculated by rcutil.rccomponents.
author Jun Wu <quark@fb.com>
date Tue, 28 Mar 2017 08:40:12 -0700
parents 2d11d278279a
children e518192d6bac
comparison
equal deleted inserted replaced
31699:10d88dc7c010 31700:d73490957d61
211 dispatch._parseconfig(newui, dispatch._earlygetopt(['--config'], args)) 211 dispatch._parseconfig(newui, dispatch._earlygetopt(['--config'], args))
212 212
213 # stolen from tortoisehg.util.copydynamicconfig() 213 # stolen from tortoisehg.util.copydynamicconfig()
214 for section, name, value in srcui.walkconfig(): 214 for section, name, value in srcui.walkconfig():
215 source = srcui.configsource(section, name) 215 source = srcui.configsource(section, name)
216 if ':' in source or source == '--config': 216 if ':' in source or source == '--config' or source.startswith('$'):
217 # path:line or command line 217 # path:line or command line, or environ
218 continue 218 continue
219 newui.setconfig(section, name, value, source) 219 newui.setconfig(section, name, value, source)
220 220
221 # load wd and repo config, copied from dispatch.py 221 # load wd and repo config, copied from dispatch.py
222 cwds = dispatch._earlygetopt(['--cwd'], args) 222 cwds = dispatch._earlygetopt(['--cwd'], args)