MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
CO(1)                                                                    CO(1)



NAME
       co - check out RCS revisions

SYNOPSIS
       co [options] file ...

DESCRIPTION
       co  retrieves a revision from each RCS file and stores it into the cor-
       responding working file.

       Pathnames matching an RCS suffix denote RCS files;  all  others  denote
       working files.  Names are paired as explained in ci(1).

       Revisions  of an RCS file can be checked out locked or unlocked.  Lock-
       ing a revision prevents overlapping updates.  A  revision  checked  out
       for  reading  or  processing  (e.g.,  compiling) need not be locked.  A
       revision checked out for editing and later  checkin  must  normally  be
       locked.   Checkout with locking fails if the revision to be checked out
       is currently locked by another  user.   (A  lock  can  be  broken  with
       rcs(1).)   Checkout  with locking also requires the caller to be on the
       access list of the RCS file, unless he is the owner of the file or  the
       superuser,  or  the  access list is empty.  Checkout without locking is
       not subject to accesslist restrictions, and  is  not  affected  by  the
       presence of locks.

       A  revision  is  selected  by  options  for  revision or branch number,
       checkin date/time, author, or state.  When the  selection  options  are
       applied in combination, co retrieves the latest revision that satisfies
       all of them.  If  none  of  the  selection  options  is  specified,  co
       retrieves  the  latest  revision  on  the  default branch (normally the
       trunk, see the -b option of rcs(1)).  A revision or branch  number  can
       be  attached  to  any of the options -f, -I, -l, -M, -p, -q, -r, or -u.
       The options -d (date), -s (state), and -w (author) retrieve from a sin-
       gle  branch,  the  selected branch, which is either specified by one of
       -f, ..., -u, or the default branch.

       A co command applied to an RCS file with no revisions creates  a  zero-
       length  working  file.   co  always  performs keyword substitution (see
       below).

OPTIONS
       -r[rev]
              retrieves the latest revision whose number is less than or equal
              to  rev.   If rev indicates a branch rather than a revision, the
              latest revision on that branch is retrieved.  If rev is omitted,
              the  latest revision on the default branch (see the -b option of
              rcs(1)) is retrieved.  If rev is $$, co determines  the  revision
              number  from  keyword  values in the working file.  Otherwise, a
              revision is composed of one or more numeric or  symbolic  fields
              separated  by  periods.   If  rev begins with a period, then the
              default branch (normally the trunk) is prepended to it.  If  rev
              is  a  branch number followed by a period, then the latest revi-
              sion on that branch is used.  The numeric equivalent of  a  sym-
              bolic  field  is  specified  with  the -n option of the commands
              ci(1) and rcs(1).

       -l[rev]
              same as -r, except that it also locks the retrieved revision for
              the caller.

       -u[rev]
              same  as -r, except that it unlocks the retrieved revision if it
              was locked by the caller.  If rev is omitted, -u  retrieves  the
              revision  locked  by  the caller, if there is one; otherwise, it
              retrieves the latest revision on the default branch.

       -f[rev]
              forces the overwriting of the working file; useful in connection
              with -q.  See also FILE MODES below.

       -kkv   Generate keyword strings using the default form, e.g. $$Revision::
              1.1.1.1 $$ for the Revision keyword.  A locker's name is inserted
              in  the value of the Header, Id, and Locker keyword strings only
              as a file is being locked, i.e. by ci -l and co -l.  This is the
              default.

       -kkvl  Like -kkv, except that a locker's name is always inserted if the
              given revision is currently locked.

       -kk    Generate only keyword names in keyword strings; omit their  val-
              ues.   See  KEYWORD  SUBSTITUTION  below.   For example, for the
              Revision keyword, generate  the  string  $$Revision$$  instead  of
              $$Revision::  1.1.1.1  $$.  This option is useful to ignore differ-
              ences due to keyword substitution when comparing different revi-
              sions of a file.  Log messages are inserted after $$Log$$ keywords
              even if -kk is specified, since this tends  to  be  more  useful
              when merging changes.

       -ko    Generate  the  old  keyword  string, present in the working file
              just before it was checked in.  For example,  for  the  Revision
              keyword,  generate the string $$Revision:: 1.1 $$ instead of $$Revi-
              sion:: 1.1.1.1 $$ if that is how the string appeared when the file
              was checked in.  This can be useful for file formats that cannot
              tolerate any changes to substrings that happen to take the  form
              of keyword strings.

       -kb    Generate  a  binary  image of the old keyword string.  This acts
              like -ko, except it performs all working file input  and  output
              in  binary mode.  This makes little difference on Posix and Unix
              hosts, but on DOS-like hosts one should use rcs -i -kb  to  ini-
              tialize an RCS file intended to be used for binary files.  Also,
              on all hosts, rcsmerge(1) normally refuses to merge  files  when
              -kb is in effect.

       -kv    Generate  only keyword values for keyword strings.  For example,
              for the Revision keyword, generate the string 1.1.1.1 instead of
              $$Revision::  1.1.1.1 $$.  This can help generate files in program-
              ming languages where it is hard to strip keyword delimiters like
              $$Revision:: $$  from a string.  However, further keyword substitu-
              tion cannot be performed once the keyword names are removed,  so
              this option should be used with care.  Because of this danger of
              losing keywords, this option cannot be combined with -l, and the
              owner  write  permission  of  the working file is turned off; to
              edit the file later, check it out again without -kv.

       -p[rev]
              prints the retrieved revision on the standard output rather than
              storing  it  in the working file.  This option is useful when co
              is part of a pipe.

       -q[rev]
              quiet mode; diagnostics are not printed.

       -I[rev]
              interactive mode; the user is prompted and  questioned  even  if
              the standard input is not a terminal.

       -ddate retrieves  the  latest  revision  on  the  selected branch whose
              checkin date/time is less than or equal to date.  The  date  and
              time  can  be given in free format.  The time zone LT stands for
              local time; other common time zone names  are  understood.   For
              example,  the  following  dates  are equivalent if local time is
              January 11, 1990, 8pm Pacific Standard Time, eight hours west of
              Coordinated Universal Time (UTC):

                     8::0000 pm lt
                     4::0000 AM,, Jan. 12,, 19900           default is UTC
                     19900-001-12 004::0000::0000]0000           ISO 8601 (UTC)
                     19900-001-11 200::0000::0000-008           ISO 8601 (local time)
                     19900/001/12 004::0000::0000              traditional RCS format
                     Thu Jan 11 200::0000::0000 19900 LT      output of ctime(3) ] LT
                     Thu Jan 11 200::0000::0000 PST 19900     output of date(1)
                     Fri Jan 12 004::0000::0000 GMT 19900
                     Thu,, 11 Jan 19900 200::0000::0000 -0080000  Internet RFC 822
                     12-January-19900,, 004::0000 WET

              Most  fields in the date and time can be defaulted.  The default
              time zone is normally UTC, but this can be overridden by the  -z
              option.   The  other  defaults are determined in the order year,
              month, day, hour, minute, and second  (most  to  least  signifi-
              cant).   At  least  one  of  these fields must be provided.  For
              omitted fields that are of higher significance than the  highest
              provided field, the time zone's current values are assumed.  For
              all  other  omitted  fields,  the  lowest  possible  values  are
              assumed.   For  example, without -z, the date 200,, 100::300 defaults
              to 10:30:00 UTC of the 20th of the UTC time zone's current month
              and year.  The date/time must be quoted if it contains spaces.

       -M[rev]
              Set the modification time on the new working file to be the date
              of the retrieved revision.  Use this option with  care;  it  can
              confuse make(1).

       -sstate
              retrieves the latest revision on the selected branch whose state
              is set to state.

       -T     Preserve the modification time on the RCS file even if  the  RCS
              file  changes  because  a lock is added or removed.  This option
              can suppress extensive recompilation caused by a make(1)  depen-
              dency  of  some  other copy of the working file on the RCS file.
              Use this option with care; it can  suppress  recompilation  even
              when  it  is  needed,  i.e. when the change of lock would mean a
              change to keyword strings in the other working file.

       -w[login]
              retrieves the latest revision on the selected branch  which  was
              checked  in  by the user with login name login.  If the argument
              login is omitted, the caller's login is assumed.

       -jjoinlist
              generates a new revision which is the join of the  revisions  on
              joinlist.   This  option is largely obsoleted by rcsmerge(1) but
              is retained for backwards compatibility.

              The joinlist is a comma-separated list  of  pairs  of  the  form
              rev2::rev3,  where  rev2 and rev3 are (symbolic or numeric) revi-
              sion numbers.  For the initial such pair, rev1 denotes the revi-
              sion  selected  by the above options -f, ..., -w.  For all other
              pairs, rev1 denotes the revision generated by the previous pair.
              (Thus, the output of one join becomes the input to the next.)

              For  each pair, co joins revisions rev1 and rev3 with respect to
              rev2.  This means that all changes that transform rev2 into rev1
              are  applied  to a copy of rev3.  This is particularly useful if
              rev1 and rev3 are the ends of two branches that have rev2  as  a
              common  ancestor.  If rev1
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™