comparison mercurial/ui.py @ 44033:1864efbe90d9

ui: add the ability to apply `defaultrc` configs from resources We will want the ability to cat out these resources, but the same would apply to templates, so I'm going to wait for the dust to settle on that. Reading the default config directly from the filesystem is still in place for now. Differential Revision: https://phab.mercurial-scm.org/D7776
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 29 Dec 2019 21:06:34 -0500
parents 5ac0e6f19eb4
children e2278581b1c6
comparison
equal deleted inserted replaced
44032:5ac0e6f19eb4 44033:1864efbe90d9
306 u = cls() 306 u = cls()
307 # we always trust global config files and environment variables 307 # we always trust global config files and environment variables
308 for t, f in rcutil.rccomponents(): 308 for t, f in rcutil.rccomponents():
309 if t == b'path': 309 if t == b'path':
310 u.readconfig(f, trust=True) 310 u.readconfig(f, trust=True)
311 elif t == b'resource':
312 u.read_resource_config(f, trust=True)
311 elif t == b'items': 313 elif t == b'items':
312 sections = set() 314 sections = set()
313 for section, name, value, source in f: 315 for section, name, value, source in f:
314 # do not set u._ocfg 316 # do not set u._ocfg
315 # XXX clean this up once immutable config object is a thing 317 # XXX clean this up once immutable config object is a thing