SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Mandrake Other rcs-5.7-7.i386.rpm

CO

Section: User Commands (1)
Updated: 1995/06/01
Index 

NAME

co - check out RCS revisions 

SYNOPSIS

co[options] file ... 

DESCRIPTION

coretrieves a revision from each RCS file and stores it intothe corresponding working file.

Pathnames matching an RCS suffix denote RCS files;all others denote working files.Names are paired as explained inci(1).

Revisions of an RCS file can be checked out locked or unlocked. Locking arevision prevents overlapping updates. A revision checked out for reading orprocessing (e.g., compiling) need not be locked. A revision checked outfor editing and later checkin must normally be locked. Checkout with lockingfails if the revision to be checked out is currently locked by another user.(A lock can be broken withrcs(1).) Checkout with locking also requires the caller to be on the access list ofthe RCS file, unless he is the owner of thefile or the superuser, or the access list is empty.Checkout without locking is not subject to accesslist restrictions, and isnot 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 optionsare applied in combination,coretrieves the latest revisionthat satisfies all of them.If none of the selection optionsis specified,coretrieves the latest revisionon the default branch (normally the trunk, see the-boption ofrcs(1)).A revision or branch number can be attachedto any of the options-f,-I,-l,-M,-p,-q,-r,or-u.The options-d(date),-s(state), and-w(author)retrieve from a single branch, theselectedbranch,which is either specified by one of-f,...,-u,or the default branch.

Acocommand applied to an RCSfile with no revisions creates a zero-length working file.coalways performs keyword substitution (see below). 

OPTIONS

-r[rev]
retrieves the latest revision whose number is less than or equal torev.Ifrevindicates a branch rather than a revision,the latest revision on that branch is retrieved.Ifrevis omitted, the latest revision on the default branch(see the-boption ofrcs(1))is retrieved.Ifrevis$,codetermines the revision number from keyword values in the working file.Otherwise, a revision is composed of one or more numeric or symbolic fieldsseparated by periods.Ifrevbegins with a period,then the default branch (normally the trunk) is prepended to it.Ifrevis a branch number followed by a period,then the latest revision on that branch is used.The numeric equivalent of a symbolic fieldis specified with the-noption of the commandsci(1)andrcs(1).
-l[rev]
same as-r,except that it also locks the retrieved revision forthe caller.
-u[rev]
same as-r,except that it unlocks the retrieved revision if it waslocked by the caller. Ifrevis omitted,-uretrieves the revision locked by the caller, if there is one; otherwise,it retrieves the latest revision on the default branch.
-f[rev]
forces the overwriting of the working file;useful in connection with-q.See alsoFILE MODESbelow.
-kkv
Generate keyword strings using the default form, e.g.$Revision: 5.13 $for theRevisionkeyword.A locker's name is inserted in the value of theHeader,Id,andLockerkeyword stringsonly as a file is being locked,i.e. byci -landco -l.This is the default.
-kkvl
Like-kkv,except that a locker's name is always insertedif the given revision is currently locked.
-kk
Generate only keyword names in keyword strings; omit their values.SeeKEYWORD SUBSTITUTIONbelow.For example, for theRevisionkeyword, generate the string$Revision$instead of$Revision: 5.13 $.This option is useful to ignore differences due to keyword substitutionwhen comparing different revisions of a file.Log messages are inserted after$Log$keywords even if-kkis specified,since this tends to be more useful when merging changes.
-ko
Generate the old keyword string,present in the working file just before it was checked in.For example, for theRevisionkeyword, generate the string$Revision: 1.1 $instead of$Revision: 5.13 $if that is how the string appeared when the file was checked in.This can be useful for file formatsthat cannot tolerate any changes to substringsthat happen to take the form of keyword strings.
-kb
Generate a binary image of the old keyword string.This acts like-ko,except it performs all working file input and output in binary mode.This makes little difference on Posix and Unix hosts,but on DOS-like hosts one should usercs -i -kbto initialize an RCS file intended to be used for binary files.Also, on all hosts,rcsmerge(1)normally refuses to merge files when-kbis in effect.
-kv
Generate only keyword values for keyword strings.For example, for theRevisionkeyword, generate the string5.13instead of$Revision: 5.13 $.This can help generate files in programming languages where it is hard tostrip keyword delimiters like$Revision: $from a string.However, further keyword substitution cannot be performed once thekeyword names are removed, so this option should be used with care.Because of this danger of losing keywords,this option cannot be combined with-l,and the owner write permission of the working file is turned off;to edit the file later, check it out again without-kv.
-p[rev]
prints the retrieved revision on the standard output rather than storing itin the working file.This option is useful whencois part of a pipe.
-q[rev]
quiet mode; diagnostics are not printed.
-I[rev]
interactive mode;the user is prompted and questionedeven if the standard input is not a terminal.
-ddate
retrieves the latest revision on the selected branch whose checkin date/time isless than or equal todate.The date and time can be given in free format.The time zoneLTstands for local time;other common time zone names are understood.For example, the followingdatesare equivalentif local time is January 11, 1990, 8pm Pacific Standard Time,eight hours west of Coordinated Universal Time (UTC):

