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:
cd into the directory where you put tailor.
Then, run this:
./tailor --configfile=/whatever/myNiftyProject.tailor svn-to-darcs
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:
cd into the directory where you put tailor.
Then, run this:
tailor --configfile=/whatever/myNiftyProject.tailor darcs-to-svn
The SVN version of your repository will now be at /tmp/svnside.
