Using Bazaar on Subversion Repositories

Posted on July 5th, 2010 by raoul and tagged , , , , , .

Soon after I started developing version 2.0 of OpenLP, we moved OpenLP over to Launchpad.net and to using Bazaar for our version control. Over the last (nearly) 2 years of using Bazaar, I've really come to enjoy working with it, and the workflow that the Bazaar integration in Launchpad offers.

At work we use Subversion for our version control, and some of Subversion's limitations, compared to Bazaar's features, have been annoying me for a while. Then I learned about the Bazaar-Subversion bridge, and I started using Bazaar to checkout my code from Subversion.

So how does it work? Quite well, actually, and on top of that it's very simple to set up.

First you need to install the bzr-svn package on Ubuntu:

@:~$ sudo aptitude install bzr-svn

Then, it's the matter of checking out your code:

@:~$ bzr co http://svn.domain.local/svnroot/myrepo/trunk trunk

Note: If you're using HTTPS, you need to change your protocol slightly, to use the Python urllib module, rather than the Python curl module, which Bazaar uses by default:

@:~$ bzr co https+urllib://svn.domain.local/svnroot/myrepo/trunk trunk

There we go, now you can use Bazaar commands to update, commit, etc:

@:~$ bzr update
@:~$ bzr status
@:~$ bzr commit

Comments

Re: Using Bazaar on Subversion Repositories

Thanks for the simple instructions, but do you know of a way to use an existing Subversion working copy (on the developer's local PC) with Bazaar (e.g. TortoiseBzr)?

Comment by ossandcad (not verified) on Jul 12th, 2010 at 5:32 pm

Re: Using Bazaar on Subversion Repositories

Unfortunately, as far as I know, that is not possible. Both Subversion and Bazaar store information about the repository in their working copy, which means that Bazaar would not be able to find any Bazaar-specific information in the Subversion working copy, since the repository had not been checked out using Bazaar.

Comment by raoul on Aug 2nd, 2010 at 8:44 pm