Idioms of use with bzr-svn -- Bazaar/Launchpad workflow issue

Neil Martinsen-Burrell nmb at wartburg.edu
Mon May 24 15:32:45 BST 2010


On 2010-05-24 02:46, Russel Winder wrote:
> On Sat, 2010-05-22 at 16:57 +0900, Stephen J. Turnbull wrote:
>
>> Why do you think that's excessive?  If they're separate feature
>> branches, then they should not conflict very much.  Most merges should
>> work without conflict.  The using branch will eventually be thrown
>> away, so you can just keep merging to it from each feature branch
>> without worrying about whether its history makes any sense.
>
> OK, I have set up an experiment to see if it is workable.
>
> I like having script based update of my collection of branches and
> repositories (Bazaar, Mercurial and Git).  To date I am finding it a lot
> easier to do this with Mercurial and Git than with Bazaar -- because of
> the internal vs. standalone branch architectures.   Basically I have to
> have a script in each shared repository describing the structure and
> allowing automated update.  The question is whether I am just missing a
> feature of bazaar I should know about or whether this is a missing
> feature.
>
> Is there an "update shared repository" command in Bazaar?

If you are willing to use the bzr-colo plugin, it has a colo-pull 
command (inspired by git and bzrtools' multi-pull) that will pull from 
all of the branches whose names begin with "origin/".  So, the following 
might do what you want:

$ bzr colo-fetch lp:bzr bzr-all
$ cd bzr-all
$ bzr colo-branches
* origin/trunk
$ bzr branch lp:bzr/2.0 colo:origin/2.0
$ bzr colo-branches
   origin/2.0
* origin/trunk
$ bzr colo-pull
Updating origin/2.0 from bzr+ssh://bazaar.launchpad.net/~bzr-pqm/bzr/2.0/
No revisions to pull.
Updating origin/trunk from 
bzr+ssh://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/
No revisions to pull.

This command was intentionally designed to *not* do pull in every branch 
of a shared repository, because colocated workspaces may include active 
branches that should not be automatically pulled up to date with their 
parent.  Thus the use of the "origin/" prefix to indicate that these 
branches *should* be pulled from their parents.

I'm not sure how this would interact with your bzr-svn mirror setup, but 
certainly Jelmer and I are both interested in providing named, colocated 
branch support in Bazaar (albeit from different angles) for just these 
types of situations.  It is possible that a bzr-svn created shared 
repository could be massaged into a colocated workspace (put the shared 
repository in $DIR/.bzr/branches, reconfigure it to be no-trees, then 
take a lightweight checkout in $DIR, rename branches to "origin/" as 
appropriate with ``bzr colo-move``).  If you try it, please let me know 
how it goes.

-Neil



More information about the bazaar mailing list