Configuration file trickiness
vila
v.ladeuil+lp at free.fr
Tue Mar 29 06:44:31 UTC 2011
>>>>> Ben Finney <ben+bazaar at benfinney.id.au> writes:
> vila <v.ladeuil+lp at free.fr> writes:
>> * Configuration options can now use references to other options in the
>> same file by enclosing them with curly brackets (``{other_opt}``).
> Thanks for that, Vincent.
> A related niggle with config files: I have some settings I want to
> have local to each host, but other settings shared on all the
> hosts I use Bazaar on.
> So it'd be great to be able to include configuration file pieces
> from another file.
> Is there already a request in for an include directive for
> configuration files? Or, even better, someone working on adding
> that feature?
The idea is floating around.
But, *including* config or piece of config files raises many issues for
which I don't have good answers (so far) which roughly boil down to: can
we still update the included piece *and* the *including* config file[1]
or not ?
So far, the plan is to support sections in all config files. Sections
are (so far) named with paths or globs so different options can already
be set for different paths. Section naming will probably apply to a
whole config file but it's still conceivable to allow different naming
schemes (qbzr needs a config file with one section for window,
authentication.conf uses arbitrary section names so far). The current
required feature is that several sections can apply for a given context
(this is required for locations.conf). So there are already ways to
define options that apply to various sets of contexts.
We also plan to *add* more config files: the most needed one being a
'tree.conf' for working trees but 'repo.conf' for repositories and
'/etc/bzr/system.conf' are/can also be considered.
Then, the stacking of these config files should also be considered to
define which config takes precedence over another.
The current ideas are described in lp:~bzr-core/bzr/devnotes and you can
read them on http://doc.bazaar.canonical.com/devnotes/configuration.html
In any case, describing your use case with specific examples (are these
settings for working trees, branches, projects, repositories,
platforms/OSes, hosts ?) would help !
Vincent
[1]: Can each piece be parsed in isolation or only when included in the
config file ? Can the same piece be included multiple times ? Can we
still use 'bzr config' to update such pieces, do we need dedicated
parameters to identify them or should they be only edited by hand by the
user ? Will the added complexity leak in the UI or can we reuse other
proposed ideas to address the needs ?
More information about the bazaar
mailing list