mercurial/commands.py
changeset 52418 e98cea8fc858
parent 52417 c97e0fd26225
child 52419 04c3fb885fb6
equal deleted inserted replaced
52417:c97e0fd26225 52418:e98cea8fc858
    66 )
    66 )
    67 
    67 
    68 from .cmd_impls import graft as graft_impl
    68 from .cmd_impls import graft as graft_impl
    69 from .configuration import (
    69 from .configuration import (
    70     command as config_command,
    70     command as config_command,
    71     rcutil,
       
    72 )
    71 )
    73 from .utils import (
    72 from .utils import (
    74     dateutil,
    73     dateutil,
    75     procutil,
    74     procutil,
    76     stringutil,
    75     stringutil,
  2368 
  2367 
  2369     """
  2368     """
  2370     edit_level = config_command.find_edit_level(ui, repo, opts)
  2369     edit_level = config_command.find_edit_level(ui, repo, opts)
  2371     if edit_level is not None:
  2370     if edit_level is not None:
  2372         return config_command.edit_config(ui, repo, edit_level)
  2371         return config_command.edit_config(ui, repo, edit_level)
       
  2372 
  2373     ui.pager(b'config')
  2373     ui.pager(b'config')
       
  2374     config_command.show_component(ui, repo)
  2374     fm = ui.formatter(b'config', pycompat.byteskwargs(opts))
  2375     fm = ui.formatter(b'config', pycompat.byteskwargs(opts))
  2375     for t, f in rcutil.rccomponents():
       
  2376         if t == b'path':
       
  2377             ui.debug(b'read config from: %s\n' % f)
       
  2378         elif t == b'resource':
       
  2379             ui.debug(b'read config from: resource:%s.%s\n' % (f[0], f[1]))
       
  2380         elif t == b'items':
       
  2381             # Don't print anything for 'items'.
       
  2382             pass
       
  2383         else:
       
  2384             raise error.ProgrammingError(b'unknown rctype: %s' % t)
       
  2385     untrusted = bool(opts.get('untrusted'))
  2376     untrusted = bool(opts.get('untrusted'))
  2386 
  2377 
  2387     selsections = selentries = []
  2378     selsections = selentries = []
  2388     if values:
  2379     if values:
  2389         selsections = [v for v in values if b'.' not in v]
  2380         selsections = [v for v in values if b'.' not in v]