# HG changeset patch # User Alexis S. L. Carvalho # Date 1160516600 10800 # Node ID 4eeb79b4da307473394edfc913dae8106acda1f8 # Parent a7cec14c9b40cacb9a88d35eb85d253a8d48483c ui.py: make walkconfig use configitems Also make it sort the available config sections while we're at it. diff -r a7cec14c9b40 -r 4eeb79b4da30 mercurial/ui.py --- a/mercurial/ui.py Tue Oct 10 18:43:20 2006 -0300 +++ b/mercurial/ui.py Tue Oct 10 18:43:20 2006 -0300 @@ -142,15 +142,13 @@ for (section, name), value in self.overlay.iteritems(): yield section, name, value seen[section, name] = 1 - for section in self.cdata.sections(): - try: - for name, value in self.cdata.items(section): - if (section, name) in seen: continue - yield section, name, value.replace('\n', '\\n') - seen[section, name] = 1 - except ConfigParser.InterpolationError, inst: - raise util.Abort(_("Error in configuration section [%s]:\n%s") - % (section, inst)) + sections = self.cdata.sections() + sections.sort() + for section in sections: + for name, value in self.configitems(section): + 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