Lele Gaifax wrote a nice utility called Tailor to convert between all sorts of repositories. Here is a recipe for importing your subversion repository into darcs and maintaining a two-way sync:

WARNING: The process described here may lead to problems. See http://www.mail-archive.com/tailor@lists.zooko.com/msg00080.html . Apparently a safe (but more complex) method is outlined at http://progetti.arstecnica.it/tailor/wiki/TwoWaySync. -- paul.totterman@gmail.com

The configuration file

Save the following in /whatever/myNiftyProject.tailor:

[DEFAULT]
verbose = True
projects = darcs-to-svn

[darcs-to-svn]
root-directory = /tmp
source = darcs:myNiftyProject
target = svn:myNiftyProject
state-file = darcs-to-svn.state

[svn-to-darcs]
root-directory = /tmp
source = svn:myNiftyProject
target = darcs:myNiftyProject
state-file = svn-to-darcs.state
    
[svn:myNiftyProject]
repository = http://myWonderfulServer.org/myNiftyProject
module = /trunk/myNiftyProject
subdir = svnside

[darcs:myNiftyProject]
repository = /whatever/myNiftyProjectInDarcs
subdir = darcside

Making it go

Now, how do you make this work?

By saving the file somewhere, such as /whatever/myNiftyProject.tailor. Then you can run it as follows:

This will give you a nice darcsified version of your repository in /tmp/darcside (or whatever root-directory and subdir you set in the configuration file).

Saving things back in SVN

WARNING: This is not tested, however it should work...

Not everyone's on board that darcs is the way to go? No problem:

The SVN version of your repository will now be at /tmp/svnside.

DarcsWiki: ConvertingFromSubversion (last edited 2006-12-30 19:24:59 by 201)