home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / rcs5ap1b.lzh / RCS5AP1B / CO.1LP < prev    next >
Text File  |  1991-01-30  |  18KB  |  463 lines

  1.  
  2.  
  3.  
  4. CO(1)                  Programmer's Manual                  CO(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      co - check out RCS revisions
  10.  
  11. SYNOPSIS
  12.      co [_✓o_✓p_✓t_✓i_✓o_✓n_✓s] _✓f_✓i_✓l_✓e ...
  13.  
  14. DESCRIPTION
  15.      co retrieves a revision from each RCS file and stores it
  16.      into the corresponding working file.  Each file name ending
  17.      in ,v is taken to be an RCS file; all other files are
  18.      assumed to be working files.  If only a working file is
  19.      given, co tries to find the corresponding RCS file in the
  20.      directory ./RCS and then in the current directory.  For more
  21.      details, see FILE NAMING below.
  22.  
  23.      Revisions of an RCS file may be checked out locked or
  24.      unlocked.  Locking a revision prevents overlapping updates.
  25.      A revision checked out for reading or processing (e.g., com-
  26.      piling) need not be locked.  A revision checked out for
  27.      editing and later checkin must normally be locked.  Checkout
  28.      with locking fails if the revision to be checked out is
  29.      currently locked by another user.  (A lock may be broken
  30.      with rcs(1).)  Checkout with locking also requires the
  31.      caller to be on the access list of the RCS file, unless he
  32.      is the owner of the file or the superuser, or the access
  33.      list is empty.  Checkout without locking is not subject to
  34.      accesslist restrictions, and is not affected by the presence
  35.      of locks.
  36.  
  37.      A revision is selected by options for revision or branch
  38.      number, checkin date/time, author, or state.  When the
  39.      selection options are applied in combination, co retrieves
  40.      the latest revision that satisfies all of them.  If none of
  41.      the selection options is specified, co retrieves the latest
  42.      revision on the default branch (normally the trunk, see the
  43.      -b option of rcs(1)).  A revision or branch number may be
  44.      attached to any of the options -f, -I, -l, -p, -q, -r, or
  45.      -u.  The options -d (date), -s (state), and -w (author)
  46.      retrieve from a single branch, the _✓s_✓e_✓l_✓e_✓c_✓t_✓e_✓d branch, which is
  47.      either specified by one of -f, ..., -u, or the default
  48.      branch.
  49.  
  50.      A co command applied to an RCS file with no revisions
  51.      creates a zero-length working file.  co always performs key-
  52.      word substitution (see below).
  53.  
  54. OPTIONS
  55.      -r[_✓r_✓e_✓v]
  56.           retrieves the latest revision whose number is less than
  57.           or equal to _✓r_✓e_✓v. If _✓r_✓e_✓v indicates a branch rather than
  58.           a revision, the latest revision on that branch is
  59.           retrieved.  If _✓r_✓e_✓v is omitted, the latest revision on
  60.  
  61.  
  62.  
  63. Printed 1/29/91            1990/12/04                           1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CO(1)                  Programmer's Manual                  CO(1)
  71.  
  72.  
  73.  
  74.           the default branch (see the -b option of rcs(1)) is
  75.           retrieved.  A revision is composed of one or more
  76.           numeric or symbolic fields separated by periods.  The
  77.           numeric equivalent of a symbolic field is specified
  78.           with the -n option of the commands ci(1) and rcs(1).
  79.  
  80.      -l[_✓r_✓e_✓v]
  81.           same as -r, except that it also locks the retrieved
  82.           revision for the caller.
  83.  
  84.      -u[_✓r_✓e_✓v]
  85.           same as -r, except that it unlocks the retrieved revi-
  86.           sion if it was locked by the caller.  If _✓r_✓e_✓v is omit-
  87.           ted, -u retrieves the latest revision locked by the
  88.           caller; if no such lock exists, it retrieves the latest
  89.           revision on the default branch.
  90.  
  91.      -f[_✓r_✓e_✓v]
  92.           forces the overwriting of the working file; useful in
  93.           connection with -q.  See also FILE MODES below.
  94.  
  95.      -kkv Generate keyword strings using the default form, e.g.
  96.           $Revision: 5.4 $ for the Revision keyword.  A locker's
  97.           name is inserted in the value of the Header, Id, and
  98.           Locker keyword strings only as a file is being locked,
  99.           i.e. by ci -l and co -l.  This is the default.
  100.  
  101.      -kkvl
  102.           Like -kkv, except that a locker's name is always
  103.           inserted if the given revision is currently locked.
  104.  
  105.      -kk  Generate only keyword names in keyword strings; omit
  106.           their values.  See KEYWORD SUBSTITUTION below.  For
  107.           example, for the Revision keyword, generate the string
  108.           $Revision$ instead of $Revision: 5.4 $.  This option is
  109.           useful to ignore differences due to keyword substitu-
  110.           tion when comparing different revisions of a file.
  111.  
  112.      -ko  Generate the old keyword string, present in the working
  113.           file just before it was checked in.  For example, for
  114.           the Revision keyword, generate the string $Revision:
  115.           1.1 $ instead of $Revision: 5.4 $ if that is how the
  116.           string appeared when the file was checked in.  This can
  117.           be useful for binary file formats that cannot tolerate
  118.           any changes to substrings that happen to take the form
  119.           of keyword strings.
  120.  
  121.      -kv  Generate only keyword values for keyword strings.  For
  122.           example, for the Revision keyword, generate the string
  123.           5.4 instead of $Revision: 5.4 $.  This can help gen-
  124.           erate files in programming languages where it is hard
  125.           to strip keyword delimiters like $Revision: $ from a
  126.  
  127.  
  128.  
  129. Printed 1/29/91            1990/12/04                           2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CO(1)                  Programmer's Manual                  CO(1)
  137.  
  138.  
  139.  
  140.           string.  However, further keyword substitution cannot
  141.           be performed once the keyword names are removed, so
  142.           this option should be used with care.  Because of this
  143.           danger of losing keywords, this option cannot be com-
  144.           bined with -l, and the owner write permission of the
  145.           working file is turned off; to edit the file later,
  146.           check it out again without -kv.
  147.  
  148.      -p[_✓r_✓e_✓v]
  149.           prints the retrieved revision on the standard output
  150.           rather than storing it in the working file.  This
  151.           option is useful when co is part of a pipe.
  152.  
  153.      -q[_✓r_✓e_✓v]
  154.           quiet mode; diagnostics are not printed.
  155.  
  156.      -I[_✓r_✓e_✓v]
  157.           interactive mode; the user is prompted and questioned
  158.           even if the standard input is not a terminal.
  159.  
  160.      -d_✓d_✓a_✓t_✓e
  161.           retrieves the latest revision on the selected branch
  162.           whose checkin date/time is less than or equal to _✓d_✓a_✓t_✓e.
  163.           The date and time may be given in free format.  The
  164.           time zone LT stands for local time; other common time
  165.           zone names are understood.  For example, the following
  166.           _✓d_✓a_✓t_✓es are equivalent if local time is January 11, 1990,
  167.           8pm Pacific Standard Time (eight hours west of GMT):
  168.  
  169.                8:00 pm lt
  170.                4:00 AM, Jan. 12, 1990           note: default is GMT
  171.                1990/01/12 04:00:00              RCS date format
  172.                Thu Jan 11 20:00:00 1990 LT      output of ctime(3) + LT
  173.                Thu Jan 11 20:00:00 PST 1990     output of date(1)
  174.                Fri Jan 12 04:00:00 GMT 1990
  175.                Thu, 11 Jan 1990 20:00:00 -0800
  176.                Fri-JST, 1990, 1pm Jan 12
  177.                12-January-1990, 04:00-WET
  178.  
  179.           Most fields in the date and time may be defaulted.  The
  180.           default time zone is GMT.  The other defaults are
  181.           determined in the order year, month, day, hour, minute,
  182.           and second (most to least significant).  At least one
  183.           of these fields must be provided.  For omitted fields
  184.           that are of higher significance than the highest pro-
  185.           vided field, the time zone's current values are
  186.           assumed.  For all other omitted fields, the lowest pos-
  187.           sible values are assumed.  For example, the date 20,
  188.           10:30 defaults to 10:30:00 GMT of the 20th of the GMT
  189.           time zone's current month and year.  The date/time must
  190.           be quoted if it contains spaces.
  191.  
  192.  
  193.  
  194.  
  195. Printed 1/29/91            1990/12/04                           3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CO(1)                  Programmer's Manual                  CO(1)
  203.  
  204.  
  205.  
  206.      -s_✓s_✓t_✓a_✓t_✓e
  207.           retrieves the latest revision on the selected branch
  208.           whose state is set to _✓s_✓t_✓a_✓t_✓e.
  209.  
  210.      -w[_✓l_✓o_✓g_✓i_✓n]
  211.           retrieves the latest revision on the selected branch
  212.           which was checked in by the user with login name _✓l_✓o_✓g_✓i_✓n.
  213.           If the argument _✓l_✓o_✓g_✓i_✓n is omitted, the caller's login is
  214.           assumed.
  215.  
  216.      -j_✓j_✓o_✓i_✓n_✓l_✓i_✓s_✓t
  217.           generates a new revision which is the join of the revi-
  218.           sions on _✓j_✓o_✓i_✓n_✓l_✓i_✓s_✓t. This option is largely obsoleted by
  219.           rcsmerge(1) but is retained for backwards compatibil-
  220.           ity.
  221.  
  222.           The _✓j_✓o_✓i_✓n_✓l_✓i_✓s_✓t is a comma-separated list of pairs of the
  223.           form _✓r_✓e_✓v_✓2:_✓r_✓e_✓v_✓3, where _✓r_✓e_✓v_✓2 and _✓r_✓e_✓v_✓3 are (symbolic or
  224.           numeric) revision numbers.  For the initial such pair,
  225.           _✓r_✓e_✓v_✓1 denotes the revision selected by the above options
  226.           -f, ..., -w.  For all other pairs, _✓r_✓e_✓v_✓1 denotes the
  227.           revision generated by the previous pair.  (Thus, the
  228.           output of one join becomes the input to the next.)
  229.  
  230.           For each pair, co joins revisions _✓r_✓e_✓v_✓1 and _✓r_✓e_✓v_✓3 with
  231.           respect to _✓r_✓e_✓v_✓2. This means that all changes that
  232.           transform _✓r_✓e_✓v_✓2 into _✓r_✓e_✓v_✓1 are applied to a copy of _✓r_✓e_✓v_✓3.
  233.           This is particularly useful if _✓r_✓e_✓v_✓1 and _✓r_✓e_✓v_✓3 are the
  234.           ends of two branches that have _✓r_✓e_✓v_✓2 as a common ances-
  235.           tor.  If _✓r_✓e_✓v_✓1<_✓r_✓e_✓v_✓2<_✓r_✓e_✓v_✓3 on the same branch, joining
  236.           generates a new revision which is like _✓r_✓e_✓v_✓3, but with
  237.           all changes that lead from _✓r_✓e_✓v_✓1 to _✓r_✓e_✓v_✓2 undone.  If
  238.           changes from _✓r_✓e_✓v_✓2 to _✓r_✓e_✓v_✓1 overlap with changes from
  239.           _✓r_✓e_✓v_✓2 to _✓r_✓e_✓v_✓3, co prints a warning and includes the
  240.           overlapping sections, delimited by the lines
  241.           <<<<<<< _✓r_✓e_✓v_✓1, =======, and >>>>>>> _✓r_✓e_✓v_✓3.
  242.  
  243.           For the initial pair, _✓r_✓e_✓v_✓2 may be omitted.  The default
  244.           is the common ancestor.  If any of the arguments indi-
  245.           cate branches, the latest revisions on those branches
  246.           are assumed.  The options -l and -u lock or unlock
  247.           _✓r_✓e_✓v_✓1.
  248.  
  249.      -V_✓n  Emulate RCS version _✓n, where _✓n may be 3, 4, or 5.  This
  250.           may be useful when interchanging RCS files with others
  251.           who are running older versions of RCS.  To see which
  252.           version of RCS your correspondents are running, have
  253.           them invoke rlog on an RCS file; if none of the first
  254.           few lines of output contain the string branch: it is
  255.           version 3; if the dates' years have just two digits, it
  256.           is version 4; otherwise, it is version 5.  An RCS file
  257.           generated while emulating version 3 will lose its
  258.  
  259.  
  260.  
  261. Printed 1/29/91            1990/12/04                           4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CO(1)                  Programmer's Manual                  CO(1)
  269.  
  270.  
  271.  
  272.           default branch.  An RCS revision generated while emu-
  273.           lating version 4 or earlier will have a timestamp that
  274.           is off by up to 13 hours.  A revision extracted while
  275.           emulating version 4 or earlier will contain dates of
  276.           the form _✓y_✓y/_✓m_✓m/_✓d_✓d instead of _✓y_✓y_✓y_✓y/_✓m_✓m/_✓d_✓d and may also
  277.           contain different white space in the substitution for
  278.           $Log$.
  279.  
  280. KEYWORD SUBSTITUTION
  281.      Strings of the form $_✓k_✓e_✓y_✓w_✓o_✓r_✓d$ and $_✓k_✓e_✓y_✓w_✓o_✓r_✓d:...$ embedded in
  282.      the text are replaced with strings of the form
  283.      $_✓k_✓e_✓y_✓w_✓o_✓r_✓d:_✓v_✓a_✓l_✓u_✓e$ where _✓k_✓e_✓y_✓w_✓o_✓r_✓d and _✓v_✓a_✓l_✓u_✓e are pairs listed
  284.      below.  Keywords may be embedded in literal strings or com-
  285.      ments to identify a revision.
  286.  
  287.      Initially, the user enters strings of the form $_✓k_✓e_✓y_✓w_✓o_✓r_✓d$.
  288.      On checkout, co replaces these strings with strings of the
  289.      form $_✓k_✓e_✓y_✓w_✓o_✓r_✓d:_✓v_✓a_✓l_✓u_✓e$.  If a revision containing strings of
  290.      the latter form is checked back in, the value fields will be
  291.      replaced during the next checkout.  Thus, the keyword values
  292.      are automatically updated on checkout.  This automatic sub-
  293.      stitution can be modified by the -k options.
  294.  
  295.      Keywords and their corresponding values:
  296.  
  297.      $Author$
  298.           The login name of the user who checked in the revision.
  299.  
  300.      $Date$
  301.           The date and time (GMT) the revision was checked in.
  302.  
  303.      $Header$
  304.           A standard header containing the full pathname of the
  305.           RCS file, the revision number, the date (GMT), the
  306.           author, the state, and the locker (if locked).
  307.  
  308.      $Id$ Same as $Header$, except that the RCS file name is
  309.           without a path.
  310.  
  311.      $Locker$
  312.           The login name of the user who locked the revision
  313.           (empty if not locked).
  314.  
  315.      $Log$
  316.           The log message supplied during checkin, preceded by a
  317.           header containing the RCS file name, the revision
  318.           number, the author, and the date (GMT).  Existing log
  319.           messages are _✓n_✓o_✓t replaced.  Instead, the new log mes-
  320.           sage is inserted after $Log:...$.  This is useful for
  321.           accumulating a complete change log in a source file.
  322.  
  323.      $RCSfile$
  324.  
  325.  
  326.  
  327. Printed 1/29/91            1990/12/04                           5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. CO(1)                  Programmer's Manual                  CO(1)
  335.  
  336.  
  337.  
  338.           The name of the RCS file without a path.
  339.  
  340.      $Revision$
  341.           The revision number assigned to the revision.
  342.  
  343.      $Source$
  344.           The full pathname of the RCS file.
  345.  
  346.      $State$
  347.           The state assigned to the revision with the -s option
  348.           of rcs(1) or ci(1).
  349.  
  350. FILE NAMING
  351.      Pairs of RCS files and working files may be specified in
  352.      three ways (see also the example section).
  353.  
  354.      1) Both the RCS file and the working file are given.  The
  355.      RCS file name is of the form _✓p_✓a_✓t_✓h_✓1/_✓w_✓o_✓r_✓k_✓f_✓i_✓l_✓e,v and the work-
  356.      ing file name is of the form _✓p_✓a_✓t_✓h_✓2/_✓w_✓o_✓r_✓k_✓f_✓i_✓l_✓e where _✓p_✓a_✓t_✓h_✓1/ and
  357.      _✓p_✓a_✓t_✓h_✓2/ are (possibly different or empty) paths and _✓w_✓o_✓r_✓k_✓f_✓i_✓l_✓e
  358.      is a file name.
  359.  
  360.      2) Only the RCS file is given.  Then the working file is
  361.      created in the current directory and its name is derived
  362.      from the name of the RCS file by removing _✓p_✓a_✓t_✓h_✓1/ and the
  363.      suffix ,v.
  364.  
  365.      3) Only the working file is given.  Then co looks for an RCS
  366.      file of the form _✓p_✓a_✓t_✓h_✓2/RCS/_✓w_✓o_✓r_✓k_✓f_✓i_✓l_✓e,v or _✓p_✓a_✓t_✓h_✓2/_✓w_✓o_✓r_✓k_✓f_✓i_✓l_✓e,v
  367.      (in this order).
  368.  
  369.      If the RCS file is specified without a path in 1) and 2),
  370.      then co looks for the RCS file first in the directory ./RCS
  371.      and then in the current directory.
  372.  
  373. EXAMPLES
  374.      Suppose the current directory contains a subdirectory RCS
  375.      with an RCS file io.c,v.  Then all of the following commands
  376.      retrieve the latest revision from RCS/io.c,v and store it
  377.      into io.c.
  378.  
  379.           co  io.c;    co  RCS/io.c,v;   co  io.c,v;
  380.           co  io.c  RCS/io.c,v;    co  io.c  io.c,v;
  381.           co  RCS/io.c,v  io.c;    co  io.c,v  io.c;
  382.  
  383. FILE MODES
  384.      The working file inherits the read and execute permissions
  385.      from the RCS file.  In addition, the owner write permission
  386.      is turned on, unless -kv is set or the file is checked out
  387.      unlocked and locking is set to strict (see rcs(1)).
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Printed 1/29/91            1990/12/04                           6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. CO(1)                  Programmer's Manual                  CO(1)
  401.  
  402.  
  403.  
  404.      If a file with the name of the working file exists already
  405.      and has write permission, co aborts the checkout, asking
  406.      beforehand if possible.  If the existing working file is not
  407.      writable or -f is given, the working file is deleted without
  408.      asking.
  409.  
  410. FILES
  411.      co accesses files much as ci(1) does, except that it does
  412.      not need to read the working file.
  413.  
  414. DIAGNOSTICS
  415.      The RCS file name, the working file name, and the revision
  416.      number retrieved are written to the diagnostic output.  The
  417.      exit status is zero if and only if all operations were suc-
  418.      cessful.
  419.  
  420. IDENTIFICATION
  421.      Author: Walter F. Tichy.
  422.      Revision Number: 5.4; Release Date: 1990/12/04.
  423.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  424.      Copyright c 1990 by Paul Eggert.
  425.  
  426. SEE ALSO
  427.      ci(1), ctime(3), date(1), ident(1), rcs(1), rcsdiff(1),
  428.      rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
  429.      Walter F. Tichy, RCS--A System for Version Control,
  430.      _✓S_✓o_✓f_✓t_✓w_✓a_✓r_✓e--_✓P_✓r_✓a_✓c_✓t_✓i_✓c_✓e & _✓E_✓x_✓p_✓e_✓r_✓i_✓e_✓n_✓c_✓e 15, 7 (July 1985), 637-654.
  431.  
  432. LIMITS
  433.      Links to the RCS and working files are not preserved.
  434.  
  435.      There is no way to selectively suppress the expansion of
  436.      keywords, except by writing them differently.  In nroff and
  437.      troff, this is done by embedding the null-character \& into
  438.      the keyword.
  439.  
  440. BUGS
  441.      The -d option sometimes gets confused, and accepts no date
  442.      before 1970.
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. Printed 1/29/91            1990/12/04                           7
  460.  
  461.  
  462.  
  463.