rcsintro.5 (2010 09)

r
rcsintro(5) rcsintro(5)
NAME
rcsintro - description of RCS commands
DESCRIPTION
Revision Control System (RCS) automates the storing, retrieval, logging, identification, and merging of
revisions of ASCII text files. RCS is useful for managing files that are revised frequently.
Functions of RCS
Storage and retrieval of revisions of text files. RCS saves revisions in a space-efficient way. Revi-
sions can be retrieved by ranges of revision numbers, symbolic names, dates, authors, and states.
Maintenance of a complete history of changes. RCS logs all changes automatically. In addition to
the text of each revision, RCS stores the author, date and time of check-in, and a log message sum-
marizing the change.
Resolution of access conflicts. When two or more people try to modify the same revision of a file,
RCS alerts them and prevents one modification from corrupting the other.
Maintenance of a tree of revisions. RCS can maintain separate lines of development for each file. It
stores a tree structure that represents the ancestral relationships among revisions.
Merging of revisions and resolution of conflicts. Two separate lines of development of a file can be
coalesced by merging. If the revisions to be merged affect the same lines of a file, RCS flags the
overlapping changes.
Release and configuration control. Revisions can be assigned symbolic names and marked as
released, stable, experimental, etc. With these facilities, configurations of a file can be described
simply and directly.
Automatic identification of each revision with file name, revision number, creation time, author, etc.
This identification is like a stamp that can be embedded at an appropriate place in the text of a revi-
sion. These stamps make it simple to determine which revisions of which files make up a given
configuration.
Minimization of secondary storage. RCS uses very little extra space for revisions (only the
differences are stored). If intermediate revisions are deleted, the remaining deltas are compressed
accordingly.
Getting Started with RCS
The basic user interface is extremely simple. The novice only needs to learn two commands:
ci
and co
(see ci (1) and co (1)). ci, short for check in, deposits the contents of a text file into an archival file called
an RCS file. An RCS file contains all revisions of a particular text file.
co, short for check out , retrieves
revisions from an RCS file.
Suppose you have a file
f.c that you wish to put under control of RCS. Invoke the check-in command:
ci f.c
This command creates the RCS file f.c,v, stores f.c into it as revision 1.1, and deletes f.c. It also
asks you for a description. The description should be a synopsis of the contents of the file. All subsequent
check-in commands will ask for a log entry, which should summarize the changes that were made.
Files with names ending with
,v are called RCS files (v stands for "versions"); all other files are
presumed to be working files. To get back the working file f.c in the previous example, use the check-
out command:
co f.c
This command extracts the latest revision from f.c,v and writes it into f.c. You can now edit f.c and
check it back in by invoking:
ci f.c
ci increments the revision number properly. If ci complains with the message:
ci error: no lock set by your-login
your system administrator has decided to create all RCS files with the locking attribute set to "strict". In
this case, you should have locked the revision during the previous check-out. Your last check-out should
have been:
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)