Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 1028:25e7ea0f2cff
Add commands.debugconfig.
This lets us both view the actual config data that hg is using, and
drive editors that need to see this information.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 23 Aug 2005 21:30:12 -0700 |
parents | 4f81068ed8cd |
children | 6d5a62a549fa |
line wrap: on
line diff
--- a/mercurial/ui.py Tue Aug 23 16:46:10 2005 -0700 +++ b/mercurial/ui.py Tue Aug 23 21:30:12 2005 -0700 @@ -52,6 +52,17 @@ return self.cdata.items(section) return [] + def walkconfig(self): + seen = {} + for (section, name), value in self.overlay.iteritems(): + yield section, name, value + seen[section, name] = 1 + for section in self.cdata.sections(): + 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 + def username(self): return (os.environ.get("HGUSER") or self.config("ui", "username") or