-->

Previous | Table of Contents | Next

Page 72

OPTIONS

-r[rev] Retrieves the latest revision whose number is less than or equal to rev. If rev indicates a branch rather than a revision, the latest revision on that branch is retrieved. If rev is omitted, the latest revision on the default branch is retrieved; see the _b option of rcs(1). If rev is $, co determines the revision number from keyword values in the working file. Otherwise, a revision is composed of one or more numeric or symbolic fields separated by periods. If rev begins with a period, then the default branch (normally the trunk) is prepended to it. If rev is a branch number followed by a period, then the latest revision on that branch is used. The numeric equivalent of a symbolic field is specified with the _n option of the commands ci(1) and rcs(1).
_l[rev] Same as -r, except that it also locks the retrieved revision for the caller.
_u[rev] Same as -r, except that it unlocks the retrieved revision if it was locked by the caller. If rev is omitted, _u retrieves 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 also "File Modes," later in this manual page.)
_kkv Generate keyword strings using the default form, for example, $Revision: 5.13 $ for the Revision keyword. A locker's name is inserted in the value of the Header, Id, and Locker keyword strings only as a file is being locked, that is, by ci _l and co _l. This is the default.
_kkvl Like _kkv, except that a locker's name is always inserted if the given revision is currently locked.
_kk Generate only keyword names in keyword strings; omit their values. (See "Keyword Substitution," later in this manual page.) For example, for the Revision keyword, generate the string $Revision$ instead of $Revision: 5.13 $. This option is useful to ignore differences due to keyword substitution when comparing different revisions of a file. Log messages are inserted after $Log$ keywords even if _kk is 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 the Revision keyword, 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 formats that cannot tolerate any changes to substrings that 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 use rcs -i _kb to initialize an RCS file normally refuses to merge files when _kb is in effect.
_kv Generate only keyword values for keyword strings. For example, for the Revision keyword, generate the string 5.13 instead of $Revision: 5.13 $. This can help generate files in programming languages where it is hard to strip keyword delimiters like $Revision: $ from a string. However, further keyword substitution cannot be performed once the keyword 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 it in the working file. This option is useful when co is part of a pipe.
_q[rev] Quiet mode; diagnostics are not printed.
_I[rev] Interactive mode; the user is prompted and questioned even if the standard input is not a terminal.
_ddate Retrieves the latest revision on the selected branch whose checkin date/time is less than or equal to date. The date and time can be given in free format. The time zone LT stands for local time; other common time zone names are understood. For example, the following dates are equivalent if local time is January 11, 1990, 8 p.m. Pacific Standard Time, eight hours west of Coordinated Universal Time (UTC):
8:00 PM lt
4:00 AM, Jan. 12, 1990 Default is UTC

Page 73

1990-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 format
Thu Jan 11 20:00:00 1990 LT Output of ctime(3) + LT
Thu Jan 11 20:00:00 PST 1990 Output of date(1)
Fri Jan 12 04:00:00 GMT 1990
Thu, 11 Jan 1990 20:00:00 _0800 Internet RFC 822
12-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 _z 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 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 example, without _z, the date 20, 10:30 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.

_M[rev] Sets the modification time on the new working file to be the date of the retrieved revision. Use this option with care; it can confuse make(1).
_sstate Retrieves the latest revision on the selected branch whose state is set to state.
_T Preserves 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 recompilation caused by a make(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, in other words, when the change of lock would mean a change to keyword strings in the other working file.
_w[login] Retrieves the latest revision on the selected branch that was checked in by the user with login name login. If the argument login is omitted, the caller's login is assumed.
_jjoinlist Generates a new revision which is the join of the revisions on joinlist. This option is largely made obsolete by rcsmerge(1), but is retained for backwards compatibility.
The joinlist is a comma-separated list of pairs of the form rev2:rev3, where rev2 and rev3 are (symbolic or numeric) revision numbers. For the initial such pair, rev1 denotes the revision selected by the options _f, _w. For all other pairs, rev1 denotes the revision generated by the previous pair. (Thus, the output of one join becomes the input to the next.)
For each pair, co joins revisions rev1 and rev3 with respect to rev2. This means that all changes that transform rev2 into rev1 are applied to a copy of rev3. This is particularly useful if rev1 and rev3 are the ends of two branches that have rev2 as a common ancestor. If rev1<rev2<rev3 on the same branch, joining generates a new revision which is like rev3, but with all changes that lead from rev1 to rev2 undone. If changes from rev2 to rev1 overlap with changes from rev2 to rev3, co reports overlaps as described in merge(1).
For the initial pair, rev2 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 _l and _u lock or unlock rev1.
_V Prints RCS's version number.
_Vn Emulates RCS version n, where n can be 3, 4, or 5. 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 rcs _V; this works with newer versions of RCS. If it doesn't work, have them invoke rlog on an RCS file; if none of the first few lines of output contain the string branch:, 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 has a timestamp that is off by up to 13 hours. A revision extracted while emulating version 4 or earlier contains abbreviated dates of the form yy/mm/dd and can also contain different whitespace and line prefixes in the substitution for $Log$.

Previous | Table of Contents | Next