changeset 3345:a09be4317f9c

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.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 10 Oct 2006 18:43:20 -0300
parents d9b3d3d34749
children 1700a103458e
files mercurial/commands.py mercurial/ui.py
diffstat 2 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Oct 10 18:43:20 2006 -0300
+++ b/mercurial/commands.py	Tue Oct 10 18:43:20 2006 -0300
@@ -3349,11 +3349,6 @@
             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
--- a/mercurial/ui.py	Tue Oct 10 18:43:20 2006 -0300
+++ b/mercurial/ui.py	Tue Oct 10 18:43:20 2006 -0300
@@ -64,11 +64,9 @@
             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)