Using Bazaar with Subversion

John Arbash Meinel john at arbash-meinel.com
Sat Mar 7 22:05:32 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Larry Drews wrote:
> OK, I give up.  I want to try out Bazaar, but I don't want to have to work 
> this hard to figure out how to do it!
> 
> I have a project in a Subversion repository at http://something.
> 
> I have a local tree rooted at c:/mm.  The directory structure looks like:
> 
> mm
>     	subproject1
>     	    	.svn
>     	    	file1.pas
>     	    	file2.pas
>     	subproject2
>     	    	.svn
>     	    	file3.pas
>     	    	file4.pas
>     	subproject3
>     	    	.svn
>     	    	file5.pas
>     	    	file6.pas
> 
> 
> So, would someone please provide me "explicit" instructions, step by step, 
> on how I can use Bazaar in this context to manage my code.  The Subversion 
> respository must be maintained for access by other developers using 
> subversion tools.
> 
> Thanks.
> 
> Larry

More important than your local checkout is understanding your repository
layout. As subversion is just a "versioned filesystem" there is a lot of
flexibility in how things get laid out, while bzr works in terms of a
logical unit of tree/branch. So something like "subproject1" would be a
reasonable logical unit.

There are a few common repository layouts in subversion, which bzr-svn
understands and you can use "bzr svn-import --layout=XXX" to have it
automatically find all branches for you. However, if your case is simple
enough, you should be able to just do:

# Create a local shared repository, so your branches can save some space
# this is an optional step
bzr init-repo --1.9-rich-root work
cd work
bzr checkout http://something/subproject1
bzr checkout http://something/subproject2
bzr checkout http://something/subproject3

At that point, you will have 3 'subproject' branches. And when you do
"bzr commit" inside them, it will push your changes back to the
subversion repository, as well as committing them locally.

There is a lot you can do at this point, to have local feature branches,
merging, etc. But from a "let me commit with bzr, and publish those
changes back into subversion" the above steps should be enough.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmy76wACgkQJdeBCYSNAAOFGACfdlpGa8Q+CGxlHImvqXg3hpIa
Y+4AniT1bSCqLP6XHtg/i4mF3Q8GUG9g
=OvqO
-----END PGP SIGNATURE-----




More information about the bazaar mailing list