home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rcstxi11.zip / rcstexi.110 / co.tex < prev    next >
Text File  |  1997-03-30  |  30KB  |  824 lines

  1. @c
  2. @c ================================================================================
  3. @c                               Edition 1.1
  4. @c                      of the Texinfo-manuals for the
  5. @c                      (R)evision (C)ontrol (S)ystem
  6. @c                               Version 5.7
  7. @c
  8. @c                  (c) 1982, 1988, 1989 Walter F. Tichy.
  9. @c           (c) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
  10. @c        (c) 1996, 1997 Karl Heinz Marbaise (doing converting job)
  11. @c ================================================================================
  12. @c
  13. @c Discription:
  14. @c    Discription about check out command.
  15. @c
  16. @c Authors:
  17. @c    Walter Tichy,
  18. @c    Paul Eggert,
  19. @c    Karl Heinz Marbaise (doing converting job)
  20. @c
  21. @c e-mail:
  22. @c    Internet: KHMarbaise@p69.ks.fido.de
  23. @c    Fido-net: 2:2452/117.69
  24. @c
  25. @c Bugs, question:
  26. @c    to above e-mail adress.
  27. @c
  28. @c License:
  29. @c    The "Texinfo Edition of the RCS V5.7 manuals" are free
  30. @c    software; you can redistribute it and/or modify it under
  31. @c    the terms of the GNU General Public License as published
  32. @c    by the Free Software Foundation; either version 2, or (at
  33. @c    your option) any later version.
  34. @c
  35. @c    The "Texinfo Edition of the RCS V5.7 manuals" are distributed
  36. @c    in the hope that they will be useful, but WITHOUT ANY WARRANTY;
  37. @c    without even the implied warranty of MERCHANTABILITY or
  38. @c    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
  39. @c    License for more details.
  40. @c
  41. @c    You should have received a copy of the GNU General Public License
  42. @c    along with the "Texinfo Edition of the RCS V5.7 manuals"; see the
  43. @c    file COPYING. If not, write to the:
  44. @c    Free Software Foundation,
  45. @c    59 Temple Place - Suite 330,
  46. @c    Boston, MA 02111-1307, USA.
  47. @c
  48. @c    See \rcstxi.110\COPYING for details.
  49. @c
  50. @c ================================================================================
  51. @c
  52. @c
  53. @c $Id: CO.TEX 1.2 1997/03/30 22:53:10 KHM Exp $
  54. @c
  55. @c =============================================================================
  56. @c co -- check out RCS revsisions
  57. @c -----------------------------------------------------------------------------
  58. @node CheckOut,rcs,CheckIn,Top
  59. @chapter co -- check out RCS revisions
  60. @cindex co
  61. @cindex check out
  62. @menu
  63. * coIntro::      Introduction to @code{co}.
  64.  
  65. * coOptions::    command line options of @code{co}.
  66.  
  67. * coKeyword::    Keyword expansion and valid keywords.
  68. * coFileModes::  File modes.
  69. * coFiles::      Files.
  70.  
  71. * coEnv::        Environment which can change
  72.                  the behaviour of @code{co} and
  73.                  other RCS commands.
  74.  
  75. * coDiag::       Diagnostic output of @code{co}.
  76. * coLimits::     Limits.
  77. @end menu
  78. @c =============================================================================
  79. @c co -- check out RCS revsisions
  80. @c     Description
  81. @c -----------------------------------------------------------------------------
  82. @node coIntro,coOptions,,CheckOut
  83. @section co description
  84. @code{co} retrieves a revision from each RCS file and stores it
  85. into the corresponding working file.
  86.  
  87.  
  88. Pathnames matching an RCS suffix denote RCS files; all others
  89. denote working files. Names are paired as explained in
  90. @ref{ciIntro}.
  91.  
  92.  
  93. Revisions of an RCS file can be checked out locked or unlocked.
  94. Locking a revision prevents overlapping updates.  A revision
  95. checked out for reading or processing (e.g., compiling) need not
  96. be locked.  A revision checked out for editing and later checkin
  97. must normally be locked.  Checkout with locking fails if the
  98. revision to be checked out is currently locked by another user.
  99. (A lock can be broken with @code{rcs} @ref{rcs}). Checkout with
  100. locking also requires the caller to be on the access list of the
  101. RCS file, unless he is the owner of the file or the superuser,
  102. or the access list is empty. Checkout without locking is not
  103. subject to accesslist restrictions, and is not affected by the
  104. presence of locks.
  105.  
  106.  
  107. A revision is selected by options for revision or branch number,
  108. checkin date/time, author, or state. When the selection options
  109. are applied in combination, @code{co} retrieves the latest
  110. revision that satisfies all of them. If none of the selection
  111. options is specified, @code{co} retrieves the latest revision on
  112. the default branch (normally the trunk, see the @code{-b} option
  113. of @ref{rcs}). A revision or branch number can be attached to any
  114. of the options  @code{-f}, @code{-I}, @code{-l}, @code{-M},
  115. @code{-p}, @code{-q}, @code{-r} or @code{-u}. The options
  116. @code{-d} (date), @code{-s}(state), and @code{-w} (author)
  117. retrieve from a single branch, the @code{selected} branch, which
  118. is either specified by one of @code{-f}, @dots{}, @code{-u}, or
  119. the default branch.
  120.  
  121.  
  122. A @code{co} command applied to an RCS file with no revisions
  123. creates a zero-length working file. @code{co} always performs
  124. keyword substitution (see below).
  125.  
  126. @c =============================================================================
  127. @c co -- check out RCS revsisions
  128. @c     Options
  129. @c -----------------------------------------------------------------------------
  130. @node coOptions,coKeyword,coIntro,CheckOut
  131. @section Command line options of co
  132. @ifinfo
  133. Overview off all options which can be given to @code{co}
  134.  
  135. @code{Synopsis}: co [options] file @dots{}
  136. @end ifinfo
  137. @menu
  138. * coOptr::     -r Revision
  139. * coOptl::     -l lock a revision.
  140. * coOptu::     -u unlock a revision.
  141. * coOptf::     -f Force overwriting working file
  142. * coOptk::     -k Keyword strings; Substitution and so on.
  143. * coOptp::     -p Output to standard out.
  144. * coOptq::     -q Quiet mode.
  145. * coOptI::     -I Interactive mode.
  146. * coOptd::     -d Check out by date/time.
  147. * coOptM::     -M Modification time.
  148. * coOpts::     -s set state.
  149. * coOptT::     -T preserve Modification time.
  150. * coOptw::     -w check out by user.
  151. * coOptj::     -j Joining revisions.
  152. * coOptV::     -V Version; Emulation of RCS Version.
  153. * coOptx::     -x Suffixes.
  154. * coOptz::     -z Time zone.
  155. @end menu
  156. @c =============================================================================
  157. @c co -- check out RCS revsisions
  158. @c     Options
  159. @c         option -r
  160. @c -----------------------------------------------------------------------------
  161. @node coOptr,coOptl,,coOptions
  162. @subsection Check out revision
  163. @cindex -r
  164. @cindex revision
  165. @table @code
  166. @item -r@file{rev}
  167.  
  168. retrieves the latest revision whose number is less than or equal
  169. to @file{rev}. If @file{rev} indicates a branch rather than a
  170. revision, the latest revision on that branch is retrieved. If
  171. @file{rev} is omitted, the latest revision on the default branch
  172. (see the @code{-b} option of @ref{rcs}) is retrieved. If
  173. @file{rev} is @code{$}, @code{co} determines the revision number
  174. from keyword values in the working file. Otherwise, a revision is
  175. composed of one or more numeric or symbolic fields separated by
  176. periods. If @file{rev} begins with a period, then the default
  177. branch (normally the trunk) is prepended to it. If @file{rev} is
  178. a branch number followed by a period, then the latest revision on
  179. that branch is used. The numeric equivalent of a symbolic field
  180. is specified with the @code{-n} option of the commands
  181. @xref{ciOptn} and @xref{rcsOptn}.
  182.  
  183. @end table
  184. @c =============================================================================
  185. @c co -- check out RCS revsisions
  186. @c     Options
  187. @c         option -l
  188. @c -----------------------------------------------------------------------------
  189. @node coOptl,coOptu,coOptr,coOptions
  190. @subsection Lock revision
  191. @cindex -l
  192. @cindex lock
  193. @table @code
  194. @item -l@file{rev}
  195.  
  196. same as @code{-r}, except that it also locks the retrieved
  197. revision for the caller.
  198.  
  199. @end table
  200.  
  201. @c =============================================================================
  202. @c co -- check out RCS revsisions
  203. @c     Options
  204. @c         option -u
  205. @c -----------------------------------------------------------------------------
  206. @node coOptu,coOptf,coOptl,coOptions
  207. @subsection Unlock revision
  208. @cindex -u
  209. @cindex lock
  210. @table @code
  211. @item -l@file{rev}
  212.  
  213. same as @code{-r}, except that it unlocks the retrieved revision
  214. if it was locked by the caller.  If @file{rev} is omitted,
  215. @code{-u} retrieves the revision locked by the caller, if there
  216. is one; otherwise, it retrieves the latest revision on the
  217. default branch.
  218.  
  219. @end table
  220.  
  221. @c =============================================================================
  222. @c co -- check out RCS revsisions
  223. @c     Options
  224. @c         option -f
  225. @c -----------------------------------------------------------------------------
  226. @node coOptf,coOptk,coOptu,coOptions
  227. @subsection Force overwriting working file
  228. @cindex -f
  229. @cindex overwriting
  230. @cindex working
  231. @table @code
  232. @item -f@file{rev}
  233.  
  234. forces the overwriting of the working file;
  235. useful in connection with @code{-q}.
  236. @xref{coFileModes}
  237.  
  238. @end table
  239. @c =============================================================================
  240. @c co -- check out RCS revsisions
  241. @c     Options
  242. @c         option -kkv
  243. @c         option -kkvl
  244. @c         option -kk
  245. @c         option -ko
  246. @c         option -kb
  247. @c         option -kv
  248. @c -----------------------------------------------------------------------------
  249. @node coOptk,coOptp,coOptf,coOptions
  250. @subsection Keyword strings
  251. @cindex -kkv
  252. @cindex -kkvl
  253. @cindex -kk
  254. @cindex -ko
  255. @cindex -kb
  256. @cindex -kv
  257. @cindex default form
  258. @table @code
  259. @item -kkv
  260.  
  261. Generate keyword strings using the default form, e.g.
  262. @code{@value{RCSD}Revision : 5.12 @value{RCSD}} for the
  263. @code{Revision} keyword. A locker's name is inserted in the value
  264. of the @code{Header}, @code{Id}, and @code{Locker} keyword
  265. strings only as a file is being locked, i.e. by @code{ci -l} and
  266. @code{co -l}. This is the default.
  267.  
  268. @item -kkvl
  269.  
  270. Like @code{-kkv}, except that a locker's name is always inserted
  271. if the given revision is currently locked.
  272.  
  273. @item -kk
  274.  
  275. Generate only keyword names in keyword strings; omit their
  276. values. See @ref{coKeyword} below. For example, for
  277. the @code{Revision} keyword, generate the string
  278. @code{@value{RCSREVISION}} instead of @code{@value{RCSD}Revision: 5.12
  279. @value{RCSD}}. This option is useful to ignore differences due to
  280. keyword substitution when comparing different revisions of a
  281. file. Log messages are inserted after @code{@value{RCSLOG}} keywords
  282. even if @code{-kk} is specified, since this tends to be more
  283. useful when merging changes.
  284.  
  285. @item -ko
  286.  
  287. Generate the old keyword string,
  288. present in the working file just before it was checked in.
  289. For example, for the @code{Revision}
  290. keyword, generate the string
  291. @code{@value{RCSD}Revision: 1.1 @value{RCSD}}
  292. instead of @code{@value{RCSD}Revision: 5.12 @value{RCSD}}
  293. if that is how the string appeared when the file was checked in.
  294. This can be useful for file formats
  295. that cannot tolerate any changes to substrings
  296. that happen to take the form of keyword strings.
  297.  
  298. @item -kb
  299.  
  300. Generate a binary image of the old keyword string. This acts like
  301. @code{-ko}, except it performs all working file input and output
  302. in binary mode. This makes little difference on Posix and Unix
  303. hosts, but on DOS-like hosts one should use @code{rcs -i -kb} to
  304. initialize an RCS file intended to be used for binary files.
  305. Also, on all hosts, @ref{rcsmerge} normally refuses to merge
  306. files when @code{-kb} is in effect.
  307.  
  308. @item -kv
  309.  
  310. Generate only keyword values for keyword strings. For example,
  311. for the @code{Revision} keyword, generate the string @code{5.12}
  312. instead of @code{@value{RCSD}Revision: 5.12 @value{RCSD}}
  313. This can help generate files in programming languages where it
  314. is hard to strip keyword delimiters like
  315. @code{@value{RCSD}Revision: @value{RCSD}} from a string.
  316. However, further keyword substitution cannot be performed once
  317. the keyword names are removed, so this option should be used
  318. with care. Because of this danger of losing keywords, this
  319. option cannot be combined with @code{-l}, and the owner write
  320. permission of the working file is turned off; to edit
  321. the file later, check it out again without @code{-kv}.
  322.  
  323. @end table
  324. @c =============================================================================
  325. @c co -- check out RCS revsisions
  326. @c     Options
  327. @c         option -p
  328. @c -----------------------------------------------------------------------------
  329. @node coOptp,coOptq,coOptk,coOptions
  330. @subsection Print on standard output
  331. @cindex -p
  332. @cindex output
  333. @cindex print
  334. @table @code
  335. @item -p@file{rev}
  336.  
  337. prints the retrieved revision on the standard output rather than
  338. storing it in the working file. This option is useful when
  339. @code{co} is part of a pipe.
  340.  
  341. @end table
  342. @c =============================================================================
  343. @c co -- check out RCS revsisions
  344. @c     Options
  345. @c         option -q
  346. @c -----------------------------------------------------------------------------
  347. @node coOptq,coOptI,coOptp,coOptions
  348. @subsection Quiet mode
  349. @cindex -q
  350. @cindex quiet
  351. @table @code
  352. @item -q@file{rev}
  353.  
  354. quiet mode; diagnostics are not printed.
  355.  
  356. @end table
  357. @c =============================================================================
  358. @c co -- check out RCS revsisions
  359. @c     Options
  360. @c         option -I
  361. @c -----------------------------------------------------------------------------
  362. @node coOptI,coOptd,coOptq,coOptions
  363. @subsection Interactive Mode
  364. @cindex -I
  365. @cindex Interactive
  366. @table @code
  367. @item -I@file{rev}
  368.  
  369. interactive mode; the user is prompted and questioned even if the
  370. standard input is not a terminal.
  371.  
  372. @end table
  373. @c =============================================================================
  374. @c co -- check out RCS revsisions
  375. @c     Options
  376. @c         option -d
  377. @c -----------------------------------------------------------------------------
  378. @node coOptd,coOptM,coOptI,coOptions
  379. @subsection Checkout by date/time
  380. @cindex -d
  381. @cindex date
  382. @cindex time
  383. @cindex Check out
  384. @table @code
  385. @item -d@file{date}
  386.  
  387. retrieves the latest revision on the selected branch whose checkin date/time is
  388. less than or equal to @file{date}.
  389. The date and time can be given in free format.
  390. The time zone @code{LT} stands for local time;
  391. other common time zone names are understood.
  392. For example, the following
  393. @file{date}s are equivalent
  394. if local time is January 11, 1990, 8pm Pacific Standard Time,
  395. eight hours west of Coordinated Universal Time (UTC):
  396.  
  397.  
  398. @example
  399. @group
  400. 8:00 pm lt
  401. 4:00 AM, Jan. 12, 1990             default is UTC
  402. 1990-01-12 04:00:00+00             ISO 8601 (UTC)
  403. 1990-01-11 20:00:00-08             ISO 8601 (local time)
  404. 1990/01/12 04:00:00                traditional RCS format
  405. Thu Jan 11 20:00:00 1990 LT        output of ctime(3) + LT
  406. Thu Jan 11 20:00:00 PST 1990       output of date(1)
  407. Fri Jan 12 04:00:00 GMT 1990
  408. Thu, 11 Jan 1990 20:00:00 -0800    Internet RFC 822
  409. 12-January-1990, 04:00 WET
  410. @w{ }
  411. @w{ }
  412. @end group
  413. @end example
  414.  
  415.  
  416. Most fields in the date and time can be defaulted. The default
  417. time zone is normally UTC, but this can be overridden by the
  418. @code{-z} option. The other defaults are determined in the order
  419. year, month, day, hour, minute, and second (most to least
  420. significant).  At least one of these fields must be provided.
  421. For omitted fields that are of higher significance than the
  422. highest provided field, the time zone's current values are
  423. assumed. For all other omitted fields, the lowest possible values
  424. are assumed. For example, without @code{-z}, the date @code{20},
  425. @code{10:30} defaults to 10:30:00 UTC of the 20th of the UTC time
  426. zone's current month and year. The date/time must be quoted if it
  427. contains spaces.
  428.  
  429. @end table
  430. @c =============================================================================
  431. @c co -- check out RCS revsisions
  432. @c     Options
  433. @c         option -M
  434. @c -----------------------------------------------------------------------------
  435. @node coOptM,coOpts,coOptd,coOptions
  436. @subsection Modification time
  437. @cindex -M
  438. @cindex Modification
  439. @table @code
  440. @item -M@file{rev}
  441.  
  442. Set the modification time on the new working file
  443. to be the date of the retrieved revision.
  444. Use this option with care; it can confuse
  445. @code{make}.
  446.  
  447. @end table
  448. @c =============================================================================
  449. @c co -- check out RCS revsisions
  450. @c     Options
  451. @c         option -s
  452. @c -----------------------------------------------------------------------------
  453. @node coOpts,coOptT,coOptM,coOptions
  454. @subsection State
  455. @cindex -s
  456. @cindex State
  457. @table @code
  458. @item -s@file{state}
  459.  
  460. retrieves the latest revision on the selected branch whose state
  461. is set to @file{state}.
  462.  
  463. @end table
  464. @c =============================================================================
  465. @c co -- check out RCS revsisions
  466. @c     Options
  467. @c         option -T
  468. @c -----------------------------------------------------------------------------
  469. @node coOptT,coOptw,coOpts,coOptions
  470. @subsection Preserve Modification time
  471. @cindex -T
  472. @cindex Modification
  473. @cindex preserve
  474. @table @code
  475. @item -T
  476.  
  477. Preserve the modification time on the RCS file even if the RCS
  478. file changes because a lock is added or removed. This option can
  479. suppress extensive recompilation caused by a @code{make}
  480. dependency of some other copy of the working file on the RCS
  481. file. Use this option with care; it can suppress recompilation
  482. even when it is needed, i.e. when the change of lock would mean a
  483. change to keyword strings in the other working file.
  484.  
  485. @end table
  486. @c =============================================================================
  487. @c co -- check out RCS revsisions
  488. @c     Options
  489. @c         option -w
  490. @c -----------------------------------------------------------------------------
  491. @node coOptw,coOptj,coOptT,coOptions
  492. @subsection Checked in by user
  493. @cindex -w
  494. @cindex login
  495. @table @code
  496. @item -w@file{login}
  497.  
  498. retrieves the latest revision on the selected branch which was
  499. checked in by the user with login name @file{login}. If the
  500. argument @file{login} is omitted, the caller's login is assumed.
  501.  
  502. @end table
  503. @c =============================================================================
  504. @c co -- check out RCS revsisions
  505. @c     Options
  506. @c         option -j
  507. @c -----------------------------------------------------------------------------
  508. @node coOptj,coOptV,coOptw,coOptions
  509. @subsection Joining revisions
  510. @cindex -j
  511. @cindex join
  512. @table @code
  513. @item -j@file{joinlist}
  514.  
  515. generates a new revision which is the join of the revisions on
  516. @file{joinlist}. This option is largely obsoleted by @code{rcsmerge}
  517. (@ref{rcsmerge}) but is retained for backwards compatibility.
  518.  
  519.  
  520. The @file{joinlist} is a comma-separated list of pairs of the
  521. form @code{rev2 : rev3}, where @code{rev2} and @code{rev3} are
  522. (symbolic or numeric) revision numbers. For the initial such
  523. pair, @code{rev1} denotes the revision selected by the above
  524. options @code{-f}, @dots{}, @code{-w}. For all other pairs,
  525. @code{rev1} denotes the revision generated by the previous pair.
  526. (Thus, the output of one join becomes the input to the next.)
  527.  
  528.  
  529. For each pair, @code{co} joins revisions @code{rev1} and
  530. @code{rev3} with respect to @code{rev2}. This means that all
  531. changes that transform @code{rev2} into @code{rev1} are applied
  532. to a copy of @code{rev3}. This is particularly useful if
  533. @code{rev1} and @code{rev3} are the ends of two branches that
  534. have @code{rev2} as a common ancestor.  If
  535. @code{rev1 < rev2 < rev3} on the same branch,
  536. joining generates a new revision which is like @code{rev3},
  537. but with all changes that lead from @code{rev1} to @code{rev2}
  538. undone. If changes from @code{rev2} to @code{rev1} overlap
  539. with changes from @code{rev2} to @code{rev3}, @code{co} reports
  540. overlaps as described in @code{merge}.
  541.  
  542.  
  543. For the initial pair, @code{rev2} can be omitted.  The default is
  544. the common ancestor. If any of the arguments indicate branches,
  545. the latest revisions on those branches are assumed. The options
  546. @code{-l} and @code{-u} lock or unlock @code{rev1}.
  547.  
  548. @end table
  549. @c =============================================================================
  550. @c co -- check out RCS revsisions
  551. @c     Options
  552. @c         option -V
  553. @c -----------------------------------------------------------------------------
  554. @node coOptV,coOptx,coOptj,coOptions
  555. @subsection Version, Emulate RCS Version
  556. @cindex -V
  557. @cindex Version
  558. @cindex Emulate
  559. @table @code
  560.  
  561. @item -V
  562.  
  563. Print RCS's version number.
  564.  
  565.  
  566. @item -V@file{n}
  567.  
  568. Emulate RCS version @file{n}, where @file{n} can be @code{3},
  569. @code{4}, or @code{5}. This can be useful when interchanging RCS
  570. files with others who are running older versions of RCS. To see
  571. which version of RCS your correspondents are running, have them
  572. invoke @code{rcs -V}; this works with newer versions of RCS. If
  573. it doesn't work, have them invoke @code{rlog} (@ref{rlog}) on an
  574. RCS file; if none of the first few lines of output contain the
  575. string @code{branch:} it is version 3; if the dates' years have
  576. just two digits, it is version 4; otherwise, it is version 5. An
  577. RCS file generated while emulating version 3 loses its default
  578. branch. An RCS revision generated while emulating version 4 or
  579. earlier has a time stamp that is off by up to 13 hours. A
  580. revision extracted while emulating version 4 or earlier contains
  581. abbreviated dates of the form @code{yy/mm/dd} and can also
  582. contain different white space and line prefixes in the
  583. substitution for @value{RCSLOG}.
  584.  
  585. @end table
  586. @c =============================================================================
  587. @c co -- check out RCS revsisions
  588. @c     Options
  589. @c         option -x
  590. @c -----------------------------------------------------------------------------
  591. @node coOptx,coOptz,coOptV,coOptions
  592. @subsection Suffixes
  593. @cindex -x
  594. @cindex Suffixes
  595. @table @code
  596. @item -x@file{suffixes}
  597.  
  598. Use @file{suffixes} to characterize RCS files.
  599. @xref{ciOptx} for details.
  600.  
  601. @end table
  602. @c =============================================================================
  603. @c co -- check out RCS revsisions
  604. @c     Options
  605. @c         option -z
  606. @c -----------------------------------------------------------------------------
  607. @node coOptz,,coOptx,coOptions
  608. @subsection Time Zoone
  609. @cindex -z
  610. @cindex Zoone
  611. @table @code
  612. @item -z@file{zoone}
  613.  
  614. @xref{ciOptz} for details.
  615.  
  616. @end table
  617. @c =============================================================================
  618. @c co -- check out RCS revsisions
  619. @c     Keyword Substitution
  620. @c -----------------------------------------------------------------------------
  621. @node coKeyword,coFileModes,coOptions,CheckOut
  622. @section Keyword Substitution
  623. @cindex Keyword
  624. @cindex Substitution
  625. Strings of the form @code{@value{RCSD}keyword@value{RCSD}} and
  626. @code{@value{RCSD}keyword : @dots{}@value{RCSD}} embedded in
  627. the text are replaced with strings of the form
  628. @code{@value{RCSD}keyword:value@value{RCSD}} where
  629. @code{keyword} and @code{value} are pairs listed below.
  630. Keywords can be embedded in literal strings or comments to
  631. identify a revision.
  632.  
  633. Initially, the user enters strings of the form
  634. @code{@value{RCSD}keyword@value{RCSD}}.
  635. On checkout, @code{co} replaces these strings with strings
  636. of the form @code{@value{RCSD}keyword:value@value{RCSD}}.
  637. If a revision containing strings of the latter form is checked
  638. back in, the value fields will be replaced during the next
  639. checkout. Thus, the keyword values are automatically updated on
  640. checkout. This automatic substitution can be modified by the
  641. @code{-k} options.
  642.  
  643. Keywords and their corresponding values:
  644.  
  645.  
  646. @table @code
  647.  
  648. @item @value{RCSAUTHOR}
  649. @cindex Keyword Author
  650.  
  651. The login name of the user who checked in the revision.
  652.  
  653. @item @value{RCSDATE}
  654. @cindex Keyword Date
  655.  
  656. The date and time the revision was checked in.
  657. With @code{-z@file{zone}} a numeric time zone offset is appended;
  658. otherwise, the date is UTC.
  659.  
  660. @item @value{RCSHEADER}
  661. @cindex Keyword Header
  662.  
  663. A standard header containing the full pathname of the RCS file, the
  664. revision number, the date and time, the author, the state,
  665. and the locker (if locked). With @code{-z@file{zone}}
  666. a numeric time zone offset is appended to the date;
  667. otherwise, the date is RCS.
  668.  
  669. @item @value{RCSID}
  670. @cindex Keyword Id
  671.  
  672. Same as @code{@value{RCSHEADER}},
  673. except that the RCS filename is without a path.
  674.  
  675. @item @value{RCSLOCKER}
  676. @cindex Keyword Locker
  677.  
  678. The login name of the user who locked the revision
  679. (empty if not locked).
  680.  
  681. @item @value{RCSLOG}
  682. @cindex Keyword Log
  683.  
  684. The log message supplied during checkin, preceded by a header
  685. containing the RCS filename, the revision number, the author, and
  686. the date and time. With @code{-z@file{zone}} a numeric time zone
  687. offset is appended; otherwise, the date is UTC. Existing log
  688. messages are @code{not} replaced. Instead, the new log message is
  689. inserted after @code{@value{RCSD}Log: @dots{} @value{RCSD}}. This
  690. is useful for accumulating a complete change log in a source
  691. file.
  692.  
  693. Each  inserted  line is prefixed by the string that prefixes the
  694. @code{@value{RCSLOG}} line.  For example, if the
  695. @code{@value{RCSLOG}} line is
  696. @code{"// @value{RCSD}Log: tan.cc @value{RCSD}"},
  697. RCS prefixes each line of the log with "// ".
  698. This  is useful  for  languages  with  comments  that  go  to the
  699. end of the line.  The convention for other languages is to use a
  700. @code{"  *  "}  prefix inside a multiline comment.  For example,
  701. the initial log comment  of  a  C  program conventionally is of
  702. the following form:
  703.  
  704.  
  705. @example
  706. @group
  707. @w{/*}
  708. @w{ * @value{RCSLOG}}
  709. @w{ */}
  710. @end group
  711. @end example
  712.  
  713.  
  714. For  backwards compatibility with older versions of RCS, if the
  715. log prefix is @code{/*} or  @code{(*} surrounded  by optional
  716. white space, inserted log lines contain a space instead of
  717. @code{/} or @code{(}; however,  this  usage  is obsolescent and
  718. should not be relied on.
  719.  
  720.  
  721. @item @value{RCSNAME}
  722. @cindex Keyword Name
  723.  
  724. The symbolic name used to check out the revision, if any. For
  725. example, @code{"co -rJoe"} generates
  726. @code{"@value{RCSD}Name: Joe @value{RCSD}"}.
  727. Plain @code{co} generates just @code{"@value{RCSD}Name:  @value{RCSD}"}
  728.  
  729. @item @value{RCSRCSFILE}
  730. @cindex Keyword RCSFile
  731.  
  732. The name of the RCS file without a path.
  733.  
  734. @item @value{RCSREVISION}
  735. @cindex Keyword Revision
  736.  
  737. The revision number assigned to the revision.
  738.  
  739. @item @value{RCSSOURCE}
  740. @cindex Keyword Source
  741.  
  742. The full pathname of the RCS file.
  743.  
  744. @item @value{RCSSTATE}
  745. @cindex Keyword State
  746.  
  747. The state assigned to the revision with the
  748. @code{-s} option of @code{rcs} or @code{ci}.
  749.  
  750. @end table
  751.  
  752. The following characters in keyword values are represented by escape sequences
  753. to keep keyword strings well-formed.
  754.  
  755.  
  756. @example
  757. @group
  758. @code{char}    @code{escape sequence}
  759. tab            \t
  760. newline        \n
  761. space          \040
  762. $              \044
  763. \              \\
  764. @end group
  765. @end example
  766. @c =============================================================================
  767. @c co -- check out RCS revsisions
  768. @c     File Modes
  769. @c -----------------------------------------------------------------------------
  770. @node coFileModes,coFiles,coKeyword,CheckOut
  771. @section File Modes
  772. @cindex File Modes
  773. The working file inherits the read and execute permissions from
  774. the RCS file.  In addition, the owner  write  permis- sion  is
  775. turned  on,  unless  @code{-kv}  is  set or the file is checked
  776. out unlocked and locking is  set  to  strict (@xref{rcs}).
  777.  
  778. If a file with the name of the working file exists already and
  779. has write permission, @code{co} aborts the  checkout,  asking
  780. beforehand  if  possible.  If the existing working file is not
  781. writable or @code{-f} is given, the working file  is  deleted
  782. without asking.
  783. @c =============================================================================
  784. @c co -- check out RCS revsisions
  785. @c     Files
  786. @c -----------------------------------------------------------------------------
  787. @node coFiles,coEnv,coFileModes,CheckOut
  788. @section Files
  789. @cindex Files
  790. @code{co} accesses files much as @code{ci} does, except that it
  791. does not need to read the working file unless a revision number
  792. of @code{@value{RCSD}} is specified.
  793. @c =============================================================================
  794. @c co -- check out RCS revsisions
  795. @c     Envrionment
  796. @c -----------------------------------------------------------------------------
  797. @node coEnv,coDiag,coFiles,CheckOut
  798. @section Environment
  799. @cindex Environment
  800. @table @code
  801. @item RCSINIT
  802. options prepended to the argument list, separated by spaces.
  803. See @ref{ciEnv} for details.
  804.  
  805. @end table
  806. @c =============================================================================
  807. @c co -- check out RCS revsisions
  808. @c     Diagnostics
  809. @c -----------------------------------------------------------------------------
  810. @node coDiag,coLimits,coEnv,CheckOut
  811. @section Diagnostics
  812. The RCS pathname, the working pathname, and  the  revision
  813. number  retrieved  are  written  to the diagnostic output.
  814. The exit status is zero if and only if all operations were
  815. successful.
  816. @c =============================================================================
  817. @c co -- check out RCS revsisions
  818. @c     Limits
  819. @c -----------------------------------------------------------------------------
  820. @node coLimits,,coDiag,CheckOut
  821. @section Limits
  822. Links to the RCS and working files are not preserved.
  823.  
  824.