Using bzr-svn to track multiple svn upstream branches

Jelmer Vernooij jelmer at samba.org
Tue Sep 23 16:06:34 BST 2008


Hi Stefan,

On Mon, 2008-09-22 at 17:01 +0200, Stefan Brüns wrote:
> I would like to track multiple svn branches (namely trunk and a feature 
> branch). The feature branch is based on trunk, but does not follow trunk 
> closely. I would like to have a local branch cherrypicking of the feature 
> branch, following trunk as close as possible, and do my own development on 
> top of this local branch. I do not have commit access to the upstream branch.
> 
> The result would be something like this:
> 
> trunk(upstream)
>  |
>  +- feat-branch(upstream)
>  |    v
>  +- merged-feature-branch (private) <-> private development branch
> 
> Is this possible to do with bzr-svn? The documentation only mentions tracking 
> a single upstream branch and having a private branch based on this.
> 
> What I want to achieve is to let bzr detect merges in the upstream branch and 
> trunk, and detect local changes which have been merged upstream (manual patch 
> submission).
> 
> Does bzr-svn detect it is the same upstream repository if I do:
> bzr co http://project.org/trunk/ upstream-trunk
> bzr co http://project.org/branches/feature1 upstream-feature
Yes, bzr-svn will detect it's the same upstream repository. 

It will however not detect cherrypicks since these are not explicitly
record in Subversion (not sure if that's what you're asking). 

> How do I create a local branch based on both upstream branches? If one of 
> those two branches gets updated, will my local branch be updated as well?
 You should be able to create a new branch from trunk by running:

bzr branch http://project.org/trunk/ merged-feature-branch

after that, you can merge the changes from trunk and feature1 regularly:

bzr merge http://project.org/trunk/ && bzr commit -m "[merge] trunk"
bzr merge http://project.org/branches/feature1 && bzr commit -m "[merge]
feature1"

You can then of course create as many private development branches based
on merged-feature-branch as you'd like. 

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org




More information about the bazaar mailing list