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. + 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. + 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. 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 -l 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. Quite often you want to check-in a copy of a working file for backup purposes but keep the working file around for more editing. The -l option applied to the ci command effectively combines the check-in and check-out operations above. For example: ci -l f.c If you do not want to clutter your working directory with RCS files, create a subdirectory called RCS in your working directory, and move all your RCS files there. RCS commands will search that directory to find needed files. All the commands discussed above will still work without any modification. You can give ci the number you want assigned to a checked in revision. Assume all your revisions were numbered 1.1, 1.2, 1.3, etc., and you would like to start release 2. The command: ci -r2 f.c or ci -r2.1 f.c assigns the number 2.1 to the new revision. From then on, ci will number the subsequent revisions with 2.2, 2.3, etc. The corresponding co commands: co -r2 f.c and co -r2.1 f.c retrieve the latest revision numbered 2.x and the revision 2.1, respectively. co without a revision number selects the latest revision on the "trunk"; i.e., the highest revision with a number consisting of 2 fields. Automatic Identification RCS can put special strings for identification into your source and object code. To obtain such identification, place the marker: $Header$ into your text, for instance inside a comment. RCS replaces this marker with a string of the form: $Header: filename revision_number date time author state$ With such a marker on the first page of each module, you can always see with which revision you are working. RCS keeps the markers up- to-date automatically. WARNINGS RCS is designed to be used with TEXT files only. Attempting to use RCS with non-text (binary) files will result in data corruption. SEE ALSO ci(1), co(1), ident(1), merge(1), rcs(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(4).