intertwingly

It’s just data

DVCS Interoperability


Michael Greenly: Lucky for me it’s easy migrate from bzr to git using svn as an intermediary.

Based on the comment by Pietro, I should be able to do this directly now.

First, fetch a known bzr repository.

$ bzr get http://intertwingly.net/code/venus bzr-venus
Branched 118 revision(s).

Then initialize a git repository.

$ mkdir git-venus
$ cd git-venus
$ git init
Initialized empty Git repository in /home/rubys/tmp/git-venus/.git/
$ cd ..

Now attempt the push.

$ cd bzr-venus
$ bzr dpush ../git-venus
bzr: ERROR: exceptions.AssertionError: type was None                           

*** Bazaar has encountered an internal error.  This probably indicates a
    bug in Bazaar.  You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    attaching the crash file
        /home/rubys/.cache/crash/bzr-20100513190316-5624.crash
    and including a description of the problem.

    The crash file is plain text and you can inspect or edit it to remove
    private information.

Try Michael’s approach, using svn as an intermediary:

$ svnadmin create --fs-type fsfs svn-venus
$ cd bzr-venus
$ bzr push ../svn-venus
Initialising Subversion metadata cache in /home/rubys/.cache/bazaar/svn/0217a4d8-8507-45f3-96a1-39a8aa88a6d6.
bzr: ERROR: These branches have diverged.  See "bzr help diverged-branches" for more information.

Relevant version information:

$ bzr --version
Bazaar (bzr) 2.1.1
  Python interpreter: /usr/bin/python 2.6.5
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.32-22-generic-x86_64-with-Ubuntu-10.04-lucid
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/rubys/.bazaar
  Bazaar log file: /home/rubys/.bzr.log

Copyright 2005-2010 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY.  bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Bazaar is part of the GNU Project to produce a free operating system.

$ git --version
git version 1.7.0.4

$ svn --version 
svn, version 1.6.6 (r40053)
   compiled Dec 12 2009, 05:06:12

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

Reported as bug 580146.