Using a source code versioning system can make any project much easier to work with. Subversion (a.k.a. “svn”) has been set up to allow you to work with your group in a nicely controlled way.
It is strongly suggested that you learn how to use this tool. If you don't know why you would, you might want to read Why Do You Need a Version Control System?
Initial Setup
Subversion should be available in any modern Linux distribution.
On Ubuntu, Subversion is available in the main repository: apt-get install subversion
A repository for each group has been set up on the cmpt470
server. To check it out, use a command in the form (full and partial checkout):
svn co https://punch.cs.sfu.ca/svn/CMPT470-1121-g-group-name
svn co https://punch.cs.sfu.ca/svn/CMPT470-1121-g-group-name/project/trunk/system
See the groups page in CourSys for your exact repository URL. You will also have an individual repository that you can use for your own work and can check out like this:
svn co https://punch.cs.sfu.ca/svn/CMPT470-1121-userid
TortoiseSVN can be used to access Subversion repositories from Windows. It is available on the CSIL Windows machines.
The command-line Subversion client is also installed on the general CSIL Linux machines and can be installed on any Linux machine. Linux users might also want to try RabbitVCS, a graphical Subversion client similar to TortiseSVN.
Mac users should be able to use either the svn
command line client. You could also try SmartSVN or Versions (although neither is truly free).
The Subversion command line tool needs to know what editor you want to use to edit revision comments and other files. If it's not working automatically, the easiest way to set things up is to run these commands: (Replace nano
with another editor if you like.)
echo "export SVN_EDITOR='nano -w'" >> ~/.bash_profile
source ~/.bash_profile
Using
The online book Version Control with Subversion is the definitive reference on Subversion. Unlike most references, the first couple of chapters provide a good explanation of why you'd want to use the thing in the first place.
Here is a bare minimum that you need to know, if you already know what a source control system is for, and are willing to go to the above resources when you need to handle other cases:
- Check out (part of) the repository with a command like the above.
-
Do some work on it. If you create new files, add them to the repository with a command like this:
svn add file.php
-
Check your changes back into the repository:
cd /root/directory/of/your/work
svn ciType a short description of the changes you're checking in.
-
Update the repository to get changes made by others:
cd /root/directory/of/checked/out/version
svn up
See Also
Security
If you're going to be checking out anything into a web-accessible directory, consider adding this to your Apache config:
<DirectoryMatch ".*/\.svn/">
Order allow,deny
Deny from all
</DirectoryMatch>
This will prevent any of the files in the Subversion working directory from being served up. See also a longer description of the problem in Smashing Magazine.