HP-UX Reference (11i v1 05/09) - 5 Miscellaneous Topics (vol 9)
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. Revisions
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 summarizing
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 overlap-
ping 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 filename, 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 revision.
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(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:
co -l f.c
Section 5−−296 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005