Basic Operation
Normally, you maintain RCS files in a subdirectory called RCS, so the first step in using RCS should be:
mkdir RCS
Next, you place an existing file (or files) under RCS control by running the check-in command:
ci fileThis creates a file called file ,v in the RCS directory. file
,v is called an RCS file, and it
stores all future revisions of file. When you run
ci on a file for the first time,
you are prompted to describe the contents. ci then deposits file
into the RCS file as revision 1.1.
To edit a new revision, check out a copy:
co -l fileThis causes RCS to extract a copy of file
from the RCS file. You must lock the file with -l to
make it writable by you. This copy is called a working
file. When you’re done editing, you can record the changes
by checking the working file back in again:
ci fileThis time, you are prompted to enter a log of the changes made, and the file is deposited as revision 1.2. Note that a check-in normally removes the working file. To retrieve a read-only copy, do a check-out without a lock:
co fileThis is useful when you need to keep a copy on hand for compiling or searching. As a shortcut to the previous ci/co, you could type:
ci -u fileThis checks in the file but immediately checks out a read-only (“unlocked”) copy. In practice, you would probably make a “checkpoint” of your working version and then keep going, like this:
ci -l fileThis checks in the file, and then checks it back out again, locked, for continued work. To compare changes between ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access