More ideas about re-designing config files

Marius Kruger amanic at gmail.com
Fri Apr 1 18:48:05 UTC 2011


+1
thanks for working on this.
Each plugin had to implement its own config stacking
(branch.conf->locations.conf->bazaar),
the last time I looked, so this will hopefully fix that!

On 1 April 2011 11:27, vila <v.ladeuil+lp at free.fr> wrote:

> * I want a dict for all values starting with this prefix. This is
>  requested by bialix for qbzr. I'm not fully convinced yet unless a lot
>  of constraints are added: a single level dict, all values are strings,
>  etc. And even there deciding if a dict can be built from options
>  coming from different sections (to provide default values) still
>  sounds complicated.

yeah I also need this.
I can understand that it is complicated. I think the values in the
dict should also stack
so if x_a is in the branch.conf and x_b is in bazaar.conf then  give a
dict {a:,b:}.
But is x_a is in both then use the most specific one i.e the one in branch.conf.


I actually need a list of values, but can live with a dict:
x_1
x_2
x_3

but it would be nice to be able to get a concatenated or optionally a
non-concatenated list:
* concatenated - contains a list of all the values in all the config files
* non-concatenated - contains only the values from the most specific config


I'm not saying do everything now, but when designing apis etc, it is
important to keep in mind what we may want to support in future i.e.
you have to be able to imagine how it could work eventually, then just
implement a subset.

-- 
<>< Marius ><>



More information about the bazaar mailing list