mercurial/ui.py
changeset 3343 a09be4317f9c
parent 3342 d9b3d3d34749
child 3344 1700a103458e
equal deleted inserted replaced
3342:d9b3d3d34749 3343:a09be4317f9c
    62         self.traceback = self.traceback or traceback
    62         self.traceback = self.traceback or traceback
    63         for cfg in config:
    63         for cfg in config:
    64             try:
    64             try:
    65                 name, value = cfg.split('=', 1)
    65                 name, value = cfg.split('=', 1)
    66                 section, name = name.split('.', 1)
    66                 section, name = name.split('.', 1)
    67                 if not self.cdata.has_section(section):
       
    68                     self.cdata.add_section(section)
       
    69                 if not section or not name:
    67                 if not section or not name:
    70                     raise IndexError
    68                     raise IndexError
    71                 self.cdata.set(section, name, value)
    69                 self.setconfig(section, name, value)
    72             except (IndexError, ValueError):
    70             except (IndexError, ValueError):
    73                 raise util.Abort(_('malformed --config option: %s') % cfg)
    71                 raise util.Abort(_('malformed --config option: %s') % cfg)
    74 
    72 
    75     def readconfig(self, fn, root=None):
    73     def readconfig(self, fn, root=None):
    76         if isinstance(fn, basestring):
    74         if isinstance(fn, basestring):