|
RCS: Why and How
|
RCS is a freely available file revision control system that was
originally developed by Walter Tichy at Purdue University but is now
distributed by the Free Software Foundation and maintained by Paul Eggert.
You should know and use RCS, because it allows you to
- get easy access to all previous versions of files to
- undo unfortunate modifications,
- reconstruct the source code of old file versions;
- get easy access to a list of changes (diff) that have been made
to the files;
- get experience using a revision control system without the complexities
of more advanced systems.
RCS consists of the four frequently used shell commands
ci, co, rlog, and
rcsdiff, as well as of the rarely needed commands
rcs, ident,
rcsclean, and rcsmerge.
Read
man rcsintro
to get a quick overview of
the system. Basically all you have to remember is:
- ci -l filename
- Upload your latest changes back into the database, but do not release
the lock and keep a writable working file.
(Without option -l, ci would remove the file
you're working on and you'd have to use co to get it back.)
- ci -u filename
- Upload (check in) your latest changes back into the database, release
your lock, and keep a read-only copy of the file.
(Without option -u, ci would remove your
working file and you'd have to use co to get it back.)
- co filename
- Retrieve (check out) an unlocked latest-version read-only working
file from the database.
- co -l filename
- Retrieve a locked latest-version writable working
file from the database. Only one user can have such a writable
locked version at a time.
- rlog filename
- Show the revision history of a file.
- rcsdiff filename
- Show the differences between your working file and the latest
revision in the database.
The primary owner of a file creates a subdirectory RCS/
in the
directory where their files to be managed are located. In this
directory, the RCS commands will keep a
filename,v database file associated with
your working file. This database file will contain the entire revision
history of one of your files.
See the man pages of each command for more information.
NOTE:
RCS offers version
control only for individual files and provides no support for remote
access. Its facilities for collaborative work are quite restricted. It
has no notion of directory trees and changes to them (e.g., copying or
renaming files and directories). For any project that consists of more
than a very small number of files or that has subdirectories or
multiple people working on it, RCS is no longer considered an
appropriate choice.
The Subversion system
(see manual)
is a sophisticated revision control system that can handle these
advanced conditions.
This handout based on
http://www.cl.cam.ac.uk/~mgk25/rcsintro.html by
Markus Kuhn.