##// END OF EJS Templates
dispatch: return read config options
Idan Kamara -
r14753:10dcb3e7 stable
parent child Browse files
Show More
@@ -398,6 +398,8 b' def _parse(ui, args):'
398
398
399 def _parseconfig(ui, config):
399 def _parseconfig(ui, config):
400 """parse the --config options from the command line"""
400 """parse the --config options from the command line"""
401 configs = []
402
401 for cfg in config:
403 for cfg in config:
402 try:
404 try:
403 name, value = cfg.split('=', 1)
405 name, value = cfg.split('=', 1)
@@ -405,10 +407,13 b' def _parseconfig(ui, config):'
405 if not section or not name:
407 if not section or not name:
406 raise IndexError
408 raise IndexError
407 ui.setconfig(section, name, value)
409 ui.setconfig(section, name, value)
410 configs.append((section, name, value))
408 except (IndexError, ValueError):
411 except (IndexError, ValueError):
409 raise util.Abort(_('malformed --config option: %r '
412 raise util.Abort(_('malformed --config option: %r '
410 '(use --config section.name=value)') % cfg)
413 '(use --config section.name=value)') % cfg)
411
414
415 return configs
416
412 def _earlygetopt(aliases, args):
417 def _earlygetopt(aliases, args):
413 """Return list of values for an option (or aliases).
418 """Return list of values for an option (or aliases).
414
419
General Comments 0
You need to be logged in to leave comments. Login now