Subversion Repository
Table of Contents
Subversion is an open source application used for revision control. It is sometimes abbreviated to svn in reference to the name of its command line interface. Subversion is designed specifically to be a modern replacement for CVS and shares a number of the same key developers.
CIForge provides Subversion access to developers and users at http://www.ciforge.com/svn/test
CIForge Subversion
Everyone has read access to all subversion repositories.
Only users with TRAC_ADMIN or SVN_WRITE permissions have write access. You can assign permissions with TracAdmin.
Note: While it is possible to assign SVN_WRITE to anonymous users, it is highly recommended that you do not do so. You should only allow write access to trusted developers.
Using Subversion
To get started, you'll need a Subversion client.
- On Linux, this is usually provided in a package 'subversion' or 'svn' and used on the command-line. There are several graphical front-ends available as well.
- On Windows, TortoiseSVN is an excellent choice.
Note: although this guide provides instructions for the command-line svn client, all actions are still applicable to TortoiseSVN. It adds all the same commands to the right-click context menu in Explorer windows.
Getting your source
To check out the source to your project, use:
svn checkout http://www.ciforge.com/svn/test/
You can also check out specific parts of your project, such as:
svn co http://www.ciforge.com/svn/test/trunk/
Updating
When you are starting to work on code, you should always update to be sure you're working on the latest revision (in case another developer has made changes). In the directory that contains your code, simply run:
svn update
Adding files
To add a new file into the repository, simply use
svn add '''filename'''
You'll still need to commit changes to add this to the repository.
Moving and Deleting files
If you want to move or delete a file, you should use the commands svn move, svn copy, svn delete etc. This way a revision history is kept for the files in their new locations, and other users who update their repositories will get these changes as well.
Checking status
svn status (gives overview of what was changed) svn diff (shows diff of your copy against svn) svn revert (oops, if you want to back out a change)
Commiting changes
When you are finished editing files, you can run:
svn commit
To commit your changes to the repository. An editor will open and prompt you to enter a commit message. This message helps to show what changes were done, what bugs were fixed, etc, and shows up in the TracTimeline. Remember that you can also use wiki-style links in your commit messages.
More Help
Run svn help for a complete list of command-line options, or read The Subversion Book.
Shortcuts
For most commands there are shortcuts available: "svn co" for checkout, "svn up" for update, etc.
See Also: TracGuide, TracBrowser
