Import the last revision of your svn into bzr

Subversion is a widely used VCS (version control system). However, there a more players out there, like Bazaar (bzr). For example, Ubuntu wans to switch to this VCS in the near future.
I’ve got a svn account on Unfuddle. But bzr also works with ordinary ftp and ssh accounts, and thus I wanted to switch to bzr. But how can I move my files from my svn to bzr?

You want to move your project ‘PROJECT’. Use the terminal for the following (Linux) commands. (Attention: your only copying the last revision to bzr.)

    Download eerst je subversion files:

  1. mkdir PROJECT
    bzr init-repo PROJECT
    cd PROJECT
    bzr svn-import http:///my_svn

    I use bzr with the ‘svn-import’ module. Of course, you can also use svn checkout.

  2. Remove the traces to the old svn repository. If you just used svn checkout, you have to remove other maps or files.
    cd my_svn
    rm -rf .bzr
  3. Rename your directory to a logical name (mine didn’t had one). I will rename my own branch to ‘trunk’:
    cd ..
    mv my_svn/ trunk/
    bzr init ftp://ftp.mysite.nl/PROJECT
    cd trunk
    bzr add
    bzr commit -m "Initial commit"

If you want to checkout on another location, use the command:

bzr co ftp://ftp.mysite.nl/PROJECT/trunk

Tags: , ,

Leave a Reply