comparison mercurial/chgserver.py @ 30623:201b44c8875c

ui: do not translate empty configsource() to 'none' (API) It should be processed when displaying data, so we can get "source": "" in JSON output.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 23 Oct 2016 17:47:00 +0900
parents b3643bfc7fcb
children 88efb4fb1975
comparison
equal deleted inserted replaced
30622:32a07b8a9f77 30623:201b44c8875c
269 for section, name, value in srcui.walkconfig(): 269 for section, name, value in srcui.walkconfig():
270 source = srcui.configsource(section, name) 270 source = srcui.configsource(section, name)
271 if ':' in source or source == '--config': 271 if ':' in source or source == '--config':
272 # path:line or command line 272 # path:line or command line
273 continue 273 continue
274 if source == 'none':
275 # ui.configsource returns 'none' by default
276 source = ''
277 newui.setconfig(section, name, value, source) 274 newui.setconfig(section, name, value, source)
278 275
279 # load wd and repo config, copied from dispatch.py 276 # load wd and repo config, copied from dispatch.py
280 cwds = dispatch._earlygetopt(['--cwd'], args) 277 cwds = dispatch._earlygetopt(['--cwd'], args)
281 cwd = cwds and os.path.realpath(cwds[-1]) or None 278 cwd = cwds and os.path.realpath(cwds[-1]) or None