[MERGE] Config.get_user_section() API

Robert Collins robertc at robertcollins.net
Tue Feb 5 00:46:54 GMT 2008


On Mon, 2008-02-04 at 21:20 +1000, Ian Clatworthy wrote:
> This is the second patch related to enhanced hooks. This one provides an
> API on our Config class for returning the option names and values in a
> section as a dictionary. The normal precedence rules apply when
> combining options within a named section across multiple files, i.e.
> locations.conf overrides branch.conf overrides bazaar.conf.
> 
> NOTE: There is currently no intelligence applied to combining options
> defined against multiple patterns that match in locations.conf - the
> first matching location (as defined by get_matching_sections) wins. I
> think improving that could wait for a later version, though I'm happy to
> address it now if anyone feels strongly otherwise.

bb:comment

I'm really very uncomfortable with this: its in the space of 'generic
metdata' which IME gets massively abused rather than doing the right
thing. In particular I expect this to already do the /wrong/ thing on
config options with special parsing requirements and heuristics and
defaults.

What is it in aid of - you say its for enhanced hooks, but any hook can
already ask for the appropriate config (branch/tree/location/user) and
work with that.

-Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080205/b126947a/attachment.pgp 


More information about the bazaar mailing list