Converting Subversion checkouts (not repositories) to Bazaar

Barry Warsaw barry at canonical.com
Mon Jan 4 13:17:47 GMT 2010


Over the winter break, one of my many home IT projects was to convert my local
Subversion repositories to Bazaar.  I put almost everything I touch under
version control, including my $HOME dot files, documents, experimental
projects, elisp files, etc.  I also put all my system files under version
control for all the systems I manage.  This latter is made much easier by
etckeeper, which looks like it rocks. :)

Actually converting my Subversion repository to Bazaar was fairly trivial.
It's been a long while since I unsuccessfully tried bzr-svn; this time while
it took a while, it succeeded beautifully.  Kudos to all involved!

Further, because Subversion's directory model is different enough from
Bazaar's, I found that 'bzr split' was an invaluable tool for making the
conversion and reorganization go more smoothly.

Then I hit a rough patch, for which I'd like to get some advice.  Imagine a
fairly simple home directory layout like this:

$HOME
  .bashrc
  .emacs
  .lotsofstuff
  docs/
  env/
  extras/

All the dot files, the docs, env, and extras directories are under Subversion.
My home directory actually lives under an svn directory like .../base so the
docs, env, and extras are siblings of base in the repo.  This allows me to
e.g. not check out docs on every desktop I use[1].

The svn->bzr conversion problem comes when I want to overlay my shiny new
Bazaar branch over the existing Subversion checkout.  I get tons of conflicts,
with many .diverted files, even though the contents of those files are
unchanged.  One poor solution was to e.g. mv docs{,.aside}, then re-checkout
docs from Bazaar, and manually ensure that docs.aside was synchronized with
docs (some files in docs hadn't been committed to the svn repo yet).  This was
more painful in some directories and I rather dread the work to convert my
$HOME.

I tried bzr branch --use-existing-dir, but that did not seem to make any
difference.  I probably don't understand what --u-e-d is supposed to do.

It would actually be way cool if a directory could live under svn and bzr
simultaneously, though that might be brain exploding.  Alternatively, I just
want a bzr branch to "overlay" on an existing directory, such that it would
check the contents (or hash) of the file before it conflicted them or diverted
them.  Maybe that's what --u-e-d is supposed to do if I used it correctly.

My conversion has stalled because of this, and I would be grateful for any
advice on how best to proceed.

Thanks and happy new year!
-Barry

[1] Use case: on my home desktops I often check out everything, but if I've
got a login on a remote machine, I need only check out .../base to get my
minimal comfortable environment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100104/c1bf5e6e/attachment.pgp 


More information about the bazaar mailing list