home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / co.man < prev    next >
Text File  |  1992-02-19  |  15KB  |  345 lines

  1. NAME
  2.      co - check out RCS revisions
  3.  
  4. SYNOPSIS
  5.      co [options] file ...
  6.  
  7. DESCRIPTION
  8.      co retrieves a revision from each RCS file and stores it
  9.      into the corresponding working file.
  10.  
  11.      Pathnames matching an RCS suffix denote RCS files; all
  12.      others denote working files.  Names are paired as explained
  13.      in ci(1).
  14.  
  15.      Revisions of an RCS file may be checked out locked or
  16.      unlocked.  Locking a revision prevents overlapping updates.
  17.      A revision checked out for reading or processing (e.g.,
  18.      compiling) need not be locked.  A revision checked out for
  19.      editing and later checkin must normally be locked.  Checkout
  20.      with locking fails if the revision to be checked out is
  21.      currently locked by another user.  (A lock may be broken
  22.      with rcs(1).)  Checkout with locking also requires the
  23.      caller to be on the access list of the RCS file, unless he
  24.      is the owner of the file or the superuser, or the access
  25.      list is empty.  Checkout without locking is not subject to
  26.      accesslist restrictions, and is not affected by the presence
  27.      of locks.
  28.  
  29.      A revision is selected by options for revision or branch
  30.      number, checkin date/time, author, or state.  When the
  31.      selection options are applied in combination, co retrieves
  32.      the latest revision that satisfies all of them.  If none of
  33.      the selection options is specified, co retrieves the latest
  34.      revision on the default branch (normally the trunk, see the
  35.      -b option of rcs(1)).  A revision or branch number may be
  36.      attached to any of the options -f, -I, -l, -M, -p, -q, -r,
  37.      or -u.  The options -d (date), -s (state), and -w (author)
  38.      retrieve from a single branch, the selected branch, which is
  39.      either specified by one of -f, ..., -u, or the default
  40.      branch.
  41.  
  42.      A co command applied to an RCS file with no revisions
  43.      creates a zero-length working file.  co always performs
  44.      keyword substitution (see below).
  45.  
  46. OPTIONS
  47.      -r[rev]
  48.           retrieves the latest revision whose number is less than
  49.           or equal to rev.  If rev indicates a branch rather than
  50.           a revision, the latest revision on that branch is
  51.           retrieved.  If rev is omitted, the latest revision on
  52.           the default branch (see the -b option of rcs(1)) is
  53.           retrieved.  If rev is $, co determines the revision
  54.           number from keyword values in the working file.
  55.           Otherwise, a revision is composed of one or more
  56.           numeric or symbolic fields separated by periods.  The
  57.           numeric equivalent of a symbolic field is specified
  58.           with the -n option of the commands ci(1) and rcs(1).
  59.  
  60.      -l[rev]
  61.           same as -r, except that it also locks the retrieved
  62.           revision for the caller.
  63.  
  64.      -u[rev]
  65.           same as -r, except that it unlocks the retrieved
  66.           revision if it was locked by the caller.  If rev is
  67.           omitted, -u retrieves the revision locked by the
  68.           caller, if there is one; otherwise, it retrieves the
  69.           latest revision on the default branch.
  70.  
  71.      -f[rev]
  72.           forces the overwriting of the working file; useful in
  73.           connection with -q.  See also FILE MODES below.
  74.  
  75.      -kkv Generate keyword strings using the default form, e.g.
  76.           $Revision: 5.8 $ for the Revision keyword.  A locker's
  77.           name is inserted in the value of the Header, Id, and
  78.           Locker keyword strings only as a file is being locked,
  79.           i.e. by ci -l and co -l.  This is the default.
  80.  
  81.      -kkvl
  82.           Like -kkv, except that a locker's name is always
  83.           inserted if the given revision is currently locked.
  84.  
  85.      -kk  Generate only keyword names in keyword strings; omit
  86.           their values.  See KEYWORD SUBSTITUTION below.  For
  87.           example, for the Revision keyword, generate the string
  88.           $Revision$ instead of $Revision: 5.8 $.  This option is
  89.           useful to ignore differences due to keyword
  90.           substitution when comparing different revisions of a
  91.           file.
  92.  
  93.      -ko  Generate the old keyword string, present in the working
  94.           file just before it was checked in.  For example, for
  95.           the Revision keyword, generate the string $Revision:
  96.           1.1 $ instead of $Revision: 5.8 $ if that is how the
  97.           string appeared when the file was checked in.  This can
  98.           be useful for binary file formats that cannot tolerate
  99.           any changes to substrings that happen to take the form
  100.           of keyword strings.
  101.  
  102.      -kv  Generate only keyword values for keyword strings.  For
  103.           example, for the Revision keyword, generate the string
  104.           5.8 instead of $Revision: 5.8 $.  This can help
  105.           generate files in programming languages where it is
  106.           hard to strip keyword delimiters like $Revision: $ from
  107.           a string.  However, further keyword substitution cannot
  108.           be performed once the keyword names are removed, so
  109.           this option should be used with care.  Because of this
  110.           danger of losing keywords, this option cannot be
  111.           combined with -l, and the owner write permission of the
  112.           working file is turned off; to edit the file later,
  113.           check it out again without -kv.
  114.  
  115.      -p[rev]
  116.           prints the retrieved revision on the standard output
  117.           rather than storing it in the working file.  This
  118.           option is useful when co is part of a pipe.
  119.  
  120.      -q[rev]
  121.           quiet mode; diagnostics are not printed.
  122.  
  123.      -I[rev]
  124.           interactive mode; the user is prompted and questioned
  125.           even if the standard input is not a terminal.
  126.  
  127.      -ddate
  128.           retrieves the latest revision on the selected branch
  129.           whose checkin date/time is less than or equal to date.
  130.           The date and time may be given in free format.  The
  131.           time zone LT stands for local time; other common time
  132.           zone names are understood.  For example, the following
  133.           dates are equivalent if local time is January 11, 1990,
  134.           8pm Pacific Standard Time, eight hours west of
  135.           Coordinated Universal Time (UTC):
  136.  
  137.                8:00 pm lt
  138.                4:00 AM, Jan. 12, 1990           note: default is UTC
  139.                1990/01/12 04:00:00              RCS date format
  140.                Thu Jan 11 20:00:00 1990 LT      output of ctime(3) + LT
  141.                Thu Jan 11 20:00:00 PST 1990     output of date(1)
  142.                Fri Jan 12 04:00:00 GMT 1990
  143.                Thu, 11 Jan 1990 20:00:00 -0800
  144.                Fri-JST, 1990, 1pm Jan 12
  145.                12-January-1990, 04:00-WET
  146.  
  147.           Most fields in the date and time may be defaulted.  The
  148.           default time zone is UTC.  The other defaults are
  149.           determined in the order year, month, day, hour, minute,
  150.           and second (most to least significant).  At least one
  151.           of these fields must be provided.  For omitted fields
  152.           that are of higher significance than the highest
  153.           provided field, the time zone's current values are
  154.           assumed.  For all other omitted fields, the lowest
  155.           possible values are assumed.  For example, the date 20,
  156.           10:30 defaults to 10:30:00 UTC of the 20th of the UTC
  157.           time zone's current month and year.  The date/time must
  158.           be quoted if it contains spaces.
  159.  
  160.      -M[rev]
  161.           Set the modification time on the new working file to be
  162.           the date of the retrieved revision.  Use this option
  163.           with care; it can confuse make(1).
  164.  
  165.      -sstate
  166.           retrieves the latest revision on the selected branch
  167.           whose state is set to state.
  168.  
  169.      -T   Preserve the modification time on the RCS file even if
  170.           the RCS file changes because a lock is added or
  171.           removed.  This option can suppress extensive
  172.           recompilation caused by a make(1) dependency of some
  173.           other copy of the working file on the RCS file.  Use
  174.           this option with care; it can suppress recompilation
  175.           even when it is needed, i.e. when the change of lock
  176.           would mean a change to keyword strings in the other
  177.           working file.
  178.  
  179.      -w[login]
  180.           retrieves the latest revision on the selected branch
  181.           which was checked in by the user with login name login.
  182.           If the argument login is omitted, the caller's login is
  183.           assumed.
  184.  
  185.      -jjoinlist
  186.           generates a new revision which is the join of the
  187.           revisions on joinlist.  This option is largely
  188.           obsoleted by rcsmerge(1) but is retained for backwards
  189.           compatibility.
  190.  
  191.           The joinlist is a comma-separated list of pairs of the
  192.           form rev2:rev3, where rev2 and rev3 are (symbolic or
  193.           numeric) revision numbers.  For the initial such pair,
  194.           rev1 denotes the revision selected by the above options
  195.           -f, ..., -w.  For all other pairs, rev1 denotes the
  196.           revision generated by the previous pair.  (Thus, the
  197.           output of one join becomes the input to the next.)
  198.  
  199.           For each pair, co joins revisions rev1 and rev3 with
  200.           respect to rev2.  This means that all changes that
  201.           transform rev2 into rev1 are applied to a copy of rev3.
  202.           This is particularly useful if rev1 and rev3 are the
  203.           ends of two branches that have rev2 as a common
  204.           ancestor.  If rev1<rev2<rev3 on the same branch,
  205.           joining generates a new revision which is like rev3,
  206.           but with all changes that lead from rev1 to rev2
  207.           undone.  If changes from rev2 to rev1 overlap with
  208.           changes from rev2 to rev3, co reports overlaps as
  209.           described in merge(1).
  210.  
  211.           For the initial pair, rev2 may be omitted.  The default
  212.           is the common ancestor.  If any of the arguments
  213.           indicate branches, the latest revisions on those
  214.           branches are assumed.  The options -l and -u lock or
  215.           unlock rev1.
  216.  
  217.      -Vn  Emulate RCS version n, where n may be 3, 4, or 5.  This
  218.           may be useful when interchanging RCS files with others
  219.           who are running older versions of RCS.  To see which
  220.           version of RCS your correspondents are running, have
  221.           them invoke rlog on an RCS file; if none of the first
  222.           few lines of output contain the string branch: it is
  223.           version 3; if the dates' years have just two digits, it
  224.           is version 4; otherwise, it is version 5.  An RCS file
  225.           generated while emulating version 3 will lose its
  226.           default branch.  An RCS revision generated while
  227.           emulating version 4 or earlier will have a timestamp
  228.           that is off by up to 13 hours.  A revision extracted
  229.           while emulating version 4 or earlier will contain dates
  230.           of the form yy/mm/dd instead of yyyy/mm/dd and may also
  231.           contain different white space in the substitution for
  232.           $Log$.
  233.  
  234.      -xsuffixes
  235.           Use suffixes to characterize RCS files.  See ci(1) for
  236.           details.
  237.  
  238. KEYWORD SUBSTITUTION
  239.      Strings of the form $keyword$ and $keyword:...$ embedded in
  240.      the text are replaced with strings of the form
  241.      $keyword:value$ where keyword and value are pairs listed
  242.      below.  Keywords may be embedded in literal strings or
  243.      comments to identify a revision.
  244.  
  245.      Initially, the user enters strings of the form $keyword$.
  246.      On checkout, co replaces these strings with strings of the
  247.      form $keyword:value$.  If a revision containing strings of
  248.      the latter form is checked back in, the value fields will be
  249.      replaced during the next checkout.  Thus, the keyword values
  250.      are automatically updated on checkout.  This automatic
  251.      substitution can be modified by the -k options.
  252.  
  253.      Keywords and their corresponding values:
  254.  
  255.      $Author$
  256.           The login name of the user who checked in the revision.
  257.  
  258.      $Date$
  259.           The date and time (UTC) the revision was checked in.
  260.  
  261.      $Header$
  262.           A standard header containing the full pathname of the
  263.           RCS file, the revision number, the date (UTC), the
  264.           author, the state, and the locker (if locked).
  265.  
  266.      $Id$ Same as $Header$, except that the RCS filename is
  267.           without a path.
  268.  
  269.      $Locker$
  270.           The login name of the user who locked the revision
  271.           (empty if not locked).
  272.  
  273.      $Log$
  274.           The log message supplied during checkin, preceded by a
  275.           header containing the RCS filename, the revision
  276.           number, the author, and the date (UTC).  Existing log
  277.           messages are not replaced.  Instead, the new log
  278.           message is inserted after $Log:...$.  This is useful
  279.           for accumulating a complete change log in a source
  280.           file.
  281.  
  282.      $RCSfile$
  283.           The name of the RCS file without a path.
  284.  
  285.      $Revision$
  286.           The revision number assigned to the revision.
  287.  
  288.      $Source$
  289.           The full pathname of the RCS file.
  290.  
  291.      $State$
  292.           The state assigned to the revision with the -s option
  293.           of rcs(1) or ci(1).
  294.  
  295. FILE MODES
  296.      The working file inherits the read and execute permissions
  297.      from the RCS file.  In addition, the owner write permission
  298.      is turned on, unless -kv is set or the file is checked out
  299.      unlocked and locking is set to strict (see rcs(1)).
  300.  
  301.      If a file with the name of the working file exists already
  302.      and has write permission, co aborts the checkout, asking
  303.      beforehand if possible.  If the existing working file is not
  304.      writable or -f is given, the working file is deleted without
  305.      asking.
  306.  
  307. FILES
  308.      co accesses files much as ci(1) does, except that it does
  309.      not need to read the working file.
  310.  
  311. ENVIRONMENT
  312.      RCSINIT
  313.           options prepended to the argument list, separated by
  314.           spaces.  See ci(1) for details.
  315.  
  316. DIAGNOSTICS
  317.      The RCS pathname, the working pathname, and the revision
  318.      number retrieved are written to the diagnostic output.  The
  319.      exit status is zero if and only if all operations were
  320.      successful.
  321.  
  322. IDENTIFICATION
  323.      Author: Walter F. Tichy.
  324.      Revision Number: 5.8; Release Date: 1992/02/17.
  325.      Copyright 1982, 1988, 1989 by Walter F. Tichy.
  326.      Copyright 1990, 1991, 1992 by Paul Eggert.
  327.  
  328. SEE ALSO
  329.      ci(1), ctime(3), date(1), ident(1), make(1), rcs(1),
  330.      rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
  331.      Walter F. Tichy, RCS--A System for Version Control,
  332.      Software--Practice & Experience 15, 7 (July 1985), 637-654.
  333.  
  334. LIMITS
  335.      Links to the RCS and working files are not preserved.
  336.  
  337.      There is no way to selectively suppress the expansion of
  338.      keywords, except by writing them differently.  In nroff and
  339.      troff, this is done by embedding the null-character \& into
  340.      the keyword.
  341.  
  342. BUGS
  343.      The -d option sometimes gets confused, and accepts no date
  344.      before 1970.
  345.