Revision control: Revision control is the process of keeping track of versions of files. This is particularly important in software development, but it can be equally important when writing papers or anywhere that you update a file and might want to undo changes. There are many UNIX software packages that are used, but we are only going to look at one: RCS (the revision control system). Unlike some revision control systems, RCS works on a file-by-file basis --- many others work on sets of files (projects). Because it doesn't use a concept of a project, RCS is quite easy to start using, whereas more complete solutions like CVS take quite some time to learn to use. Checking in and checking out files: RCS uses checks to mark the version history of a file. When the programmer would like to enter a revision of a file, she "checks the file in". When she would like to work on a copy of the file, she "checks out a copy". These checks are supplemented with locks which ensure that only one copy at a time is checked out. This keeps the programmer from getting more than one copy of a file, and having to deal with different changes to the file. Starting RCS on a file: 1. Make sure that the directory (RCS) exists. Make it if it doesn't exist. Otherwise, RCS will leave a bunch of ,v files in the current directory. 2. Create the file (if it doesn't exist). 3. Do "ci -u file_name". RCS will prompt you for a description of the file. This is a check-in of the initial revision. Making a change to an RCS file: 1. Check out a copy of the file: "co -l file_name". This also locks the file so that you know you are already working on it. 2. Edit the file. 3. Check-in and unlock it: "ci -u file_name" Reverting to an earlier version: 1. Use "rlog file_name" to see the version history. Decide on the version number that you would like. 2. Check out (and lock) a copy of that version: "co -l# file_name" (where # is the version number to use). 3. Edit the file 4. Check-in and unlock it: "ci -u file_name". Notice that this will cause a branch in the revision history. Read the rcsintro manual page for more details. Forcing unlock of a file (this happens): 1. Use "rcs -u file_name" to break the lock. You can also add "-M" to not get mail about the broken lock. Notes: RCS deals quite badly with binary files --- if you are using it to track the version history of a programming project, just use it on the source code.