no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | tech:others:sf_svn [2014/11/15 15:13] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using Subversion on Sourceforge.net ====== | ||
+ | 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. | ||
+ | |||
+ | ====== Resources for Getting Subversion working on Sourceforge.net ====== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ====== Onlinepasswords on Sourceforge.net ====== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Actual steps to getting SVN working on Sourceforge.net ====== | ||
+ | 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 / | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | ls -la | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | total 152 | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | </ | ||
+ | |||
+ | 2. Do the import | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | myusername@mylocalserver: | ||
+ | svn import onlinepasswords https:// | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | Error validating server certificate for ' | ||
+ | - The certificate is not issued by a trusted authority. Use the | ||
+ | | ||
+ | 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: | ||
+ | (R)eject, accept (t)emporarily or accept (p)ermanently? | ||
+ | Authentication realm: < | ||
+ | Password for ' | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | |||
+ | Committed revision 1. | ||
+ | </ | ||
+ | |||
+ | 3. Verify | ||
+ | |||
+ | <code bash> | ||
+ | myusername@mylocalserver: | ||
+ | svn list https:// | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | Error validating server certificate for ' | ||
+ | - The certificate is not issued by a trusted authority. Use the | ||
+ | | ||
+ | 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: | ||
+ | (R)eject, accept (t)emporarily or accept (p)ermanently? | ||
+ | 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: | ||
+ | </ | ||
+ | |||
+ | 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 / | ||
+ | myusername@mylocalserver: | ||
+ | rm -Rf onlinepasswords | ||
+ | </ | ||
+ | |||
+ | 5. Create a working copy directory and downloading the files that were just uploaded | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | svn checkout https:// | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | Error validating server certificate for ' | ||
+ | - The certificate is not issued by a trusted authority. Use the | ||
+ | | ||
+ | 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: | ||
+ | (R)eject, accept (t)emporarily or accept (p)ermanently? | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | A onlinepasswords/ | ||
+ | Checked out revision 1. | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | cd onlinepasswords | ||
+ | myusername@mylocalserver: | ||
+ | ls -la | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | total 152 | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | drwxr-xr-x | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | -rw-r--r-- | ||
+ | </ | ||
+ | |||
+ | |||
+ | 5. Check for updates (there will be none!) | ||
+ | |||
+ | < | ||
+ | myusername@mylocalserver: | ||
+ | svn update | ||
+ | </ | ||
+ | Output: | ||
+ | < | ||
+ | At revision 1. | ||
+ | </ | ||
+ | |||
+ | |||
+ | 6. Undoing Working Changes | ||
+ | |||
+ | < | ||
+ | myusername@mylocalserver: | ||
+ | <edit add.php and make some changes> | ||
+ | svn revert add.php | ||
+ | </ | ||
+ | |||
+ | Output: | ||
+ | < | ||
+ | Reverted ' | ||
+ | </ | ||
+ | |||
+ | 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' | ||
+ | |||
+ | svn update | ||
+ | svn resolve | ||
+ | |||
+ | Commit your changes. | ||
+ | |||
+ | svn commit | ||