RCS PRIMER

Created: 7/08/1996
Joachim Hammer


RCS (Revision Control System) is our versioning tool of choice. There are essentially two commands that you have to remember:



ci:

The command ci stores new revisions into RCS files. Before you use it, make sure that your working directory has a subdirectory called RCS (that's where the revisions are stored).

Example:

ci Makefile
check in the file called "Makefile"
ci *.c
check in all the C source files in current directory
For each revision deposited, ci prompts for a log message. The log message should summarize the change and must be terminated by end-of-file or by a line containing . by itself. If several files are checked in ci asks whether to reuse the previous log message. Important:

Unless you explicitly specify to keep a copy of the file(s) you are checking in, RCS will remove the original(s) from the working directory. Thus, it is recommended you use the "-u" flag with the ci command. This is useful when you need to keep a copy on hand for searching or compiling.

Example:

ci -u Makefile
check in the file called "Makefile" and immediately checks out a read-only copy

co:

The command co retrieves a revision from each RCS file and stores it into the corresponding working file. Revisions of an RCS file can be checked out locked or unlocked. Locking a revision prevents overlapping updates. A revision checked out for reading or processing (e.g., compiling) need not be locked. A revision checked out for editing and later checkin must normally be locked. Checkout with locking fails if the revision to be checked out is currently locked by another user (A lock can be broken with a special rcs command).

A revision is selected by options for revision or branch number, checkin date/time, author, or state. When the selection options are applied in combination, co retrieves the latest revision that satisfies all of them. If none of the selection options is specified, co retrieves the latest revision on the default branch. (this is usually the case in our project).

Example:

co Makefile
check out the file called "Makefile" as a "read-only" copy (i.e., unlocked)
co -l Makefile
check out the file called "Makefile" as a "writeable" copy (i.e., locked)


Note of advice:

Currently, most TSIMMIS implementors are logging in to the TSIMMIS account as user "tsimmis". Thus it is important to be aware of other "tsimmis users" that are modifying files. RCS will not protect two "tsimmis users" from accidentally wiping out each other's files.

We are currently using RCS as a tool to protect ourselves from wiping out old copies of existing and running code. I encourage all of you to use it and make sure that we have the ability to go back to a previous version in case we have a need.