Best practice for bzr-svn mirror?

Russel Winder russel.winder at concertant.com
Sat Feb 21 07:28:08 GMT 2009


Jonathan,

On Sat, 2009-02-21 at 16:35 +1100, Jonathan Lange wrote:
> Hello,
> 
> I was thinking about setting up a mirror of a Subversion project into
> Bazaar. The project uses branch-based development, so I'd like each of
> Subversion "branches" to be available as Bazaar branches, as well as
> the trunk.
> 
> Ideally, people would be able to branch from the trunk and push it to
> Launchpad or whatever.
> 
> Has anyone done this kind of thing before? Is there a howto? Any gotchas?

I do this all the time.  Taking one specific project, Gant, as an
example.

The mainline and released maintenance branches are Bazaar branches
stored in a Subversion repository.  People can use Subversion or Git as
well as Bazaar as clients.  Development though is generally handled by
having Bazaar branches on Launchpad.  Transient branches are created for
swapping development ideas until things get merged into one of the
Subversion stored branches.  Then the transients are deleted (usually).
If Codehaus supported Bazaar (or even Mercurial or Git) we would not be
using Launchpad for this project, but whilst Codehaus only supports
Subversion, Launchpad is a great resource.

Using Bazaar and Git as Subversion clients turns out to be both simple
and straightforward, and a total nightmare.

The issue here is rebasing -- which is both a good thing and a bad
thing.

In order to ensure good history, rebasing the Bazaar branch (or Git
repository) against the Subversion repository is a good thing.  However
this immediately destroys any capability of exchanging things directly
in a traditional DVCS way.

So if everyone uses Bazaar or Git as a personal client to a central
Subversion store and doesn't use any distributed practices, rebase is
good and your friend.  Using Git this is the only way of interacting --
Git as Subversion client not as DVCS.

Bazaar of course has two modes of operation, the same as Git (i.e.
Subversion client with total history stored locally), and the ability to
store a Bazaar branch in a Subversion repository.  This allows for less
problems, but it means rebase can be a disaster.

The downside of the way that bzr-svn provides all its extra capability
over git-svn is that Bazaar is rather slow interacting with Subversion
repositories -- especially when compared to using Git.

The other thing that Git does that Bazaar needs to investigate is
tracking remote branches.  "gitk --all" is a wonderful way of tracking
local and remote branches and is nigh on essential when using Git as a
gateway between Subversion repositories and Git repositories.  "bzr
qlog" is able to handle local branches in a shared repository, but I
don't think "bzr viz" can.  Git wins here hands down.

On the other hand Bazaar has "bzr missing" which makes "git svn dcommit
-n" look daft as a way of checking what is scheduled for committing to
the Subversion repository.

My summary is that I prefer the Bazaar separate branch/separate working
tree, but I also prefer the Git speed and the all branches in single
repository.  Yes I dither.  Depending on what I need to do, I find one
of Bazaar or Git a better tool.
 
(Mercurial may soon be a player in this game as well I hear.)
-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090221/8de19f1c/attachment.pgp 


More information about the bazaar mailing list