home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 22 gnu
/
22-gnu.zip
/
rcs567x.zip
/
doc
/
co.man
< prev
next >
Wrap
Text File
|
1994-03-22
|
24KB
|
529 lines
CO(1) CO(1)
NNAAMMEE
co - check out RCS revisions
SSYYNNOOPPSSIISS
ccoo [_o_p_t_i_o_n_s] _f_i_l_e ...
DDEESSCCRRIIPPTTIIOONN
ccoo retrieves a revision from each RCS file and stores it
into the corresponding working file.
Pathnames matching an RCS suffix denote RCS files; all
others denote working files. Names are paired as
explained in ccii(1).
Revisions of an RCS file can be checked out locked or
unlocked. Locking a revision prevents overlapping
updates. A revision checked out for reading or processing
(e.g., compiling) need not be locked. A revision checked
out for editing and later checkin must normally be locked.
Checkout with locking fails if the revision to be checked
out is currently locked by another user. (A lock can be
broken with rrccss(1).) Checkout with locking also requires
the caller to be on the access list of the RCS file,
unless he is the owner of the file or the superuser, or
the access list is empty. Checkout without locking is not
subject to accesslist restrictions, and is not affected by
the presence of locks.
A revision is selected by options for revision or branch
number, checkin date/time, author, or state. When the
selection options are applied in combination, ccoo retrieves
the latest revision that satisfies all of them. If none
of the selection options is specified, ccoo retrieves the
latest revision on the default branch (normally the trunk,
see the --bb option of rrccss(1)). A revision or branch number
can be attached to any of the options --ff, --II, --ll, --MM, --pp,
--qq, --rr, or --uu. The options --dd (date), --ss (state), and --ww
(author) retrieve from a single branch, the _s_e_l_e_c_t_e_d
branch, which is either specified by one of --ff,, ..., --uu,
or the default branch.
A ccoo command applied to an RCS file with no revisions cre-
ates a zero-length working file. ccoo always performs key-
word substitution (see below).
OOPPTTIIOONNSS
--rr[_r_e_v]
retrieves the latest revision whose number is less
than or equal to _r_e_v. If _r_e_v indicates a branch
rather than a revision, the latest revision on that
branch is retrieved. If _r_e_v is omitted, the latest
revision on the default branch (see the --bb option
of rrccss(1)) is retrieved. If _r_e_v is $$, ccoo deter-
mines the revision number from keyword values in
GNU 1994/03/17 1
CO(1) CO(1)
the working file. Otherwise, a revision is com-
posed of one or more numeric or symbolic fields
separated by periods. If _r_e_v begins with a period,
then the default branch (normally the trunk) is
prepended to it. If _r_e_v is a branch number fol-
lowed by a period, then the latest revision on that
branch is used. The numeric equivalent of a sym-
bolic field is specified with the --nn option of the
commands ccii(1) and rrccss(1).
--ll[_r_e_v]
same as --rr, except that it also locks the retrieved
revision for the caller.
--uu[_r_e_v]
same as --rr, except that it unlocks the retrieved
revision if it was locked by the caller. If _r_e_v is
omitted, --uu retrieves the revision locked by the
caller, if there is one; otherwise, it retrieves
the latest revision on the default branch.
--ff[_r_e_v]
forces the overwriting of the working file; useful
in connection with --qq. See also FILE MODES below.
--kkkkvv Generate keyword strings using the default form,
e.g. $$RReevviissiioonn:: 55..1122 $$ for the RReevviissiioonn keyword. A
locker's name is inserted in the value of the
HHeeaaddeerr, IIdd, and LLoocckkeerr keyword strings only as a
file is being locked, i.e. by ccii --ll and ccoo --ll.
This is the default.
--kkkkvvll Like --kkkkvv, except that a locker's name is always
inserted if the given revision is currently locked.
--kkkk Generate only keyword names in keyword strings;
omit their values. See KEYWORD SUBSTITUTION below.
For example, for the RReevviissiioonn keyword, generate the
string $$RReevviissiioonn$$ instead of $$RReevviissiioonn:: 55..1122 $$.
This option is useful to ignore differences due to
keyword substitution when comparing different revi-
sions of a file. Log messages are inserted after
$$LLoogg$$ keywords even if --kkkk is specified, since this
tends to be more useful when merging changes.
--kkoo Generate the old keyword string, present in the
working file just before it was checked in. For
example, for the RReevviissiioonn keyword, generate the
string $$RReevviissiioonn:: 11..11 $$ instead of $$RReevviissiioonn:: 55..1122
$$ if that is how the string appeared when the file
was checked in. This can be useful for binary file
formats that cannot tolerate any changes to sub-
strings that happen to take the form of keyword
strings.
GNU 1994/03/17 2
CO(1) CO(1)
--kkvv Generate only keyword values for keyword strings.
For example, for the RReevviissiioonn keyword, generate the
string 55..1122 instead of $$RReevviissiioonn:: 55..1122 $$. This can
help generate files in programming languages where
it is hard to strip keyword delimiters like
$$RReevviissiioonn:: $$ from a string. However, further key-
word substitution cannot be performed once the key-
word names are removed, so this option should be
used with care. Because of this danger of losing
keywords, this option cannot be combined with --ll,
and the owner write permission of the working file
is turned off; to edit the file later, check it out
again without --kkvv.
--pp[_r_e_v]
prints the retrieved revision on the standard out-
put rather than storing it in the working file.
This option is useful when ccoo is part of a pipe.
--qq[_r_e_v]
quiet mode; diagnostics are not printed.
--II[_r_e_v]
interactive mode; the user is prompted and ques-
tioned even if the standard input is not a termi-
nal.
--dd_d_a_t_e retrieves the latest revision on the selected
branch whose checkin date/time is less than or
equal to _d_a_t_e. The date and time can be given in
free format. The time zone LLTT stands for local
time; other common time zone names are understood.
For example, the following _d_a_t_es are equivalent if
local time is January 11, 1990, 8pm Pacific Stan-
dard Time, eight hours west of Coordinated Univer-
sal Time (UTC):
88::0000 ppmm lltt
44::0000 AAMM,, JJaann.. 1122,, 11999900 default is UTC
11999900--0011--1122 0044::0000::0000++00000000 ISO 8601 (UTC)
11999900--0011--1111 2200::0000::0000--00880000 ISO 8601 (local time)
11999900//0011//1122 0044::0000::0000 traditional RCS format
TThhuu JJaann 1111 2200::0000::0000 11999900 LLTT output of ccttiimmee(3) + LLTT
TThhuu JJaann 1111 2200::0000::0000 PPSSTT 11999900 output of ddaattee(1)
FFrrii JJaann 1122 0044::0000::0000 GGMMTT 11999900
TThhuu,, 1111 JJaann 11999900 2200::0000::0000 --00880000 Internet RFC 822
1122--JJaannuuaarryy--11999900,, 0044::0000 WWEETT
Most fields in the date and time can be defaulted.
The default time zone is normally UTC, but this can
be overridden by the --zz option. The other defaults
are determined in the order year, month, day, hour,
minute, and second (most to least significant). At
least one of these fields must be provided. For
GNU 1994/03/17 3
CO(1) CO(1)
omitted fields that are of higher significance than
the highest provided field, the time zone's current
values are assumed. For all other omitted fields,
the lowest possible values are assumed. For exam-
ple, without --zz, the date 2200,, 1100::3300 defaults to
10:30:00 UTC of the 20th of the UTC time zone's
current month and year. The date/time must be
quoted if it contains spaces.
--MM[_r_e_v]
Set the modification time on the new working file
to be the date of the retrieved revision. Use this
option with care; it can confuse mmaakkee(1).
--ss_s_t_a_t_e
retrieves the latest revision on the selected
branch whose state is set to _s_t_a_t_e.
--TT Preserve the modification time on the RCS file even
if the RCS file changes because a lock is added or
removed. This option can suppress extensive recom-
pilation caused by a mmaakkee(1) dependency of some
other copy of the working file on the RCS file.
Use this option with care; it can suppress recompi-
lation even when it is needed, i.e. when the change
of lock would mean a change to keyword strings in
the other working file.
--ww[_l_o_g_i_n]
retrieves the latest revision on the selected
branch which was checked in by the user with login
name _l_o_g_i_n. If the argument _l_o_g_i_n is omitted, the
caller's login is assumed.
--jj_j_o_i_n_l_i_s_t
generates a new revision which is the join of the
revisions on _j_o_i_n_l_i_s_t. This option is largely
obsoleted by rrccssmmeerrggee(1) but is retained for back-
wards compatibility.
The _j_o_i_n_l_i_s_t is a comma-separated list of pairs of
the form _r_e_v_2::_r_e_v_3_, where _r_e_v_2 and _r_e_v_3 are (sym-
bolic or numeric) revision numbers. For the ini-
tial such pair, _r_e_v_1 denotes the revision selected
by the above options --ff,, ..., --ww. For all other
pairs, _r_e_v_1 denotes the revision generated by the
previous pair. (Thus, the output of one join
becomes the input to the next.)
For each pair, ccoo joins revisions _r_e_v_1 and _r_e_v_3
with respect to _r_e_v_2. This means that all changes
that transform _r_e_v_2 into _r_e_v_1 are applied to a copy
of _r_e_v_3. This is particularly useful if _r_e_v_1 and
_r_e_v_3 are the ends of two branches that have _r_e_v_2 as
GNU 1994/03/17 4
CO(1) CO(1)
a common ancestor. If _r_e_v_1<_r_e_v_2<_r_e_v_3 on the same
branch, joining generates a new revision which is
like _r_e_v_3_, but with all changes that lead from _r_e_v_1
to _r_e_v_2 undone. If changes from _r_e_v_2 to _r_e_v_1 over-
lap with changes from _r_e_v_2 to _r_e_v_3_, ccoo reports
overlaps as described in mmeerrggee(1).
For the initial pair, _r_e_v_2 can be omitted. The
default is the common ancestor. If any of the
arguments indicate branches, the latest revisions
on those branches are assumed. The options --ll and
--uu lock or unlock _r_e_v_1.
--VV Print RCS's version number.
--VV_n Emulate RCS version _n_, where _n can be 33, 44, or 55.
This can be useful when interchanging RCS files
with others who are running older versions of RCS.
To see which version of RCS your correspondents are
running, have them invoke rrccss --VV; this works with
newer versions of RCS. If it doesn't work, have
them invoke rrlloogg on an RCS file; if none of the
first few lines of output contain the string
bbrraanncchh:: it is version 3; if the dates' years have
just two digits, it is version 4; otherwise, it is
version 5. An RCS file generated while emulating
version 3 loses its default branch. An RCS revi-
sion generated while emulating version 4 or earlier
has a time stamp that is off by up to 13 hours. A
revision extracted while emulating version 4 or
earlier contains abbreviated dates of the form
_y_y//_m_m//_d_d and can also contain different white space
and line prefixes in the substitution for $$LLoogg$$.
--xx_s_u_f_f_i_x_e_s
Use _s_u_f_f_i_x_e_s to characterize RCS files. See ccii(1)
for details.
--zz_z_o_n_e specifies the date output format in keyword substi-
tution, and specifies the default time zone for
_d_a_t_e in the --dd_d_a_t_e option. The _z_o_n_e should be
empty, a numeric UTC offset, or the special string
LLTT for local time. The default is an empty _z_o_n_e,
which uses the traditional RCS format of UTC with-
out any time zone indication and with slashes sepa-
rating the parts of the date; otherwise, times are
output in ISO 8601 format with time zone indica-
tion. For example, if local time is January 11,
1990, 8pm Pacific Standard Time, eight hours west
of UTC, then the time is output as follows:
GNU 1994/03/17 5
CO(1) CO(1)
_o_p_t_i_o_n _t_i_m_e _o_u_t_p_u_t
--zz 11999900//0011//1111 0044::0000::0000 _(_d_e_f_a_u_l_t_)
--zzLLTT 11999900--0011--1111 2200::0000::0000--00880000
--zz++00553300 11999900--0011--1111 0099::3300::0000++00553300
The --zz option does not affect dates stored in RCS
files, which are always UTC.
KKEEYYWWOORRDD SSUUBBSSTTIITTUUTTIIOONN
Strings of the form $$_k_e_y_w_o_r_d$$ and $$_k_e_y_w_o_r_d::_._._.$$ embedded
in the text are replaced with strings of the form $$_k_e_y_-
_w_o_r_d::_v_a_l_u_e$$ where _k_e_y_w_o_r_d and _v_a_l_u_e are pairs listed
below. Keywords can be embedded in literal strings or
comments to identify a revision.
Initially, the user enters strings of the form $$_k_e_y_w_o_r_d$$_.
On checkout, ccoo replaces these strings with strings of the
form $$_k_e_y_w_o_r_d::_v_a_l_u_e$$_. If a revision containing strings of
the latter form is checked back in, the value fields will
be replaced during the next checkout. Thus, the keyword
values are automatically updated on checkout. This auto-
matic substitution can be modified by the --kk options.
Keywords and their corresponding values:
$$AAuutthhoorr$$
The login name of the user who checked in the revi-
sion.
$$DDaattee$$ The date and time the revision was checked in.
With --zz_z_o_n_e a numeric time zone offset is appended;
otherwise, the date is UTC.
$$HHeeaaddeerr$$
A standard header containing the full pathname of
the RCS file, the revision number, the date and
time, the author, the state, and the locker (if
locked). With --zz_z_o_n_e a numeric time zone offset is
appended to the date; otherwise, the date is UTC.
$$IIdd$$ Same as $$HHeeaaddeerr$$, except that the RCS filename is
without a path.
$$LLoocckkeerr$$
The login name of the user who locked the revision
(empty if not locked).
$$LLoogg$$ The log message supplied during checkin, preceded
by a header containing the RCS filename, the revi-
sion number, the author, and the date and time.
With --zz_z_o_n_e a numeric time zone offset is appended;
otherwise, the date is UTC. Existing log messages
are _n_o_t replaced. Instead, the new log message is
inserted after $$LLoogg::...$$. This is useful for
GNU 1994/03/17 6
CO(1) CO(1)
accumulating a complete change log in a source
file. Each inserted line is prefixed by the string
that prefixes the $$LLoogg$$ line. For example, if the
$$LLoogg$$ line is "//// $$LLoogg:: ttaann..cccc $$", RCS prefixes
each line of the log with "//// ". This is useful
for programming languages without multi-line com-
ments.
$$NNaammee$$ The symbolic name used to check out the revision,
if any. For example, ccoo --rrJJooee generates
$$NNaammee:: JJooee $$. Plain ccoo generates just $$NNaammee:: $$.
$$RRCCSSffiillee$$
The name of the RCS file without a path.
$$RReevviissiioonn$$
The revision number assigned to the revision.
$$SSoouurrccee$$
The full pathname of the RCS file.
$$SSttaattee$$
The state assigned to the revision with the --ss
option of rrccss(1) or ccii(1).
The following characters in keyword values are represented
by escape sequences to keep keyword strings well-formed.
_c_h_a_r _e_s_c_a_p_e _s_e_q_u_e_n_c_e
tab \\tt
newline \\nn
space \\004400
$$ \\004444
\\ \\\\
FFIILLEE MMOODDEESS
The working file inherits the read and execute permissions
from the RCS file. In addition, the owner write permis-
sion is turned on, unless --kkvv is set or the file is
checked out unlocked and locking is set to strict (see
rrccss(1)).
If a file with the name of the working file exists already
and has write permission, ccoo aborts the checkout, asking
beforehand if possible. If the existing working file is
not writable or --ff is given, the working file is deleted
without asking.
FFIILLEESS
ccoo accesses files much as ccii(1) does, except that it does
not need to read the working file unless a revision number
of $$ is specified.
GNU 1994/03/17 7
CO(1) CO(1)
EENNVVIIRROONNMMEENNTT
RRCCSSIINNIITT
options prepended to the argument list, separated
by spaces. See ccii(1) for details.
DDIIAAGGNNOOSSTTIICCSS
The RCS pathname, the working pathname, and the revision
number retrieved are written to the diagnostic output.
The exit status is zero if and only if all operations were
successful.
IIDDEENNTTIIFFIICCAATTIIOONN
Author: Walter F. Tichy.
Manual Page Revision: 5.12; Release Date: 1994/03/17.
Copyright (C) 1982, 1988, 1989 Walter F. Tichy.
Copyright (C) 1990, 1991, 1992, 1993, 1994 Paul Eggert.
SSEEEE AALLSSOO
rcsintro(1), ci(1), ctime(3), date(1), ident(1), make(1),
rcs(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1),
rcsfile(5)
Walter F. Tichy, RCS--A System for Version Control,
_S_o_f_t_w_a_r_e_-_-_P_r_a_c_t_i_c_e _& _E_x_p_e_r_i_e_n_c_e 1155, 7 (July 1985),
637-654.
LLIIMMIITTSS
Links to the RCS and working files are not preserved.
There is no way to selectively suppress the expansion of
keywords, except by writing them differently. In nroff
and troff, this is done by embedding the null-character \\&&
into the keyword.
GNU 1994/03/17 8