Subversion is a centralised version control system, commonly abbreviated SVN. Jones has a Subversion repository at /Volumes/Data/svnrep which is accessible locally or over SSH.
Here is a walkthrough for the command line version of Subversion, svn. Instructions for more advanced clients should show up later, but if you are working from Jones, only the command line version is available. Instructions are given below both for remote use and jones use---only the first import is different, although remote use will prompt you for your password every time.
Check out a project to your computer
If you are creating a new subversion project, first log on to jones and run svnadmin create /Volumes/Data/svnrep/projectname. Check /Volumes/Data/svnrep to make sure nobody else has used your project name first.
Then, if you are importing your code from your local machine, you will need to provide your normal ssh credentials, username and password. After the first time subversion remembers the location of the repository and just asks for your password.
svn import util svn+ssh://username@jones.ling.indiana.edu/Volumes/Data/svnrep/util -m "Initial commit" # OR if working from Jones svn import util file:///Volumes/Data/svnrep/util -m "Initial commit"
The message passed after -m is required at each check-in and explains what changed. However, if somebody else created the repository, you need to check it out instead. First change to a directory where you keep source code (mine is called ~/src)
cd ~/src svn checkout svn+ssh://username@jones.ling.indiana.edu/Volumes/Data/svnrep/util
This creates a directory called util that is a working copy of the util subversion repository.
Normal use cycle
# 1. make changes ... cd util emacs lst.py svn add type.py # 2. now check to see if anybody else has changed things at the same time svn update # 2a. if so, figure out which version of the code to use and use that one emacs lst.py svn resolved # 3. now check in the changes svn ci -m "Fixed some list code and added type checking utilities" # 4. repeat from the top
Here is a nice tutorial on setting up your computer to talk to Subversion via SSH.
http://www.logemann.org/day/archives/000099.html
The instructions are for a Windows client, but apply to Unix as well; you just leave out the steps that tell you to convert the key to PuTTY format.
Uncategorised Notes
Never edit /Volumes/Data/svnrep directly. Always use subversion commands. The only exception is that svnadmin doesn't have a delete command, so if you want to delete a repository, you'll have to say rm -r /Volumes/data/svnrep/repository.
The home page of Subversion is http://subversion.tigris.org, I think.
The normal way to create a subversion repository imports all files in the directory. If this is not what you want, try this instead:
svnadmin create /Volumes/Data/svnrep/newrepo svn co /Volumes/Data/svnrep/newrepo newrepo svn add file1.c svn add file2.c svn add build.py # etc etc ... svn ci -m "Initial commit"
To make svn stat stop showing a lot of unimportant files with ? in its output, do svn propedit svn:ignore . and add patterns like *aux, *pdf, etc. You might have to export EDITOR=emacs in your ~/.profile to make this work.
