basho/rebar — pull request #156 by hyperthunk (2011-11-08 23:58:24+00:00)
Title: Add support for importing/merging config

Rebar allows you to store configuration in different files and select
the configuration you want to use using the -C option. Currently
this leads to a lot of duplication however, so I've added the ability to
include configuration in two ways:

Importing is done using `{import, PathToConfig}`, which when processed
causes the incoming terms to *overwrite* any existing ones. This allows
you to store common settings in one place.

Merging is done using `{extend, PathToConfig}`, which instead merges the
incoming configuration into the exiting one, rather than overwriting.
This merging of config is only applied to terms in the destination
config where the value (of a `{K,V}` tuple) is a list. Terms which map
to a scalar value are simply dropped from the incoming config set,
leaving the destination terms intact.

This allows you to, for example, have base config settings (such as
`deps` or `erl_opts`) declared in your main `rebar.config` but declare
additional test `deps` (etc) in `test.config` and have the two get merged.