stack-based configuration files road-map

Vincent Ladeuil vila+bzr at canonical.com
Fri Aug 5 15:35:27 UTC 2011


Hi,

>From some IRC discussions I'd like to clarify the road-map for the
deployment of the stack-based config files.

So far, the building blocks have landed and a couple of config options
use the stack-based implementation while the rest of the options still
use the actual implementation.

Since there is a significant number of bugs to be address and many
missing features roughly defined at
http://doc.bazaar.canonical.com/devnotes/configuration.html , some
things needs to be landed before other can be implemented.

Here is one way to organize all the steps (some of them can be done
concurrently):

#. Use the stacked-based implementation for all bzr options. This will
   probably reveal bugs or missing features I didn't catch earlier. It
   will also probably clarify how remote branch config options behave
   (and whether the behavior is different when accessed via the smart
   server or via dumb protocols).

#. Make 'bzr config' use the stack-based implementation

#. Implement option expansion across sections and files. Convert all
   templates to use the option expansion instead of their specific
   implementation. Get rid of appendpath and friends, make sure
   variations are easy to add (appendir).

#. Make sure that any config file is read/written once at most for a
   given bzr command. (Running the test suite as of today reports ~1e6
   opened config files).

#. Support declaring a list of environment variables acting as default
   values for a given option

#. Add a command-line switch to override an option

Once the above are addressed, it will become easier/clearer to think
about adding new features (sections in all config files, distinction
between defaults and overrides, system-wide config file).

Adding new features could probably be driven by implementing the
system-wide config file:

#. Add a SystemStore handling a single no-name section (like branch.conf)

#. Implement PathMatcher

#. Add path-named sections by using the PathMatcher


        Vincent



More information about the bazaar mailing list