Converting an SVN Repository to Bazaar

A. S. Budden abudden at
Wed Jan 21 09:10:43 GMT 2009

Dear all,

I have been trying to convert my subversion repository to a bazaar
repository, but I have been having some problems so was hoping that
someone on this list might be able to help.

My (personal) subversion repository (which was originally a CVS
repository) used to be organised with the root containing trunk/ tags/
and branches/, but I (relatively) recently (and rather dramatically)
reorganised it such that it has a number of directories and
subdirectories with categories and then some project folders within
those categories.  In two cases, those folders then contain trunk/,
tags/ and branches/, but in most cases they do not (as I've not
required them).  A short subset of the project folders is shown at the
bottom of the email.

I have tried a few approaches to converting the repository, but had no
success.  My first attempt was to use svn2bzr [1] on the whole
repository: this produced a matching layout, but the only way I could
get anything out of the bazaar repository was to check out the entire
1.5 GB repository!  After some googling, I found "An Academic Gets
Bazaar" [2], which sounded really promising.  So I downloaded
svndumpfilter4 [3] and tried the suggested command line listed on the

svndumpfilter4 --untangle=./subversion applications/vim/vimfiles/ <
svn-1917.dump > svn-1917-vimfiles.dump

However, the "untangle" option wasn't recognised (unsurprisingly I
guess as it isn't in the optparse code at the bottom of the script!).
Therefore, I removed this option and tried again.  After a fairly long
wait, I ended up with a new dump file, so I entered the next two
suggested commands:

svnadmin create repo-vimfiles
svnadmin load --ignore-uuid repo-vimfiles < svn-1917-vimfiles.dump

As far as I can tell, this created a new repository that was identical
to the original one, implying that svndumpfilter4 had simply copied my
dump file!

After this, I went back to svn2bzr for another look and decided to try
the "--prefix" option.  This looked very promising, but it seems to
copy only those changes that occurred after the last reorganisation of
my repository (presumably because the prefix filter was ignoring
changes on the old directory structure).  Therefore, on very new
projects, it worked fine; on really old projects it resulted in an
empty repository and on projects that had been created prior to the
reorganisation and changed after it, svn2bzr crashed (as it was trying
to change a file that it hadn't created).

I am now feeling somewhat out of ideas so was wondering whether anyone
could offer any suggestions as to how I might be able to proceed
without starting from scratch and losing all of the history...

Many thanks in advance for any help that you can offer.



A subset of the 85-ish projects stored in my subversion repository
(most have the versioned files in these folders, in two cases, there
are trunk, tags and branches subdirectories):


More information about the bazaar mailing list