Mercurial > hg
changeset 3343:ab406cfa1b99
ui.py: don't query parentui.cdata when looking up config items.
We copied the contents of parentui.cdata on initialization.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 10 Oct 2006 18:43:20 -0300 |
parents | 4eeb79b4da30 |
children | d9b3d3d34749 |
files | mercurial/ui.py |
diffstat | 1 files changed, 3 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Tue Oct 10 18:43:20 2006 -0300 +++ b/mercurial/ui.py Tue Oct 10 18:43:20 2006 -0300 @@ -98,10 +98,7 @@ raise util.Abort(_("Error in configuration section [%s] " "parameter '%s':\n%s") % (section, name, inst)) - if self.parentui is None: - return default - else: - return self.parentui._config(section, name, default, funcname) + return default def config(self, section, name, default=None): return self._config(section, name, default, 'get') @@ -124,8 +121,6 @@ def configitems(self, section): items = {} - if self.parentui is not None: - items = dict(self.parentui.configitems(section)) if self.cdata.has_section(section): try: items.update(dict(self.cdata.items(section))) @@ -136,9 +131,8 @@ x.sort() return x - def walkconfig(self, seen=None): - if seen is None: - seen = {} + def walkconfig(self): + seen = {} for (section, name), value in self.overlay.iteritems(): yield section, name, value seen[section, name] = 1 @@ -149,9 +143,6 @@ if (section, name) in seen: continue yield section, name, value.replace('\n', '\\n') seen[section, name] = 1 - if self.parentui is not None: - for parent in self.parentui.walkconfig(seen): - yield parent def extensions(self): result = self.configitems("extensions")