Revision Numbering
Unless told otherwise, RCS commands typically operate on the
latest revision. Some commands have a -r option
that specifies a revision number. In addition, many options accept a
revision number as an optional argument. (In the command summary,
this argument is shown as [R ].) Revision
numbers consist of up to four fields: release, level, branch, and
sequence, but most revisions consist of only the release and level.
For example, you can check out revision 1.4 as follows:
co -l -r1.4 ch01
When you check it in again, the new revision will be marked as 1.5. Now suppose the edited copy needs to be checked in as the next release. You would type:
ci -r2 ch01
This creates revision 2.1. (Revision numbers always start at one, not at zero.) You can also create a branch from an earlier revision. The following command creates revision 1.4.1.1:
ci -r1.4.1 ch01
Numbers that begin with a period are considered to be relative to the default branch of the RCS file. Normally, this is the “trunk” of the revision tree.
Numbers are not the only way to specify revisions, though. You
can assign a text label as a revision name, using the
-n option of ci
or rcs. You can also specify this
name in any option that accepts a revision number for an argument.
For example, you could check in each of your C files, using the same
label regardless of the current revision number:
ci -u -nPrototype *.c
In addition, you may specify a $, which means the revision number extracted from the keywords of a working ...
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