8:00 pm lt4:00 AM, Jan. 12, 1990             default is UTC1990-01-12 04:00:00+00             ISO 8601 (UTC)1990-01-11 20:00:00-08             ISO 8601 (local time)1990/01/12 04:00:00                traditional RCS formatThu Jan 11 20:00:00 1990 LT        output of ctime(3) + LTThu Jan 11 20:00:00 PST 1990       output of date(1)Fri Jan 12 04:00:00 GMT 1990Thu, 11 Jan 1990 20:00:00 -0800    Internet RFC 82212-January-1990, 04:00 WET

Most fields in the date and time can be defaulted.The default time zone is normally UTC, but this can be overridden by the-zoption.The other defaults are determined in the order year, month, day,hour, minute, and second (most to least significant). At least one of thesefields must be provided. For omitted fields that are of higher significancethan the highest provided field, the time zone's current values are assumed.For all other omitted fields,the lowest possible values are assumed.For example, without-z,the date20, 10:30defaults to10: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.

-M[rev]
Set the modification time on the new working fileto be the date of the retrieved revision.Use this option with care; it can confusemake(1).
-sstate
retrieves the latest revision on the selected branch whose state is set tostate.
-T
Preserve the modification time on the RCS fileeven if the RCS file changes because a lock is added or removed.This option can suppress extensive recompilation caused by amake(1)dependency of some other copy of the working file on the RCS file.Use this option with care; it can suppress recompilation even when it is needed,i.e. when the change of lockwould mean a change to keyword strings in the other working file.
-w[login]
retrieves the latest revision on the selected branch which was checked inby the user with login namelogin.If the argumentloginisomitted, the caller's login is assumed.
-jjoinlist
generates a new revision which is the join of the revisions onjoinlist.This option is largely obsoleted byrcsmerge(1)but is retained for backwards compatibility.

Thejoinlistis a comma-separated list of pairs of the formrev2:rev3,whererev2andrev3are (symbolic or numeric)revision numbers.For the initial such pair,rev1denotes the revision selectedby the above options-f,...,-w.For all other pairs,rev1denotes the revision generated by the previous pair.(Thus, the outputof one join becomes the input to the next.)

For each pair,cojoins revisionsrev1andrev3with respect torev2.This means that all changes that transformrev2intorev1are applied to a copy ofrev3.This is particularly useful ifrev1andrev3are the ends of two branches that haverev2as a common ancestor. Ifrev1<rev2<rev3on the same branch,joining generates a new revision which is likerev3,but with all changes that lead fromrev1torev2undone.If changes fromrev2torev1overlap with changes fromrev2torev3,coreports overlaps as described inmerge(1).

For the initial pair,rev2can be omitted. The default is the commonancestor.If any of the arguments indicate branches, the latest revisionson those branches are assumed.The options-land-ulock or unlockrev1.

-V
Print RCS's version number.
-Vn
Emulate RCS versionn,wherencan be3,4,or5.This can be useful when interchanging RCS files with others who arerunning older versions of RCS.To see which version of RCS your correspondents are running, have them invokercs -V;this works with newer versions of RCS.If it doesn't work, have them invokerlogon an RCS file;if none of the first few lines of output contain the stringbranch: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 revision generated while emulating version 4 or earlier hasa time stamp that is off by up to 13 hours.A revision extracted while emulating version 4 or earlier containsabbreviated dates of the formyy/mm/ddand can also contain different white space and line prefixesin the substitution for$Log$.
-xsuffixes
Usesuffixesto characterize RCS files.Seeci(1)for details.
-zzone
specifies the date output format in keyword substitution,and specifies the default time zone fordatein the-ddateoption.Thezoneshould be empty, a numeric UTC offset, or the special stringLTfor local time.The default is an emptyzone,which uses the traditional RCS format of UTC without any time zone indicationand with slashes separating the parts of the date;otherwise, times are output in ISO 8601 format with time zone indication.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:

option      time output-z          1990/01/12 04:00:00          (default)-zLT        1990-01-11 20:00:00-08-z+05:30    1990-01-12 09:30:00+05:30

The-zoption does not affect dates stored in RCS files,which are always UTC.

 

KEYWORD SUBSTITUTION

Strings of the form$keyword$and$keyword:...$embedded inthe text are replacedwith strings of the form$keyword:value$wherekeywordandvalueare pairs listed below.Keywords can be embedded in literal stringsor comments to identify a revision.

Initially, the user enters strings of the form$keyword$.On checkout,coreplaces these strings with strings of the form$keyword:value$.If a revision containing strings of the latter formis checked back in, the value fields will be replaced during the nextcheckout.Thus, the keyword values are automatically updated on checkout.This automatic substitution can be modified by the-koptions.

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.With-zzonea numeric time zone offset is appended; otherwise, the date is UTC.
$Header$
A standard header containing the full pathname of the RCS file, therevision number, the date and time, the author, the state,and the locker (if locked).With-zzonea numeric time zone offset is appended to the date; otherwise, the date is UTC.
$Id$
Same as$Header$,except that the RCS filename is without a path.
$Locker$
The login name of the user who locked the revision (empty if not locked).
$Log$
The log message supplied during checkin, preceded by a headercontaining the RCS filename, the revision number, the author, and the dateand time.With-zzonea numeric time zone offset is appended; otherwise, the date is UTC.Existing log messages arenotreplaced.Instead, the new log message is inserted after$Log:...$.This is useful foraccumulating a complete change log in a source file.

Each inserted line is prefixed by the string that prefixes the$Log$line. For example, if the$Log$line is``// $Log: tan.cc $'',RCS prefixes each line of the log with``// ''.This is useful for languages with comments that go to the end of the line.The convention for other languages is to use a`` * "prefix inside a multiline comment.For example, the initial log comment of a C programconventionally is of the following form:

/** $Log$*/

For backwards compatibility with older versions of RCS, if the log prefix is/*or(*surrounded by optional white space, inserted log lines contain a spaceinstead of/or(;however, this usage is obsolescent and should not be relied on.

$Name$
The symbolic name used to check out the revision, if any.For example,co -rJoegenerates$Name: Joe $.Plaincogenerates just$Name:  $.
$RCSfile$
The name of the RCS file without a 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-soption ofrcs(1)orci(1).

The following characters in keyword values are represented by escape sequencesto keep keyword strings well-formed.

char     escape sequencetab      \tnewline  \nspace    \040$        \044\        \\
 

FILE MODES

The working file inherits the read and execute permissions from the RCSfile. In addition, the owner write permission is turned on, unless-kvis set or the fileis checked out unlocked and locking is set to strict (seercs(1)).

If a file with the name of the working file exists already and has writepermission,coaborts the checkout,asking beforehand if possible.If the existing working file isnot writable or-fis given, the working file is deleted without asking. 

FILES

coaccesses files much asci(1)does, except that it does not need to read the working fileunless a revision number of$is specified. 

ENVIRONMENT

RCSINIT
options prepended to the argument list, separated by spaces.Seeci(1)for details.
 

DIAGNOSTICS

The RCS pathname, the working pathname,and the revision number retrieved arewritten to the diagnostic output.The exit status is zero if and only if all operations were successful. 

IDENTIFICATION

Author: Walter F. Tichy.
Manual Page Revision: 5.13; Release Date: 1995/06/01.
Copyright © 1982, 1988, 1989 Walter F. Tichy.
Copyright © 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. 

SEE ALSO

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,Software--Practice & Experience15,7 (July 1985), 637-654. 

LIMITS

Links to the RCS and working files are not preserved.

There is no way to selectively suppress the expansion of keywords, exceptby writing them differently. In nroff and troff, this is done by embedding thenull-character\&into the keyword.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
KEYWORD SUBSTITUTION
FILE MODES
FILES
ENVIRONMENT
DIAGNOSTICS
IDENTIFICATION
SEE ALSO
LIMITS

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector