home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RCS43X.ZIP / CO.MAN < prev    next >
Text File  |  1990-11-19  |  13KB  |  278 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.  Each file name ending
  10.      in `,v' is taken to be an RCS file; all other files are
  11.      assumed to be working files.  If only a working file is
  12.      given, co tries to find the corresponding RCS file in the
  13.      directory ./RCS and then in the current directory.  For more
  14.      details, see the file naming section below.
  15.  
  16.      Revisions of an RCS file may be checked out locked or
  17.      unlocked. Locking a revision prevents overlapping updates. A
  18.      revision checked out for reading or processing (e.g., com-
  19.      piling) need not be locked. A revision checked out for edit-
  20.      ing and later checkin must normally be locked. Co with lock-
  21.      ing fails if the revision to be checked out is currently
  22.      locked by another user.  (A lock may be broken with the
  23.      rcs(L) command.) Co with locking also requires the caller to
  24.      be on the access list of the RCS file, unless he is the
  25.      owner of the file or the superuser, or the access list is
  26.      empty.  Co without locking is not subject to accesslist res-
  27.      trictions, and is not affected by the presence 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(L)).  A revision or branch number may be
  36.      attached to any of the options -f, -l, -p, -q, -r, or -u.
  37.      The options -d (date), -s (state), and -w (author) retrieve
  38.      from a single branch, the selected branch, which is either
  39.      specified by one of -f,..., -u, or the default branch.
  40.  
  41.      A co command applied to an RCS file with no revisions
  42.      creates a zero-length working file.  Co always performs key-
  43.      word substitution (see below).
  44.  
  45.      -r[rev]    retrieves the latest revision whose number is
  46.                 less than or equal to rev.  If rev indicates a
  47.                 branch rather than a revision, the latest revi-
  48.                 sion on that branch is retrieved.  If rev is
  49.                 omitted, the latest revision on the default
  50.                 branch (see the -b option of rcs(L)) is
  51.                 retrieved.  Rev is composed of one or more
  52.                 numeric or symbolic fields separated by `.'. The
  53.                 numeric equivalent of a symbolic field is speci-
  54.                 fied with the -n option of the commands ci(L) and
  55.                 rcs(L).
  56.  
  57.      -l[rev]    same as -r, except that it also locks the
  58.                 retrieved revision for the caller.  See option -r
  59.                 for handling of the revision number rev .
  60.  
  61.      -u[rev]    same as -r, except that it unlocks the retrieved
  62.                 revision (if it was locked by the caller). If rev
  63.                 is omitted, -u retrieves the latest revision
  64.                 locked by the caller; if no such lock exists, it
  65.                 retrieves the latest revision on the default
  66.                 branch.
  67.  
  68.      -f[rev]    forces the overwriting of the working file; use-
  69.                 ful in connection with -q.  See also the section
  70.                 on file modes below.
  71.  
  72.      -p[rev]    prints the retrieved revision on the standard
  73.                 output rather than storing it in the working
  74.                 file.  This option is useful when co is part of a
  75.                 pipe.
  76.  
  77.      -q[rev]    quiet mode; diagnostics are not printed.
  78.  
  79.      -ddate     retrieves the latest revision on the selected
  80.                 branch whose checkin date/time is less than or
  81.                 equal to date.  The date and time may be given in
  82.                 free format and are converted to local time.
  83.                 Examples of formats for date:
  84.  
  85.                 22-April-1982, 17:20-CDT,
  86.                 2:25 AM, Dec. 29, 1983,
  87.                 Tue-PDT, 1981, 4pm Jul 21         (free format),
  88.                 Fri, April 16 15:52:25 EST 1982 (output of ctime).
  89.  
  90.                 Most fields in the date and time may be
  91.                 defaulted.  Co determines the defaults in the
  92.                 order year, month, day, hour, minute, and second
  93.                 (most to least significant). At least one of
  94.                 these fields must be provided. For omitted fields
  95.                 that are of higher significance than the highest
  96.                 provided field, the current values are assumed.
  97.                 For all other omitted fields, the lowest possible
  98.                 values are assumed.  For example, the date "20,
  99.                 10:30" defaults to 10:30:00 of the 20th of the
  100.                 current month and current year.  The date/time
  101.                 must be quoted if it contains spaces.
  102.  
  103.      -sstate    retrieves the latest revision on the selected
  104.                 branch whose state is set to state.
  105.  
  106.      -w[login]  retrieves the latest revision on the selected
  107.                 branch which was checked in by the user with
  108.                 login name login. If the argument login is omit-
  109.                 ted, the caller's login is assumed.
  110.  
  111.      -jjoinlist generates a new revision which is the join of the
  112.                 revisions on joinlist.  Joinlist is a comma-
  113.                 separated list of pairs of the form rev2:rev3,
  114.                 where rev2 and rev3 are (symbolic or numeric)
  115.                 revision numbers.  For the initial such pair,
  116.                 rev1 denotes the revision selected by the above
  117.                 options -r, ..., -w. For all other pairs, rev1
  118.                 denotes the revision generated by the previous
  119.                 pair. (Thus, the output of one join becomes the
  120.                 input to the next.)
  121.  
  122.                 For each pair, co joins revisions rev1 and rev3
  123.                 with respect to rev2.  This means that all
  124.                 changes that transform rev2 into rev1 are applied
  125.                 to a copy of rev3.  This is particularly useful
  126.                 if rev1 and rev3 are the ends of two branches
  127.                 that have rev2 as a common ancestor. If rev1 <
  128.                 rev2 < rev3 on the same branch, joining generates
  129.                 a new revision which is like rev3, but with all
  130.                 changes that lead from rev1 to rev2 undone.  If
  131.                 changes from rev2 to rev1 overlap with changes
  132.                 from rev2 to rev3, co prints a warning and
  133.                 includes the overlapping sections, delimited by
  134.                 the lines <<<<<<< rev1, =======, and
  135.                 >>>>>>> rev3.
  136.  
  137.                 For the initial pair, rev2 may be omitted. The
  138.                 default is the common ancestor.  If any of the
  139.                 arguments indicate branches, the latest revisions
  140.                 on those branches are assumed.  The options -l
  141.                 and -u lock or unlock rev1.
  142.  
  143. KEYWORD SUBSTITUTION
  144.      Strings of the form $keyword$ and $keyword:...$ embedded in
  145.      the text are replaced with strings of the form
  146.      $keyword: value $, where keyword and value are pairs listed
  147.      below.  Keywords may be embedded in literal strings or com-
  148.      ments to identify a revision.
  149.  
  150.      Initially, the user enters strings of the form $keyword$.
  151.      On checkout, co replaces these strings with strings of the
  152.      form $keyword: value $. If a revision containing strings of
  153.      the latter form is checked back in, the value fields will be
  154.      replaced during the next checkout.  Thus, the keyword values
  155.      are automatically updated on checkout.
  156.  
  157.      Keywords and their corresponding values:
  158.  
  159.      $Author$     The login name of the user who checked in the
  160.                   revision.
  161.  
  162.      $Date$       The date and time the revision was checked in.
  163.  
  164.      $Header$     A standard header containing the full pathname
  165.                   of the RCS file, the revision number, the date,
  166.                   the author, the state, and the locker (if
  167.                   locked).
  168.  
  169.      $Id$         Same as $Header$, except that the RCS file name
  170.                   is without a path.
  171.  
  172.      $Locker$     The login name of the user who locked the revi-
  173.                   sion (empty if not locked).
  174.  
  175.      $Log$        The log message supplied during checkin, pre-
  176.                   ceded by a header containing the RCS file name,
  177.                   the revision number, the author, and the date.
  178.                   Existing log messages are NOT replaced.
  179.                   Instead, the new log message is inserted after
  180.                   $Log:...$.  This is useful for accumulating a
  181.                   complete change log in a source file.
  182.  
  183.      $RCSfile$    The name of the RCS file without path.
  184.  
  185.      $Revision$   The revision number assigned to the revision.
  186.  
  187.      $Source$     The full pathname of the RCS file.
  188.  
  189.      $State$      The state assigned to the revision with the -s
  190.                   option of rcs(L) or ci(L).
  191.  
  192.      Pairs of RCS files and working files may be specified in 3
  193.      ways (see also the example section).
  194.  
  195.      1) Both the RCS file and the working file are given. The RCS
  196.      file name is of the form path1/workfile,v and the working
  197.      file name is of the form path2/workfile, where path1/ and
  198.      path2/ are (possibly different or empty) paths and workfile
  199.      is a file name.
  200.  
  201.      2) Only the RCS file is given. Then the working file is
  202.      created in the current directory and its name is derived
  203.      from the name of the RCS file by removing path1/ and the
  204.      suffix ,v.
  205.  
  206.      3) Only the working file is given.  Then co looks for an RCS
  207.      file of the form path2/RCS/workfile,v or path2/workfile,v
  208.      (in this order).
  209.  
  210.      If the RCS file is specified without a path in 1) and 2),
  211.      then co looks for the RCS file first in the directory ./RCS
  212.      and then in the current directory.
  213.  
  214. EXAMPLES
  215.      Suppose the current directory contains a subdirectory `RCS'
  216.      with an RCS file `io.c,v'. Then all of the following com-
  217.      mands retrieve the latest revision from `RCS/io.c,v' and
  218.      store it into `io.c'.
  219.  
  220.           co  io.c;    co  RCS/io.c,v;   co  io.c,v;
  221.           co  io.c  RCS/io.c,v;    co  io.c  io.c,v;
  222.           co  RCS/io.c,v  io.c;    co  io.c,v  io.c;
  223.  
  224. FILE MODES
  225.      The working file inherits the read and execute permissions
  226.      from the RCS file. In addition, the owner write permission
  227.      is turned on, unless the file is checked out unlocked and
  228.      locking is set to strict (see rcs(L)).
  229.  
  230.      If a file with the name of the working file exists already
  231.      and has write permission, co aborts the checkout if -q is
  232.      given, or asks whether to abort if -q is not given. If the
  233.      existing working file is not writable or -f is given, the
  234.      working file is deleted without asking.
  235.  
  236. FILES
  237.      The caller of the command must have write permission in the
  238.      working directory, read permission for the RCS file, and
  239.      either read permission (for reading) or read/write permis-
  240.      sion (for locking) in the directory which contains the RCS
  241.      file.
  242.  
  243.      A number of temporary files are created.  A semaphore file
  244.      is created in the directory of the RCS file to prevent
  245.      simultaneous update.
  246.  
  247. DIAGNOSTICS
  248.      The RCS file name, the working file name, and the revision
  249.      number retrieved are written to the diagnostic output.  The
  250.      exit status always refers to the last file checked out, and
  251.      is 0 if the operation was successful, 1 otherwise.
  252.  
  253. IDENTIFICATION
  254.      Author: Walter F. Tichy, Purdue University, West Lafayette,
  255.      IN, 47907.
  256.      Revision Number: 1.5 ; Release Date: 89/10/30 .
  257.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  258.  
  259. SEE ALSO
  260.      ci(L), ident(L), rcs(L), rcsdiff(L), rcsintro(L),
  261.      rcsmerge(L), rlog(L), rcsfile(L)
  262.      Walter F. Tichy, "Design, Implementation, and Evaluation of
  263.      a Revision Control System," in Proceedings of the 6th Inter-
  264.      national Conference on Software Engineering, IEEE, Tokyo,
  265.      Sept. 1982.
  266.  
  267. LIMITATIONS
  268.      The option -d gets confused in some circumstances, and
  269.      accepts no date before 1970.  Links to the RCS and working
  270.      files are not preserved.  There is no way to suppress the
  271.      expansion of keywords, except by writing them differently.
  272.      In nroff and troff, this is done by embedding the null-
  273.      character `\&' into the keyword.
  274.  
  275. BUGS
  276.      The option -j does not work for files that contain lines
  277.      with a single `.'.
  278.