Never mind. I think the branch /is/ okay. I added another test case to prove it to myself. See attached incremental.
=== modified file 'src/lazr/config/README.txt' --- src/lazr/config/README.txt 2008-12-23 02:09:06 +0000 +++ src/lazr/config/README.txt 2008-12-23 14:30:37 +0000 @@ -791,6 +791,24 @@ key4 : Fc;k yeah! key5 :
+push() can also be used to extend master sections. + + >>> for section in master_conf.getByCategory('bar'): + ... print section.name, section.baz + bar.master 1 + + >>> master_conf.push('override', """ + ... [bar.two] + ... baz: 2 + ... + ... [bar.three] + ... baz:3 + ... """) + >>> for section in master_conf.getByCategory('bar'): + ... print section.name, section.baz + bar.two 2 + bar.three 3 +
pop() =====
=== modified file 'src/lazr/config/testdata/master.conf' --- src/lazr/config/testdata/master.conf 2008-12-23 01:59:49 +0000 +++ src/lazr/config/testdata/master.conf 2008-12-23 14:30:02 +0000 @@ -1,3 +1,6 @@ # This section defines a category master. [thing.master] foo: 0 + +[bar.master] +baz: 1
« Back to merge proposal
Never mind. I think the branch /is/ okay. I added another test case to prove
it to myself. See attached incremental.
=== modified file 'src/lazr/ config/ README. txt' config/ README. txt 2008-12-23 02:09:06 +0000 config/ README. txt 2008-12-23 14:30:37 +0000
--- src/lazr/
+++ src/lazr/
@@ -791,6 +791,24 @@
key4 : Fc;k yeah!
key5 :
+push() can also be used to extend master sections. conf.getByCateg ory('bar' ): conf.push( 'override' , """ conf.getByCateg ory('bar' ):
+
+ >>> for section in master_
+ ... print section.name, section.baz
+ bar.master 1
+
+ >>> master_
+ ... [bar.two]
+ ... baz: 2
+ ...
+ ... [bar.three]
+ ... baz:3
+ ... """)
+ >>> for section in master_
+ ... print section.name, section.baz
+ bar.two 2
+ bar.three 3
+
pop()
=====
=== modified file 'src/lazr/ config/ testdata/ master. conf' config/ testdata/ master. conf 2008-12-23 01:59:49 +0000 config/ testdata/ master. conf 2008-12-23 14:30:02 +0000
--- src/lazr/
+++ src/lazr/
@@ -1,3 +1,6 @@
# This section defines a category master.
[thing.master]
foo: 0
+
+[bar.master]
+baz: 1