home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
317a.lha
/
RCS
/
doc
/
co.1l.doc
< prev
next >
Wrap
Text File
|
1989-12-05
|
15KB
|
397 lines
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
NAME
co - check out RCS revisions
SYNOPSIS
co [ options ] file ...
DESCRIPTION
_C_o retrieves a revision from each RCS file and stores it
into the corresponding working file. Each file name ending
in `,v' is taken to be an RCS file; all other files are
assumed to be working files. If only a working file is
given, _c_o tries to find the corresponding RCS file in the
directory ./RCS and then in the current directory. For more
details, see the file naming section below.
Revisions of an RCS file may be checked out locked or
unlocked. Locking a revision prevents overlapping updates. A
revision checked out for reading or processing (e.g., com-
piling) need not be locked. A revision checked out for edit-
ing and later checkin must normally be locked. _C_o with lock-
ing fails if the revision to be checked out is currently
locked by another user. (A lock may be broken with the
_r_c_s(1L) command.) _C_o 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. _C_o without locking is not subject to accesslist res-
trictions, 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, _c_o retrieves
the latest revision that satisfies all of them. If none of
the selection options is specified, _c_o retrieves the latest
revision on the default branch (normally the trunk, see the
-b option of _r_c_s(1L)). A revision or branch number may be
attached to any of the options -f, -l, -p, -q, -r, or -u.
The options -d (date), -s (state), and -w (author) retrieve
from a single branch, the _s_e_l_e_c_t_e_d branch, which is either
specified by one of -f,..., -u, or the default branch.
A _c_o command applied to an RCS file with no revisions
creates a zero-length working file. _C_o always performs key-
word substitution (see below).
-r[_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 revi-
sion on that branch is retrieved. If _r_e_v is
omitted, the latest revision on the default
branch (see the -b option of _r_c_s(1L)) is
retrieved. _R_e_v is composed of one or more
numeric or symbolic fields separated by `.'. The
Purdue University Last change: 1
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
numeric equivalent of a symbolic field is speci-
fied with the -n option of the commands _c_i(1L)
and _r_c_s(1L).
-l[_r_e_v] same as -r, except that it also locks the
retrieved revision for the caller. See option -r
for handling of the revision number _r_e_v .
-u[_r_e_v] same as -r, except that it unlocks the retrieved
revision (if it was locked by the caller). If _r_e_v
is omitted, -u retrieves the latest revision
locked by the caller; if no such lock exists, it
retrieves the latest revision on the default
branch.
-f[_r_e_v] forces the overwriting of the working file; use-
ful in connection with -q. See also the section
on file modes below.
-p[_r_e_v] prints the retrieved revision on the standard
output rather than storing it in the working
file. This option is useful when _c_o is part of a
pipe.
-q[_r_e_v] quiet mode; diagnostics are not printed.
-d_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 may be given in
free format and are converted to local time.
Examples of formats for _d_a_t_e:
_2_2-_A_p_r_i_l-_1_9_8_2, _1_7:_2_0-_C_D_T,
_2:_2_5 _A_M, _D_e_c. _2_9, _1_9_8_3,
_T_u_e-_P_D_T, _1_9_8_1, _4_p_m _J_u_l _2_1 (free format),
_F_r_i, _A_p_r_i_l _1_6 _1_5:_5_2:_2_5 _E_S_T _1_9_8_2 (output of ctime).
Most fields in the date and time may be
defaulted. _C_o determines the defaults in the
order year, month, day, hour, minute, and second
(most to least significant). At least one of
these fields must be provided. For omitted fields
that are of higher significance than the highest
provided field, the current values are assumed.
For all other omitted fields, the lowest possible
values are assumed. For example, the date "20,
10:30" defaults to 10:30:00 of the 20th of the
current month and current year. The date/time
must be quoted if it contains spaces.
-s_s_t_a_t_e retrieves the latest revision on the selected
branch whose state is set to _s_t_a_t_e.
Purdue University Last change: 2
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
-w[_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 omit-
ted, the caller's login is assumed.
-j_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. _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 (symbolic or numeric)
revision numbers. For the initial such pair,
_r_e_v_1 denotes the revision selected by the above
options -r, ..., -w. 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, _c_o 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 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 overlap with changes
from _r_e_v_2 to _r_e_v_3, _c_o prints a warning and
includes the overlapping sections, delimited by
the lines <<<<<<< _r_e_v_1, =======, and
>>>>>>> _r_e_v_3.
For the initial pair, _r_e_v_2 may 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 -l
and -u lock or unlock _r_e_v_1.
KEYWORD SUBSTITUTION
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 may be embedded in literal strings or com-
ments to identify a revision.
Initially, the user enters strings of the form $_k_e_y_w_o_r_d$.
On checkout, _c_o 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.
Purdue University Last change: 3
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
Keywords and their corresponding values:
$Author$ The login name of the user who checked in the
revision.
$Date$ The date and time the revision was checked in.
$Header$ A standard header containing the full pathname
of the RCS file, the revision number, the date,
the author, the state, and the locker (if
locked).
$Id$ Same as $Header$, except that the RCS file name
is without a path.
$Locker$ The login name of the user who locked the revi-
sion (empty if not locked).
$Log$ The log message supplied during checkin, pre-
ceded by a header containing the RCS file name,
the revision number, the author, and the date.
Existing log messages are NOT replaced.
Instead, the new log message is inserted after
$_L_o_g:...$. This is useful for accumulating a
complete change log in a source file.
$RCSfile$ The name of the RCS file without path.
$Revision$ The revision number assigned to the revision.
$Source$ The full pathname of the RCS file.
$State$ The state assigned to the revision with the -s
option of _r_c_s(1L) or _c_i(1L).
Pairs of RCS files and working files may be specified in 3
ways (see also the example section).
1) Both the RCS file and the working file are given. The RCS
file name is of the form _p_a_t_h_1/_w_o_r_k_f_i_l_e,_v and the working
file name is of the form _p_a_t_h_2/_w_o_r_k_f_i_l_e, where _p_a_t_h_1/ and
_p_a_t_h_2/ are (possibly different or empty) paths and _w_o_r_k_f_i_l_e
is a file name.
2) Only the RCS file is given. Then the working file is
created in the current directory and its name is derived
from the name of the RCS file by removing _p_a_t_h_1/ and the
suffix ,_v.
3) Only the working file is given. Then _c_o looks for an RCS
file of the form _p_a_t_h_2/_R_C_S/_w_o_r_k_f_i_l_e,_v or _p_a_t_h_2/_w_o_r_k_f_i_l_e,_v
(in this order).
Purdue University Last change: 4
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
If the RCS file is specified without a path in 1) and 2),
then _c_o looks for the RCS file first in the directory ./RCS
and then in the current directory.
EXAMPLES
Suppose the current directory contains a subdirectory `RCS'
with an RCS file `io.c,v'. Then all of the following com-
mands retrieve the latest revision from `RCS/io.c,v' and
store it into `io.c'.
co io.c; co RCS/io.c,v; co io.c,v;
co io.c RCS/io.c,v; co io.c io.c,v;
co RCS/io.c,v io.c; co io.c,v io.c;
FILE MODES
The working file inherits the read and execute permissions
from the RCS file. In addition, the owner write permission
is turned on, unless the file is checked out unlocked and
locking is set to _s_t_r_i_c_t (see _r_c_s(1L)).
If a file with the name of the working file exists already
and has write permission, _c_o aborts the checkout if -q is
given, or asks whether to abort if -q is not given. If the
existing working file is not writable or -f is given, the
working file is deleted without asking.
FILES
The caller of the command must have write permission in the
working directory, read permission for the RCS file, and
either read permission (for reading) or read/write permis-
sion (for locking) in the directory which contains the RCS
file.
A number of temporary files are created. A semaphore file
is created in the directory of the RCS file to prevent
simultaneous update.
DIAGNOSTICS
The RCS file name, the working file name, and the revision
number retrieved are written to the diagnostic output. The
exit status always refers to the last file checked out, and
is 0 if the operation was successful, 1 otherwise.
IDENTIFICATION
Author: Walter F. Tichy, Purdue University, West Lafayette,
IN, 47907.
Revision Number: 1.4 ; Release Date: 89/05/02 .
Copyright c 1982, 1988, 1989 by Walter F. Tichy.
SEE ALSO
ci(1L), ident(1L), rcs(1L), rcsdiff(1L), rcsintro(1L),
rcsmerge(1L), rlog(1L), rcsfile(5L)
Purdue University Last change: 5
CO(1L) UNKNOWN SECTION OF THE MANUAL CO(1L)
Walter F. Tichy, "Design, Implementation, and Evaluation of
a Revision Control System," in _P_r_o_c_e_e_d_i_n_g_s _o_f _t_h_e _6_t_h _I_n_t_e_r_-
_n_a_t_i_o_n_a_l _C_o_n_f_e_r_e_n_c_e _o_n _S_o_f_t_w_a_r_e _E_n_g_i_n_e_e_r_i_n_g, IEEE, Tokyo,
Sept. 1982.
LIMITATIONS
The option -d gets confused in some circumstances, and
accepts no date before 1970. Links to the RCS and working
files are not preserved. There is no way to 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.
BUGS
The option -j does not work for files that contain lines
with a single `.'.
Purdue University Last change: 6