Revision Control System

RCS is a set of tools ( ci, co, rcs, rlog ) that make up the revision control system. I am providign a list of common flags. For more complete information look at the man pages on any of the tools.

Make a directory in the current path named "RCS" , and all of the log files will be kept there, otherwise you will have all of the files in the current directory ( which is messy ).

Basic commands

checks in and removes existing copy
ci -u
checks in and releases lock (file becomes read-only)
ci -l
checks in and retains lock (file is rw)
checks out with no lock (read-only)
co -u
checks out with no lock (read-only)
co -l
checks out and obtains exclusive lock
look at log
compare revisions and create patches. Example:
rcsdiff -r1.4 -u foo.c
rcs -u
break locks
read any log entries on the file

Logs and headers in files

  • Put strings into files and RCS will expand them:
  • For example, $Header$ gets expanded to something like this:
    $Header: RCS/foo.cpp,v 1.2 1999/04/26 23:18:53 jclark $

Reverting to old versions without dealing with branch messiness

  • Reverting to an old version by checking out the old version and then checking it back in would normally force you to deal with branches which can get messy.
  • An easier way is to do something like:
    ci -l foo.cpp     # save old version before clobbering
                      # plus get a lock on the file
    co -r1.5 foo.cpp  # revert to version 1.5
    ci -u foo.cpp     # check in the reverted file and unlock