|Version 18 (modified by ctsai, 11 months ago)|
Note: This documentation is written for the Classic SourceForge system. It's for instructions in importing to a New SourceForge SVN repository see this page. General documentation for SVN on the New SourceForge system is available here.
Not sure if you have a Classic or Beta project? See this guide.
Importing Data into Subversion
SourceForge.net permits the import of data into a Subversion repository from a user-supplied Subversion dump file. This Subversion dump file can be compressed (via .gz, .bz2, .zip, but not tarred) or uncompressed. As the import process is largely automated on our side, it is imperative that these instructions be followed closely and in their entirety to ensure a successful import.
Creating a Subversion dump file
You can create a Subversion dump file in a variety of ways, such as dumping an existing Subversion repository, or using a repository conversion tool, such as cvs2svn.
If you have backed-up your subversion repository using rsync, you can use "svnadmin dump DIRECTORY >FILE" to create a dump file of that content. There are tools available that can filter the resulting dump file, allowing you to make changes before importing it (as described below).
It is a good idea to compress the resulting dump file, to save space. We support zip, bzip2, and gzip compression.
Using cvs2svn to create a Subversion dump file from CVS content
If you have an existing CVS repository that you would like to convert to Subversion, follow these instructions:
- Download and install a copy of cvs2svn. You can use your own server, or use an interactive shell to do the work.
- Get a copy of the RCS files for the CVS repository. For SourceForge.net-hosted CVS repositories, this can be done via rsync. For projects hosted elsewhere, you may need to contact the repository administrator for a copy of the files.
- Clean up any data in the copy of the CVS repository. Ensure that any data that shouldn't be imported isn't present in the RCS files. Newer versions of cvs2svn require that the CVSROOT module be present, so you may want to use svndumpfilter after creation of the dump file to remove that directory from the import. Data cannot be readily removed from a Subversion repository after being imported, unless you do another, filtered import in the future.
- Convert the repository to a Subversion dump file using cvs2svn:
- Go to the directory at the root of the CVS repository
- Run the command: "cvs2svn --dumpfile=svndump ."
- If the conversion generates an error message, follow the prompts that indicate what the problem is, and attempt to resolve them using one of the various options for cvs2svn (--trunk-only will drop all branches and tags, which will usually make the process painless if all you need is the trunk).
- Compress the resulting SVN dump file (svndump), if you so desire, using zip, gzip or bzip2 (but do not tar it).
- Follow the instructions for importing a Subversion dump file to finish the import.
Importing a Subversion dump file
- Backup your your current Subversion repository if it has content.
- Make sure that the name of the dump file only contains alphanumeric characters and a period (Example: svndump.gz is good, but projectname-svndump.gz is bad due to the dash).
- Connect to our Shell service and run the sf-help command. This will provide you with the information necessary to upload your dump file.
- Upload the dump file to the interactive shell.
- adminrepo --checkout svn will copy your repository to /svnroot/PROJECT so you can work with it from there.
- Use adminrepo --help for further information.
- Decompress your dump file (e.g. gzip -d svndump.gz)
- Use svnadmin load /svnroot/PROJECT < svndump to replace your current repository with your dump file. This is roughly equivalent to deleting your current repository, and replacing it with the contents of your dump file.
- Save your changes using adminrepo --save.