相忘于江湖

泉涸,鱼相与处于陆,相呴以湿,相濡以沫,不如相忘于江湖。《庄子.大宗师篇》

svn2svn.py

Thursday Aug 16, 2007

There's not a good tool to replicate Subversion repository yet.

Although it's easy to use 'svnadmin dump' in server side to replicate the Subversion repositories. But most of the case, we don't have the privilege to access to Subversion server.

There's a client side tool svn2svn.rb though, which is written in ruby. But I don't like the way it works: check out each revision separately, commit back the output from cmd 'diff -Naur [rev-1] [rev]'. This would require a huge amount of disk space when there are lots of revisions and each revision is quite large (my case: 3400+ revisions, 2GB each revision from rev 2000 and on).

So I decided to write a new tool myself. After searching on Internet, I found a related tool: hgsvn, which create Mercurial repositories from Subversion repositories. It's written in Python. There are several modules in svnclient.py are re-usable for my svn2svn tool. So I created svn2svn.py based on it.

Hope I'm not reinventing the wheel. More information can be found from project page:
http://code.google.com/p/svn2svn/


[9] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg