[PATCH] TreeConfig should support sections

John Arbash Meinel john at arbash-meinel.com
Thu Jul 27 19:27:58 BST 2006


Aaron Bentley wrote:
> Robert Collins wrote:
>>> Sections are used in the locations config file - each url is a section.
>>>
>>> But we dont have sub-sections. So a setting in branch.conf in a named
>>> section cannot be represented in locations.conf.
> 
> bzrlib.util.configobj.ConfigObj can represent sub-sections.  This
> limitation is purely due to bzrlib.config.ConfigObj.
> 
>>> I'm really -1 on this until we decide how the things should interact. It
>>> seems like we're shooting our foot off otherwise.
> 
> I think it's terribly limiting to require all settings to be in one
> section.  Anyhow, a bug is a bug.  If we're not going to support that
> parameter, we should make it throw when it's supplied.
> 
> Aaron

At this point, I don't really care. I think we should fix it in one way
or another.

I don't think we need to explicitly make 'section' deprecated, since we
know it never worked.

But we should either remove/deprecate the functionality, or fix it.

How does ConfigObj *represent* nested sections? As far as I can tell, it
isn't something that INI format supports.

I suppose you could do:

[section]

subsection =
    more = stuff
    others = true

I did see that ConfigObj supports nesting. I just didn't see any way for
it to be written to disk cleanly.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060727/b22a8a16/attachment.pgp 


More information about the bazaar mailing list