Version 1 (modified by tim, 7 years ago) (diff)

A simple page briefly outlining subversion use

Getting the Source Code

PC-BSD uses a Subversion source control repository, in which all source code is stored. This document briefly discusses the basics of use Subversion, for more detail visit the Subversion manual

Checking out the code is easy. Make sure you have the subversion client installed, then:

For the entire tree, including all branches:
svn co svn://

For trunk only:
svn co svn://

For the 1.4 branch only:
svn co svn://

Once you have the tree checked out, you're free to browse it on your local filesystem. To update the tree to any new revisions however, you need to issue the update command. The update command will update the tree from the directory you're currently in, to all those below it. So, to update the entire repository:

cd /path/to/repository/root
svn up

Making Commits

First, you need a Subversion username and password before you can commit changes into the tree. Contact Tim, Kris, or the development mailing list for one of these.

Once you have it, and you've made whatever changes to the files you want to commit, you're ready to check them into subversion. Checking in works recursively downwards like the 'svn up' command. So make sure you've changed directories so all the changes you've made are 'below' you in the filesystem to ensure all your changes are committed in one go. If they're not, you'll just have to make a second commit. The subversion command for a commit is:

svn ci -m "Log message here"

Please try to make your log message as informative as possible. It should summarise the changes you made to the code.

Adding files

A commit will only checkin changes you've made to files already in the repository. If you want to add a new file to the repository, you need to add it to Subversion before committing it:

svn add source.cpp

The add command supports wildcard matching. *.cpp for example. Once the files are added, you'll need to commit them as discussed earlier.

Removing files

Sometimes, you're going to want to remove a file from the repository altogether. Probably because it's no longer needed, but sometimes because you added it by accident. The method for doing this is similar to the add command. Don't remove it from your filesystem yourself, instead:

svn rm source.cpp

Like the add command, rm supports wildcard matching. Once the file has been removed, you need to commit the change as discussed earlier.