# HG changeset patch # User Alexis S. L. Carvalho # Date 1160516600 10800 # Node ID a09be4317f9c03900e452c34c270e012b7ae25d0 # Parent d9b3d3d34749f86a324f1c17eba5fab865a91ab3 ui.py: use the overlay to hold --config data This allows the ui class to know that these items have a higher priority without further help from commands.py. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3349,11 +3349,6 @@ def dispatch(args): else: d = lambda: func(u, *args, **cmdoptions) - # reupdate the options, repo/.hg/hgrc may have changed them - u.updateopts(options["verbose"], options["debug"], options["quiet"], - not options["noninteractive"], options["traceback"], - options["config"]) - try: if options['profile']: import hotshot, hotshot.stats diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -64,11 +64,9 @@ class ui(object): try: name, value = cfg.split('=', 1) section, name = name.split('.', 1) - if not self.cdata.has_section(section): - self.cdata.add_section(section) if not section or not name: raise IndexError - self.cdata.set(section, name, value) + self.setconfig(section, name, value) except (IndexError, ValueError): raise util.Abort(_('malformed --config option: %s') % cfg)