Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

co(1)

ci(1)

ident(1)

rcsclean(1)

rcsdiff(1)

rcsmerge(1)

rlog(1)

sccstorcs(1)

rcsfile(4)



  rcs(1)                              CLIX                              rcs(1)



  NAME

    rcs - Changes RCS file attributes

  SYNOPSIS

    rcs [flag ... ] file ...

  FLAGS

    -i             Creates and initializes a new RCS file, but does not
                   deposit any revision.  If the RCS file has no path prefix,
                   rcs tries to place it first in the subdirectory ./RCS and
                   then in the current directory.  If the RCS file exists, an
                   error message is displayed.

    -alogins       Appends the login names appearing in the comma-separated
                   list logins to the access list of the RCS file.

    -Aoldfile      Appends the access list of oldfile to the access list of
                   the RCS file.

    -e[logins]     Erases the login names appearing in the comma-separated
                   list logins from the access list of the RCS file.  If
                   logins is omitted, the entire access list is erased.

    -b[rev]        Sets the default branch to rev.  If rev is omitted, the
                   default branch is reset to the (dynamically) highest branch
                   on the trunk.

    -cstring       Sets the comment leader to string.  The comment leader is
                   displayed before every log message line generated by the
                   keyword $Log: during checkout (see co(1)).  This is useful
                   for programming languages without multiline comments.
                   During initial checkin, the comment leader is determined
                   from the suffix of the working file.

    -ksubst        Sets the default keyword substitution to subst.  The effect
                   of keyword substitution is described in co(1).  Giving an
                   explicit -k flag to the co, rcsdiff, and rcsmerge commands
                   overrides this default.  Do not use rcs -kv, because the -
                   kv flag is incompatible with co -l.  Use rcs -kkv to
                   restore normal default keyword substitution.

    -l[rev]        Locks the revision with number rev.  If a branch is given,
                   the latest revision on that branch is locked.  If rev is
                   omitted, the latest revision on the default branch is
                   locked.  Locking prevents overlapping changes.  A lock is
                   removed with the -u flag or the ci command.

    -u[rev]        Unlocks the revision with number rev.  If a branch is



  2/94 - Intergraph Corporation                                              1






  rcs(1)                              CLIX                              rcs(1)



                   given, the latest revision on that branch is unlocked.  If
                   rev is omitted, the most recent lock held by the caller is
                   removed.  (That is, the most recent lock is broken.)
                   Normally, only the locker of a revision may unlock it.
                   Somebody else unlocking a revision breaks the lock.  This
                   sends a mail message to the original locker.  The message
                   contains a commentary solicited from the breaker.  The
                   commentary is terminated with a line containing a single
                   dot ( . ) or the <Ctrl-D> sequence.

    -L             Sets locking to strict.  Strict locking means that the
                   owner of an RCS file is not exempt from locking for
                   checkin.  This flag should be used for shared files.

    -U             Sets locking to nonstrict.  Nonstrict locking means that
                   the owner of a file need not lock a revision for checkin.
                   This flag should not be used for shared files.  The default
                   (-L or -U) is determined by the system administrator.

    -nname[:rev]   Associates the symbolic name name with the branch or
                   revision rev.  The rcs command displays an error message if
                   name is already associated with another number.  If rev is
                   omitted, the symbolic name is deleted.

    -mrev:msg      Replaces the log message for revision rev msg.

    -nname[:[rev]] Associates the symbolic name name with the branch or
                   revision rev.  Deletes the symbolic name if both : and rev
                   are omitted;  otherwise, prints an error message if name is
                   already associated with another number.  If rev is
                   symbolic, it is expanded before association.  A rev
                   consisting of a branch number followed by a period (.)
                   stands for the current latest revision in the branch. A :
                   with an empty rev stands for the current latest revision on
                   the default branch,normally the trunk.  For example, rcs
                   -nname:RCS/* associates name with the current latest
                   revision of all the named RCS files; this contrasts with
                   rcs -nname:$RCS/* which associates name with the revision
                   numbers extracted from keyword strings in the corresponding
                   working files.

    -Nname[:rev]   Same as the -n flag, except that it overrides a previous
                   assignment of name.

    -orange        Deletes (``outdates'') the revisions given by range.  A
                   range consisting of a single revision number denotes that
                   revision.  A range consisting of a branch number denotes
                   the latest revision on that branch.  A range with the form
                   rev1-rev2 represents revisions rev1 to rev2 on the same
                   branch; -rev represents the beginning of the branch
                   containing rev up to and including rev; and rev- represents



  2                                              Intergraph Corporation - 2/94






  rcs(1)                              CLIX                              rcs(1)



                   revision rev to the end of the branch containing rev.  None
                   of the outdated revisions may have branches or locks.

    -q             (Quiet mode.)  Diagnostics are not displayed.

    -I             Runs interactively, even if stdin is not a terminal.

    -sstate[:rev]  Sets the state attribute of the revision rev to state.  If
                   rev is a branch number, the latest revision on that branch
                   is assumed.  If rev is omitted, the latest revision on the
                   default branch is assumed.  Any identifier is acceptable
                   for state.  A useful set of states is Exp (for
                   experimental), Stab (for stable), and Rel (for released).
                   By default, ci sets the state of a revision to Exp.

    -t[txtfile]    Writes descriptive text to the RCS file.  (This flag
                   deletes any existing text.)  If txtfile is omitted, rcs
                   prompts the user for text supplied from stdin, terminated
                   with a line containing a single dot ( . ) or the <Ctrl-D>
                   sequence.  Otherwise, the descriptive text is copied from
                   the file txtfile.  If the -i flag is present, descriptive
                   text is requested even if the -t flag is not given.  The
                   prompt is suppressed if the stdin is not a terminal.

    -t-string      Writes descriptive text from the string into the RCS file,
                   deleting the existing text.

    -Vn            Emulates RCS version n, where n may be 3, 4, or 5.  This
                   may be useful when interchanging RCS files with others who
                   are running older versions of RCS.  To see which version of
                   RCS others are running, have them use the rlog command on
                   an RCS file; if none of the first few lines of output
                   contain the string branch: it is version 3;  if the dates'
                   years have just two digits, it is version 4; otherwise, it
                   is version 5.  An RCS file generated while emulating
                   version 3 will lose its default branch.  An RCS revision
                   generated while emulating version 4 or earlier will have a
                   timestamp that is off by up to 13 hours.  A revision
                   extracted while emulating version 4 or earlier will contain
                   dates of the form yy/mm/dd instead of yyyy/mm/dd and may
                   also contain different white space in the substitution for
                   $Log$.

    -x suffixes    Uses suffixes to characterize RCS files.  A non-empty
                   suffix matches any pathname ending in the suffix.  An empty
                   suffix matches any pathname of the form RCS/file or
                   path/RCS/file.  The -x flag can specify a list of suffixes
                   separated by a slash (/).  For example, -x,v/ specifies two
                   suffixes:  ,v and the empty suffix.  If two or more
                   suffixes are specified, they are tried in order when
                   looking for a RCS file; the first one that works is used



  2/94 - Intergraph Corporation                                              3






  rcs(1)                              CLIX                              rcs(1)



                   for that file.  If no RCS file is found but an RCS file can
                   be created, the suffixes are tried in order to determine
                   the new RCS file's name.  The default for suffixes is
                   installation-dependent; normally it is ,v/ for hosts like
                   UNIX that permit commas in file names, and is empty (the
                   empty suffix) for other hosts.

  DESCRIPTION

    The rcs command creates new Revision Control System (RCS) files or changes
    attributes of existing ones.  An RCS file contains multiple revisions of
    text, an access list, a change log, descriptive text, and some control
    attributes.  When invoking rcs, the user's login name must be on the
    access list unless the access list is empty, the user is the owner of the
    file or the superuser, or the -i flag is present.

    Pathnames matching an RCS suffix denote RCS files;  all others denote
    working files.  Names are paired as explained in ci(1).  Revision numbers
    use the syntax described in ci(1).

  Environment Variables

    The following environment variable can be useful with RCS:

    RCSINIT  Specifies options prepended to the argument list, separated by
             spaces.  A backslash escapes spaces within an option.  The
             RCSINIT options are prepended to the argument lists of most RCS
             commands.  Useful RCSINIT options include -q, -V, and -x.

  EXAMPLES

    1.  This example deletes revisions 1.1 through 1.4 of the project.txt
        file.

        rcs -o1.1-1.4 project.txt


    2.  This example unlocks the most recent locked version of each file in
        the RCS subdirectory.

        rcs -u RCS/ *,v


  FILES

    The rcs command accesses files much as the ci command does, except that it
    uses the effective user for all accesses, it does not write the working
    file or its directory, and it does not even read the working file unless a
    revision number of $ is specified.

    The following files are used by rcs:



  4                                              Intergraph Corporation - 2/94






  rcs(1)                              CLIX                              rcs(1)



    *,RCSnewxxxxxx       Temporary file for the new revision.

    /tmp/RCSmailxxxxxx   File sent to other users to notify them of a broken
                         lock on a file.

    /tmp/RCSoutxxxxxx    Temporary file.

    /tmp/RCSdifxxxxxx    Temporary file.

  NOTES

    The user must have read and write permission for the directory containing
    the RCS file and read permission for the RCS file itself.  The rcs command
    creates a semaphore file in the same directory as the RCS file to prevent
    simultaneous update.  For changes, rcs always creates a new file.  On
    successful completion, rcs deletes the old file and renames the new one.
    This strategy makes links to RCS files useless.

  CAUTIONS

    The separator for revision ranges in the -o flag used to be a dash (-)
    instead of a colon (:), but this leads to confusion when symbolic names
    contain a dash.  For backwards compatibility, rcs -o still supports the
    old - separator, but it warns about this obsolete use.

    Symbolic names need not refer to existing revisions or branches.  For
    example, the -o flag does not remove symbolic names for the outdated
    revisions;  the user must use the -n flag to remove the names.

    The -brev flag generates an RCS file that cannot be parsed by RCS version
    3 or earlier.

    The -ksubst flags (except -kkv) generate an RCS file that cannot be parsed
    by RCS version 4 or earlier.

    Use rcs -Vn to make an RCS file acceptable to RCS version n by discarding
    information that would confuse version n.

    RCS version 5.5 and earlier does not support the -x flag, and requires a
    ,v suffix on an RCS pathname.

  DIAGNOSTICS

    The RCS file name and the revisions outdated are written to the diagnostic
    output.

  EXIT VALUES

    The exit value always refers to the last RCS file operated on, and is 0 if
    the operation was successful.  If unsuccessful, the exit value is 1.




  2/94 - Intergraph Corporation                                              5






  rcs(1)                              CLIX                              rcs(1)



  RELATED INFORMATION

    Commands:  co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1), rcsmerge(1),
    rlog(1), sccstorcs(1)

    Files:  rcsfile(4)

    Misc.:  Walter F. Tichy, ``Design, Implementation, and Evaluation of a
    Revision Control System,'' in Proceedings of the 6th International
    Conference on Software Engineering, IEEE, Tokyo, Sept. 1982

    Walter F. Tichy,  ``RCS--A System for Version Control,'' Software--
    Practice & Experience, 15, 7 (July 1985), pp. 637-654.









































  6                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026