[PATCH] configuration policies

James Henstridge james at jamesh.id.au
Fri Nov 10 09:18:57 GMT 2006


On 07/11/06, James Henstridge <james at jamesh.id.au> wrote:
> The attached bundle implements configuration polcies.  The main new
> features are:
>
> * support the equivalent of recurse=False for a subset of options in a section
> * have an "append path" policy allowing for e.g. a single
> push_location setting for an entire tree of branches.
>
> The branch maintains support for recurse=False option in sections, but
> will convert it to a "policy_norecurse" key if bzr writes to the
> section.

Attached is an updated version of the patch, based on feedback from
Aaron and John on IRC.  It now uses one key per option to specify
policy rather than one key per policy.

As an example of use of the plugin, consider the case of someone using
bzr to work on a project that uses PQM.  They maintain a local copy of
the branches, with a mirror at a public location.  There are multiple
products they can submit merges to, and they organise branches for
each product under different subdirectories.  This patch would allow
the following minimal setup:

    [/path/to/repo]
    pqm_email = pqm at example.com
    push_location = bzr+ssh://publichost/~/public_html/repo
    push_location:policy = appendpath
    public_branch = http://publichost/~user/repo
    public_branch:policy = appendpath

    [/path/to/repo/product1]
    pqm_branch = http://example.com/product1
    [/path/to/repo/product2]
    pqm_branch = http://example.com/product2

This will make "bzr push" do the right thing for any local branches
under /path/to/repo, and "bzr pqm-submit" will also work, picking the
PQM target branch based on the subdirectory where the branch is
stored.

James.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-config-policy-2.patch
Type: text/x-patch
Size: 61357 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061110/481ba14e/attachment.bin 


More information about the bazaar mailing list