13 co \- check out RCS revisions
16 .RI [ options ] " file " .\|.\|.
19 retrieves a revision from each \*r file and stores it into
20 the corresponding working file.
22 Pathnames matching an \*r suffix denote \*r files;
23 all others denote working files.
24 Names are paired as explained in
27 Revisions of an \*r file can be checked out locked or unlocked. Locking a
28 revision prevents overlapping updates. A revision checked out for reading or
29 processing (e.g., compiling) need not be locked. A revision checked out
30 for editing and later checkin must normally be locked. Checkout with locking
31 fails if the revision to be checked out is currently locked by another user.
32 (A lock can be broken with
34 Checkout with locking also requires the caller to be on the access list of
35 the \*r file, unless he is the owner of the
36 file or the superuser, or the access list is empty.
37 Checkout without locking is not subject to accesslist restrictions, and is
38 not affected by the presence of locks.
40 A revision is selected by options for revision or branch number,
41 checkin date/time, author, or state.
42 When the selection options
43 are applied in combination,
45 retrieves the latest revision
46 that satisfies all of them.
47 If none of the selection options
50 retrieves the latest revision
51 on the default branch (normally the trunk, see the
55 A revision or branch number can be attached
73 retrieve from a single branch, the
76 which is either specified by one of
80 or the default branch.
84 command applied to an \*r
85 file with no revisions creates a zero-length working file.
87 always performs keyword substitution (see below).
91 retrieves the latest revision whose number is less than or equal to
95 indicates a branch rather than a revision,
96 the latest revision on that branch is retrieved.
99 is omitted, the latest revision on the default branch
110 determines the revision number from keyword values in the working file.
111 Otherwise, a revision is composed of one or more numeric or symbolic fields
112 separated by periods.
115 begins with a period,
116 then the default branch (normally the trunk) is prepended to it.
119 is a branch number followed by a period,
120 then the latest revision on that branch is used.
121 The numeric equivalent of a symbolic field
122 is specified with the
124 option of the commands
132 except that it also locks the retrieved revision for
138 except that it unlocks the retrieved revision if it was
139 locked by the caller. If
143 retrieves the revision locked by the caller, if there is one; otherwise,
144 it retrieves the latest revision on the default branch.
147 forces the overwriting of the working file;
148 useful in connection with
155 Generate keyword strings using the default form, e.g.\&
156 .B "$\&Revision: \*(Rv $"
160 A locker's name is inserted in the value of the
166 only as a file is being locked,
176 except that a locker's name is always inserted
177 if the given revision is currently locked.
180 Generate only keyword names in keyword strings; omit their values.
182 .SM "KEYWORD SUBSTITUTION"
186 keyword, generate the string
189 .BR "$\&Revision: \*(Rv $" .
190 This option is useful to ignore differences due to keyword substitution
191 when comparing different revisions of a file.
192 Log messages are inserted after
197 since this tends to be more useful when merging changes.
200 Generate the old keyword string,
201 present in the working file just before it was checked in.
204 keyword, generate the string
205 .B "$\&Revision: 1.1 $"
207 .B "$\&Revision: \*(Rv $"
208 if that is how the string appeared when the file was checked in.
209 This can be useful for file formats
210 that cannot tolerate any changes to substrings
211 that happen to take the form of keyword strings.
214 Generate a binary image of the old keyword string.
217 except it performs all working file input and output in binary mode.
218 This makes little difference on Posix and Unix hosts,
219 but on DOS-like hosts one should use
221 to initialize an \*r file intended to be used for binary files.
224 normally refuses to merge files when
229 Generate only keyword values for keyword strings.
232 keyword, generate the string
235 .BR "$\&Revision: \*(Rv $" .
236 This can help generate files in programming languages where it is hard to
237 strip keyword delimiters like
240 However, further keyword substitution cannot be performed once the
241 keyword names are removed, so this option should be used with care.
242 Because of this danger of losing keywords,
243 this option cannot be combined with
245 and the owner write permission of the working file is turned off;
246 to edit the file later, check it out again without
250 prints the retrieved revision on the standard output rather than storing it
252 This option is useful when
257 quiet mode; diagnostics are not printed.
261 the user is prompted and questioned
262 even if the standard input is not a terminal.
265 retrieves the latest revision on the selected branch whose checkin date/time is
266 less than or equal to
268 The date and time can be given in free format.
271 stands for local time;
272 other common time zone names are understood.
273 For example, the following
276 if local time is January 11, 1990, 8pm Pacific Standard Time,
277 eight hours west of Coordinated Universal Time (\*u):
282 .ta \w'\f3Thu, 11 Jan 1990 20:00:00 \-0800\fP 'u
285 \f34:00 AM, Jan. 12, 1990\fP default is \*u
286 \f31990-01-12 04:00:00+00\fP \*i 8601 (\*u)
287 \f31990-01-11 20:00:00\-08\fP \*i 8601 (local time)
288 \f31990/01/12 04:00:00\fP traditional \*r format
289 \f3Thu Jan 11 20:00:00 1990 LT\fP output of \f3ctime\fP(3) + \f3LT\fP
290 \f3Thu Jan 11 20:00:00 PST 1990\fP output of \f3date\fP(1)
291 \f3Fri Jan 12 04:00:00 GMT 1990\fP
292 \f3Thu, 11 Jan 1990 20:00:00 \-0800\fP Internet RFC 822
293 \f312-January-1990, 04:00 WET\fP
298 Most fields in the date and time can be defaulted.
299 The default time zone is normally \*u, but this can be overridden by the
302 The other defaults are determined in the order year, month, day,
303 hour, minute, and second (most to least significant). At least one of these
304 fields must be provided. For omitted fields that are of higher significance
305 than the highest provided field, the time zone's current values are assumed.
306 For all other omitted fields,
307 the lowest possible values are assumed.
313 10:30:00 \*u of the 20th of the \*u time zone's current month and year.
314 The date/time must be quoted if it contains spaces.
318 Set the modification time on the new working file
319 to be the date of the retrieved revision.
320 Use this option with care; it can confuse
324 retrieves the latest revision on the selected branch whose state is set to
328 Preserve the modification time on the \*r file
329 even if the \*r file changes because a lock is added or removed.
330 This option can suppress extensive recompilation caused by a
332 dependency of some other copy of the working file on the \*r file.
333 Use this option with care; it can suppress recompilation even when it is needed,
334 i.e. when the change of lock
335 would mean a change to keyword strings in the other working file.
337 .BR \-w [\f2login\fP]
338 retrieves the latest revision on the selected branch which was checked in
339 by the user with login name
344 omitted, the caller's login is assumed.
347 generates a new revision which is the join of the revisions on
349 This option is largely obsoleted by
351 but is retained for backwards compatibility.
356 is a comma-separated list of pairs of the form
362 are (symbolic or numeric)
364 For the initial such pair,
366 denotes the revision selected
373 denotes the revision generated by the previous pair.
375 of one join becomes the input to the next.)
385 This means that all changes that transform
389 are applied to a copy of
391 This is particularly useful if
395 are the ends of two branches that have
397 as a common ancestor. If
398 .IR rev1 < rev2 < rev3
400 joining generates a new revision which is like
402 but with all changes that lead from
411 overlap with changes from
416 reports overlaps as described in
419 For the initial pair,
421 can be omitted. The default is the common
423 If any of the arguments indicate branches, the latest revisions
424 on those branches are assumed.
434 Print \*r's version number.
446 This can be useful when interchanging \*r files with others who are
447 running older versions of \*r.
448 To see which version of \*r your correspondents are running, have them invoke
450 this works with newer versions of \*r.
451 If it doesn't work, have them invoke
454 if none of the first few lines of output contain the string
457 if the dates' years have just two digits, it is version 4;
458 otherwise, it is version 5.
459 An \*r file generated while emulating version 3 loses its default branch.
460 An \*r revision generated while emulating version 4 or earlier has
461 a time stamp that is off by up to 13 hours.
462 A revision extracted while emulating version 4 or earlier contains
463 abbreviated dates of the form
465 and can also contain different white space and line prefixes
466 in the substitution for
472 to characterize \*r files.
478 specifies the date output format in keyword substitution,
479 and specifies the default time zone for
486 should be empty, a numeric \*u offset, or the special string
489 The default is an empty
491 which uses the traditional \*r format of \*u without any time zone indication
492 and with slashes separating the parts of the date;
493 otherwise, times are output in \*i 8601 format with time zone indication.
494 For example, if local time is January 11, 1990, 8pm Pacific Standard Time,
495 eight hours west of \*u,
496 then the time is output as follows:
501 .ta \w'\f3\-z+05:30\fP 'u +\w'\f31990-01-11 09:30:00+05:30\fP 'u
503 \f2option\fP \f2time output\fP
504 \f3\-z\fP \f31990/01/12 04:00:00\fP \f2(default)\fP
505 \f3\-zLT\fP \f31990-01-11 20:00:00\-08\fP
506 \f3\-z+05:30\fP \f31990-01-12 09:30:00+05:30\fP
513 option does not affect dates stored in \*r files,
514 which are always \*u.
516 .SH "KEYWORD SUBSTITUTION"
520 .BI $ keyword : .\|.\|. $
522 the text are replaced
523 with strings of the form
524 .BI $ keyword : value $
529 are pairs listed below.
530 Keywords can be embedded in literal strings
531 or comments to identify a revision.
533 Initially, the user enters strings of the form
537 replaces these strings with strings of the form
538 .BI $ keyword : value $ .
539 If a revision containing strings of the latter form
540 is checked back in, the value fields will be replaced during the next
542 Thus, the keyword values are automatically updated on checkout.
543 This automatic substitution can be modified by the
547 Keywords and their corresponding values:
550 The login name of the user who checked in the revision.
553 The date and time the revision was checked in.
556 a numeric time zone offset is appended; otherwise, the date is \*u.
559 A standard header containing the full pathname of the \*r file, the
560 revision number, the date and time, the author, the state,
561 and the locker (if locked).
564 a numeric time zone offset is appended to the date; otherwise, the date is \*u.
569 except that the \*r filename is without a path.
572 The login name of the user who locked the revision (empty if not locked).
575 The log message supplied during checkin, preceded by a header
576 containing the \*r filename, the revision number, the author, and the date
580 a numeric time zone offset is appended; otherwise, the date is \*u.
581 Existing log messages are
584 Instead, the new log message is inserted after
585 .BR $\&Log: .\|.\|. $ .
587 accumulating a complete change log in a source file.
590 Each inserted line is prefixed by the string that prefixes the
592 line. For example, if the
595 .RB \*(lq "//\ $\&Log: tan.cc\ $" \*(rq,
596 \*r prefixes each line of the log with
597 .RB \*(lq "//\ " \*(rq.
598 This is useful for languages with comments that go to the end of the line.
599 The convention for other languages is to use a
600 .RB \*(lq " \(** " \(rq
601 prefix inside a multiline comment.
602 For example, the initial log comment of a C program
603 conventionally is of the following form:
618 For backwards compatibility with older versions of \*r, if the log prefix is
622 surrounded by optional white space, inserted log lines contain a space
627 however, this usage is obsolescent and should not be relied on.
631 The symbolic name used to check out the revision, if any.
635 .BR "$\&Name:\ Joe\ $" .
639 .BR "$\&Name:\ \ $" .
642 The name of the \*r file without a path.
645 The revision number assigned to the revision.
648 The full pathname of the \*r file.
651 The state assigned to the revision with the
658 The following characters in keyword values are represented by escape sequences
659 to keep keyword strings well-formed.
665 \f2char escape sequence\fP
674 The working file inherits the read and execute permissions from the \*r
675 file. In addition, the owner write permission is turned on, unless
678 is checked out unlocked and locking is set to strict (see
681 If a file with the name of the working file exists already and has write
685 asking beforehand if possible.
686 If the existing working file is
689 is given, the working file is deleted without asking.
692 accesses files much as
694 does, except that it does not need to read the working file
695 unless a revision number of
701 options prepended to the argument list, separated by spaces.
706 The \*r pathname, the working pathname,
707 and the revision number retrieved are
708 written to the diagnostic output.
709 The exit status is zero if and only if all operations were successful.
711 Author: Walter F. Tichy.
713 Manual Page Revision: \*(Rv; Release Date: \*(Dt.
715 Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
717 Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
719 rcsintro(1), ci(1), ctime(3), date(1), ident(1), make(1),
720 rcs(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1),
724 \*r\*-A System for Version Control,
725 .I "Software\*-Practice & Experience"
727 7 (July 1985), 637-654.
729 Links to the \*r and working files are not preserved.
731 There is no way to selectively suppress the expansion of keywords, except
732 by writing them differently. In nroff and troff, this is done by embedding the