Default push, public and submit locations for branches?

Jelmer Vernooij jelmer at vernstok.nl
Fri Oct 1 10:39:23 BST 2010


Hi Nick,

On Fri, 2010-10-01 at 11:23 +0200, Nicholas Allen wrote:
> I was wondering if there's a way to define default push, public, and
> submit locations for any branches that are created inside a shared
> repository. The idea would be that when a branch is created under the
> shared repository instead of not having these locations defined they
> would be set to some sensible default. This is useful when you have a
> local repository and the branches inside it are usually stored on a main
> central server as well.
> 
> A shared repository could have configuration settings like this:
> 
> default_push_location=bzr://user@host/path/${branch}
> default_submit_location=bzr://user@host/path/trunk
> default_public_location=bzr://user@host/path/${branch}
> 
> Then when I make a branch called "my-branch" inside that repository
> these locations would be set by substituting ${branch} with "my-branch".
> 
> Is something like this possible? If not I think it would be a really
> nice feature to add...
Yep, this is possible with Bazaar today although it's a bit hidden.

E.g. I have the following in my ~/.bazaar/locations.conf:

[/home/jelmer/launchpad/lp-branches]
email = Jelmer Vernooij <jelmer.vernooij at canonical.com>
pqm_email = Canonical PQM <launchpad at pqm.canonical.com>
submit_branch = /home/jelmer/launchpad/lp-branches/devel
public_branch = bzr+ssh://bazaar.launchpad.net/~jelmer/launchpad
public_branch:policy = appendpath
push_location = lp:~jelmer/launchpad
push_location:policy = appendpath
merge_target = /home/jelmer/launchpad/lp-branches/devel
submit_to = merge at code.launchpad.net

If I "bzr push" from e.g. inside ~/launchpad/lp-branches/bla it will
automatically push to lp:~jelmer/launchpad/bla.

Cheers,

Jelmer




More information about the bazaar mailing list