Mercurial > public > mercurial-scm > hg-stable
diff tests/test-trusted.py @ 8142:912bfef12ba6
ui: fold readsections into readconfig
readconfig now reads only single files
readconfig takes an optional list of sections
readconfig trusts files we're looking for sections in
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 23 Apr 2009 15:40:10 -0500 |
parents | 6b5522cb2ad2 |
children | fca54469480e |
line wrap: on
line diff
--- a/tests/test-trusted.py Thu Apr 23 15:40:10 2009 -0500 +++ b/tests/test-trusted.py Thu Apr 23 15:40:10 2009 -0500 @@ -133,13 +133,13 @@ print "# prints debug warnings" u = testui(user='abc', group='def', cuser='foo', debug=True) -print "# ui.readsections" +print "# ui.readconfig sections" filename = 'foobar' f = open(filename, 'w') f.write('[foobar]\n') f.write('baz = quux\n') f.close() -u.readsections(filename, 'foobar') +u.readconfig(filename, sections = ['foobar']) print u.config('foobar', 'baz') print