Synchronizing two svn repositories with bzr. Is this possible?

Jelmer Vernooij jelmer at samba.org
Tue Feb 16 11:18:15 GMT 2010


On Tue, 2010-02-16 at 11:45 +0100, Josef Wolf wrote:
> On Mon, Feb 15, 2010 at 07:33:32PM +0100, Jelmer Vernooij wrote:
> > On Mon, 2010-02-15 at 19:17 +0100, Josef Wolf wrote:
> > > I have two subversion repositories that contain mostly the same content.
> > > Just a couple of files are different in those repositories. Now, I'd like
> > > to "synchronize" those repositories. That is: if a change is committed
> > > into one of them, I'd like to merge (cherry-pick?) this commit into the
> > > other.
> > > 
> > > With git, it is possible to specify two (or even more) remote svn
> > > repositories and move patch sets this way. While this works, it is rather
> > > complicated to do with git. Maybe there's a way to work against multiple
> > > svn repositories with bazaar? Any ideas?
> > If I understand what you are trying to do correctly, this is indeed
> > possible. 
> > 
> > You would need to keep a local copy of the repository you are trying to
> > merge into. When a new commit is made into the first branch, you would
> > be able to cherrypick it like you would with a normal bzr branch. 
> 
> Thanks for your response, Jelmer!
> 
> Can you give me an example how to do that? I tried
> 
>  bzr clone https://svnserver/repos1 mergerepos
>  cd mergerepos
>  bzr merge https://svnserver/repos2 mergerepos
> 
> but bzr complains that the branches have no common history. While this is
> (technically) correct, it is incorrect in reality. In reality, repos2 was
> created from repos1 via svnadmin dump/load a long time ago. But bzr can not
> know that, since the UUID changed. After this initial "clone", I did a lot
> of manual "cherry picking" to keep the repositories in sync.
> 
> So, how do I create a bzr branch that can work against both svn repositories?
If there is no common ancestry, you would need to force bzr to merge
specific revisions - e.g. use -r0..-1 for all revisions or use -c4 for
just revision 4.

Since the UUID's of the Subversion repositories are different though,
you will get a lot of conflicts since bzr won't consider two files with
the same path (but different UUIDs) the same file and will create
conflicts.

Until Bazaar supports parallel imports properly you won't be able to use
Bazaar for your use case.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100216/e0f7f12a/attachment.pgp 


More information about the bazaar mailing list