Below are the steps to using SVN if you are the developer of projects hosted on sourceforge. This example uses onlinepasswords opensource application that I created and is hosted on sourceforge.
My development box is a Linux server and I do most work on command line. So everything is done via command line. You can mimic/tweak this with GUI on either Linux or Windows
1. Assume all of the source files are in a given folder (on your local server) from where you want to do the import to sourceforge svn.
This folder name is /home/userhomedir/onlinepasswords. Run this:
cd /home/userhomedir/onlinepasswords ls -la
Output:
total 152 drwxr-xr-x 5 myusername myusername 512 Nov 22 21:07 . drwxr-xr-x 55 myusername myusername 2048 Nov 23 08:09 .. -rw-r--r-- 1 myusername myusername 4348 Nov 22 21:07 add.php -rw-r--r-- 1 myusername myusername 6667 Nov 22 21:07 class.hash_crypt.php -rw-r--r-- 1 myusername myusername 889 Nov 22 21:07 delete.gif -rw-r--r-- 1 myusername myusername 808 Nov 22 21:07 delete.php drwxr-xr-x 2 myusername myusername 512 Nov 22 21:07 docs -rw-r--r-- 1 myusername myusername 622 Nov 22 21:07 edit.gif -rw-r--r-- 1 myusername myusername 3251 Nov 22 21:07 edit.php -rw-r--r-- 1 myusername myusername 1596 Nov 22 21:07 edit1.php -rw-r--r-- 1 myusername myusername 286 Nov 22 21:07 fclear.js -rw-r--r-- 1 myusername myusername 25079 Nov 22 21:07 flatfile.php -rw-r--r-- 1 myusername myusername 3108 Nov 22 21:07 flatfile_utils.php -rw-r--r-- 1 myusername myusername 481 Nov 22 21:07 index.php -rw-r--r-- 1 myusername myusername 218 Nov 22 21:07 log.php -rw-r--r-- 1 myusername myusername 2125 Nov 22 21:07 login.php -rw-r--r-- 1 myusername myusername 123 Nov 22 21:07 logout.php -rw-r--r-- 1 myusername myusername 455 Nov 22 21:07 menu.php drwxr-xr-x 2 myusername myusername 512 Nov 22 21:07 protected -rw-r--r-- 1 myusername myusername 3448 Nov 22 21:07 register.php -rw-r--r-- 1 myusername myusername 3876 Nov 22 21:07 search.php -rw-r--r-- 1 myusername myusername 2433 Nov 22 21:07 styles.css -rw-r--r-- 1 myusername myusername 497 Nov 22 21:07 wprop.php
2. Do the import
cd /home/userhomedir myusername@mylocalserver: /home/userhomedir > svn import onlinepasswords https://onlinepasswords.svn.sourceforge.net/svnroot/onlinepasswords -m initial --username mysfusername
Output:
Error validating server certificate for 'https://onlinepasswords.svn.sourceforge.net:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: *.svn.sourceforge.net - Valid: from Tue, 09 Oct 2007 14:15:07 GMT until Mon, 08 Dec 2008 15:15:07 GMT - Issuer: Equifax Secure Certificate Authority, Equifax, US - Fingerprint: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx (R)eject, accept (t)emporarily or accept (p)ermanently? p Authentication realm: <https://onlinepasswords.svn.sourceforge.net:443> SourceForge Subversion area Password for 'mysfusername': <entered sourceforge password> Adding onlinepasswords/delete.php Adding onlinepasswords/docs Adding onlinepasswords/docs/index.txt Adding onlinepasswords/docs/index.html Adding (bin) onlinepasswords/edit.gif Adding onlinepasswords/protected Adding onlinepasswords/protected/readme.txt Adding onlinepasswords/menu.php Adding onlinepasswords/search.php Adding onlinepasswords/flatfile_utils.php Adding onlinepasswords/edit1.php Adding onlinepasswords/index.php Adding onlinepasswords/wprop.php Adding onlinepasswords/login.php Adding onlinepasswords/class.hash_crypt.php Adding onlinepasswords/logout.php Adding (bin) onlinepasswords/delete.gif Adding onlinepasswords/fclear.js Adding onlinepasswords/log.php Adding onlinepasswords/register.php Adding onlinepasswords/styles.css Adding onlinepasswords/edit.php Adding onlinepasswords/flatfile.php Adding onlinepasswords/add.php Committed revision 1.
3. Verify
myusername@mylocalserver: /home/userhomedir > svn list https://onlinepasswords.svn.sourceforge.net/svnroot/onlinepasswords
Output:
Error validating server certificate for 'https://onlinepasswords.svn.sourceforge.net:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: *.svn.sourceforge.net - Valid: from Tue, 09 Oct 2007 14:15:07 GMT until Mon, 08 Dec 2008 15:15:07 GMT - Issuer: Equifax Secure Certificate Authority, Equifax, US - Fingerprint: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx (R)eject, accept (t)emporarily or accept (p)ermanently? p add.php class.hash_crypt.php delete.gif delete.php docs/ edit.gif edit.php edit1.php fclear.js flatfile.php flatfile_utils.php index.php log.php login.php logout.php menu.php protected/ register.php search.php styles.css wprop.php myusername@mylocalserver: /home/userhomedir >
4. Delete the directory from which the import was done. This is where we are going to create the working copy. You can just choose a difference location if required. Why are we doing this? Because I am moving sourceforge to be my main repository and make my local as the client which will have the files from svn. So sourceforge will maintain my project files going forward and I don't have to trust my backups!
cd /home/userhomedir myusername@mylocalserver: /home/userhomedir > rm -Rf onlinepasswords
5. Create a working copy directory and downloading the files that were just uploaded
cd /home/userhomedir svn checkout https://onlinepasswords.svn.sourceforge.net/svnroot/onlinepasswords onlinepasswords
Output:
Error validating server certificate for 'https://onlinepasswords.svn.sourceforge.net:443': - The certificate is not issued by a trusted authority. Use the fingerprint to validate the certificate manually! Certificate information: - Hostname: *.svn.sourceforge.net - Valid: from Tue, 09 Oct 2007 14:15:07 GMT until Mon, 08 Dec 2008 15:15:07 GMT - Issuer: Equifax Secure Certificate Authority, Equifax, US - Fingerprint: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx (R)eject, accept (t)emporarily or accept (p)ermanently? p A onlinepasswords/delete.php A onlinepasswords/docs A onlinepasswords/docs/index.txt A onlinepasswords/docs/index.html A onlinepasswords/protected A onlinepasswords/protected/readme.txt A onlinepasswords/edit.gif A onlinepasswords/menu.php A onlinepasswords/search.php A onlinepasswords/edit1.php A onlinepasswords/flatfile_utils.php A onlinepasswords/wprop.php A onlinepasswords/index.php A onlinepasswords/class.hash_crypt.php A onlinepasswords/login.php A onlinepasswords/logout.php A onlinepasswords/delete.gif A onlinepasswords/fclear.js A onlinepasswords/log.php A onlinepasswords/register.php A onlinepasswords/styles.css A onlinepasswords/edit.php A onlinepasswords/flatfile.php A onlinepasswords/add.php Checked out revision 1.
cd onlinepasswords myusername@mylocalserver: /home/userhomedir/onlinepasswords > ls -la
Output:
total 152 drwxr-xr-x 5 myusername myusername 512 Nov 23 08:21 . drwxr-xr-x 55 myusername myusername 2048 Nov 23 08:21 .. drwxr-xr-x 6 myusername myusername 512 Nov 23 08:21 .svn -rw-r--r-- 1 myusername myusername 4348 Nov 23 08:21 add.php -rw-r--r-- 1 myusername myusername 6667 Nov 23 08:21 class.hash_crypt.php -rw-r--r-- 1 myusername myusername 889 Nov 23 08:21 delete.gif -rw-r--r-- 1 myusername myusername 808 Nov 23 08:21 delete.php drwxr-xr-x 3 myusername myusername 512 Nov 23 08:21 docs -rw-r--r-- 1 myusername myusername 622 Nov 23 08:21 edit.gif -rw-r--r-- 1 myusername myusername 3251 Nov 23 08:21 edit.php -rw-r--r-- 1 myusername myusername 1596 Nov 23 08:21 edit1.php -rw-r--r-- 1 myusername myusername 286 Nov 23 08:21 fclear.js -rw-r--r-- 1 myusername myusername 25079 Nov 23 08:21 flatfile.php -rw-r--r-- 1 myusername myusername 3108 Nov 23 08:21 flatfile_utils.php -rw-r--r-- 1 myusername myusername 481 Nov 23 08:21 index.php -rw-r--r-- 1 myusername myusername 218 Nov 23 08:21 log.php -rw-r--r-- 1 myusername myusername 2125 Nov 23 08:21 login.php -rw-r--r-- 1 myusername myusername 123 Nov 23 08:21 logout.php -rw-r--r-- 1 myusername myusername 455 Nov 23 08:21 menu.php drwxr-xr-x 3 myusername myusername 512 Nov 23 08:21 protected -rw-r--r-- 1 myusername myusername 3448 Nov 23 08:21 register.php -rw-r--r-- 1 myusername myusername 3876 Nov 23 08:21 search.php -rw-r--r-- 1 myusername myusername 2433 Nov 23 08:21 styles.css -rw-r--r-- 1 myusername myusername 497 Nov 23 08:21 wprop.php
5. Check for updates (there will be none!)
myusername@mylocalserver: /home/userhomedir/onlinepasswords > svn update
Output:
At revision 1.
6. Undoing Working Changes
myusername@mylocalserver: /home/userhomedir/onlinepasswords > <edit add.php and make some changes> svn revert add.php
Output:
Reverted 'add.php'
7. Other operations
The typical work cycle looks like this:
Update your working copy.
svn update
Make changes.
svn add svn delete svn copy svn move
Examine your changes.
svn status svn diff
Possibly undo some changes.
svn revert
Resolve conflicts (merge others' changes).
svn update svn resolve
Commit your changes.
svn commit