There are a number of different ways to import an existing SVN repository onto SourceForge, each with its own pros and cons. A few of these methods are outlined on this page.
It is best to start with a new repository. If necessary, you can remove and create a new svn repository via Admin -> Tools
Also, it's always a good idea to read through the entire instructions before starting to get the full picture, and to make sure to have backups.
Pros: The simplest method
Cons: The repository needs to be accessible in svn format already, and is often the slowest import method
This is accomplished via Admin -> Tools, under where the svn repository is listed, select Import Repository and enter the full URL of where the repository is found online and it will start the import. You will receive an email when this is complete. Also note, we only allow importing over an empty repository (this is to prevent accidental data loss).
Pros: Faster than the web based import tool
Cons: Due to the shell time limit, importing very large repositories may need to be broken into parts
For this example, we'll be using the following, for your own import, make the appropriate substitutions:
strawhat
code
ctsai
Note: lines in blue are run locally, everything else is run in the Shell service
--incremental
option (the number of revisions in each chunk will depend greatly on the size of each revision)$ svnadmin dump -r 0:3000 > svn_dump_1
$ svnadmin dump -r 3001:HEAD > svn_dump_2
$ scp svn_dump_* ctsai@frs.sourceforge.net:/home/project-web/strawhat/
$ ssh -t ctsai,strawhat@shell.sourceforge.net create
[ctsai@shell-24005 ~]$ svnadmin load /home/svn/p/strawhat/code < /home/project-web/strawhat/svn_dump_1
[ctsai@shell-24005 ~]$ timeleft
Time remaining before shutdown: 83 minutes.
[ctsai@shell-24005 ~]$ shutdown ; exit
$ ssh -t ctsai,strawhat@shell.sourceforge.net create
[ctsai@shell-24005 ~]$ svnadmin load /home/svn/p/strawhat/code < /home/project-web/strawhat/svn_dump_2
Pros: Faster than the web based import tool. Does not require dump to be broken into parts
Cons: Slower than direct load. Can't resume in case of errors.
Note: lines in blue are run locally, lines starting with "[ctsai@shell-24005 ~]$
" are run in the Shell service
Note 2: It is also highly recommended to set up SSH Keys to handle authentication for this.
$ ssh -t ctsai,strawhat@shell.sourceforge.net create
[ctsai@shell-24005 ~]$ cd /home/svn/p/strawhat/code/hooks
[ctsai@shell-24005 ~]$ echo -e '#!/bin/sh\n\nexit 0' > pre-revprop-change
[ctsai@shell-24005 ~]$ chmod a+x pre-revprop-change
[ctsai@shell-24005 ~]$ mv post-commit post-commit.bak
[ctsai@shell-24005 ~]$ shutdown ; exit
$ svnrdump load svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code < svn_dump
$ ssh -t ctsai,strawhat@shell.sourceforge.net create
[ctsai@shell-24005 ~]$ cd /home/svn/p/strawhat/code/hooks
[ctsai@shell-24005 ~]$ mv post-commit.bak post-commit
[ctsai@shell-24005 ~]$ rm pre-revprop-change
[ctsai@shell-24005 ~]$ shutdown ; exit
Pros: Can be done remotely. With a little work, able to resume in case of errors.
Cons: Slower than direct load and svnrdump. Have to work from a svn repo instead of a repository dump
Note: It is also highly recommended to set up SSH Keys to handle authentication for this.
$ svnadmin create svnrepo
$ svnadmin load svnrepo/ < svn_dump
$ svnlook uuid svnrepo/
$ svnsync init svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code file:///path/to/local/svnrepo/
$ svnsync sync svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
$ svn propdel --revprop svn:sync-lock -r0 svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
$ svnsync sync svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
$ ssh -t ctsai,strawhat@shell.sourceforge.net create
[ctsai@shell-24005 ~]$ svnadmin setuuid /home/svn/p/strawhat/code/ <UUID obtained in step 3>
[ctsai@shell-24005 ~]$ cd /home/svn/p/strawhat/code/hooks
[ctsai@shell-24005 ~]$ mv post-commit.bak post-commit
[ctsai@shell-24005 ~]$ rm pre-revprop-change
[ctsai@shell-24005 ~]$ shutdown ; exit
$ svn propdel --revprop -r0 svn:sync-from-url svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
$ svn propdel --revprop -r0 svn:sync-from-uuid svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
$ svn propdel --revprop -r0 svn:sync-last-merged-rev svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code