RCS Reference

$Id: rcs.html,v 1.8 1999/08/20 01:34:23 tdarugar Exp $

Commands

Other things

I use the following two aliases to make life a little easier:
alias   rcsinfo 'rlog -L -R RCS/*'
alias   ci      ci -u
rcsinfo show the files currently locked for editing (similar to sccs info).
The second alias makes ci a little more friendly by getting a read-only copy of the file after checking it in.

To label your files

When you reache a stable point in your software, do a release, etc, you may want to mark the version of your files so you can get back to that point at a later time.

Label your files using:

co -l RCS/*
ci -f -nyour_label RCS/*

An even better way of putting a label on your files is:

rcs -nyour_label_name: RCS/*

When you want to get the version of the file you checked in with your label, use:

co -r1_0c filename
or
co -r1_0c RCS/*
to get all of the files.

From the man pages:

       Keywords and their corresponding values:

       $Author$
              The login name of the user who checked in the revi-
              sion.

       $Date$ The date and time  the  revision  was  checked  in.
              With -zzone a numeric time zone offset is appended;
              otherwise, the date is UTC.

       $Header$
              A standard header containing the full  pathname  of
              the  RCS  file,  the  revision number, the date and
              time, the author, the state,  and  the  locker  (if
              locked).  With -zzone a numeric time zone offset is
              appended to the date; otherwise, the date is UTC.

       $Id$   Same as $Header$, except that the RCS  filename  is
			               without a path.

       $Locker$
              The  login name of the user who locked the revision
              (empty if not locked).

       $Log$  The log message supplied during  checkin,  preceded
              by  a header containing the RCS filename, the revi-
              sion number, the author, and  the  date  and  time.
              With -zzone a numeric time zone offset is appended;
              otherwise, the date is UTC.  Existing log  messages
              are  not replaced.  Instead, the new log message is
              inserted after $Log: rcs.html,v $
              inserted after Revision 1.8  1999/08/20 01:34:23  tdarugar
              inserted after Added info about labeling your files.
              inserted after
              inserted after Revision 1.7  1998/07/23 00:24:45  tdarugar
              inserted after Added section about labeling.
              inserted after
              inserted after Revision 1.6  1997/11/05 00:04:19  tdarugar
              inserted after Added the part about the aliases.
              inserted after
              inserted after Revision 1.5  1997/06/11 06:45:02  tdarugar
              inserted after Added info about keywords from the man page.
              inserted after.  This is useful for accu-
              mulating a complete change log in a source file.

              Each  inserted  line is prefixed by the string that
              prefixes the $Log$ line.  For example, if the $Log$
              line is "// $Log: rcs.html,v $
              line is "// Revision 1.8  1999/08/20 01:34:23  tdarugar
              line is "// Added info about labeling your files.
              line is "//
              line is "// Revision 1.7  1998/07/23 00:24:45  tdarugar
              line is "// Added section about labeling.
              line is "//
              line is "// Revision 1.6  1997/11/05 00:04:19  tdarugar
              line is "// Added the part about the aliases.
              line is "//
              line is "// Revision 1.5  1997/06/11 06:45:02  tdarugar
              line is "// Added info about keywords from the man page.
              line is "//", RCS prefixes each line
              of the log with "// ".  This  is  useful  for  lan-
              guages  with  comments  that  go  to the end of the
              line.  The convention for other languages is to use
              a  "  *  "  prefix inside a multiline comment.  For
              example, the initial log comment  of  a  C  program
              conventionally is of the following form:

                     /*
                      * $Log$
                      */

              For  backwards compatibility with older versions of
              RCS, if the log prefix is /* or  (*  surrounded  by
              optional  white space, inserted log lines contain a
              space instead of / or (;  however,  this  usage  is
              obsolescent and should not be relied on.

       $Name$ The  symbolic  name used to check out the revision,
              if   any.    For   example,   co -rJoe    generates
              $Name:  $.  Plain co generates just $Name:  $.

       $RCSfile$
              The name of the RCS file without a path.

       $Revision$
              The revision number assigned to the revision.

       $Source$
			               The full pathname of the RCS file.

       $State$
              The  state  assigned  to  the  revision with the -s
              option of rcs(1) or ci(1).

       The following characters in keyword values are represented
       by escape sequences to keep keyword strings well-formed.

              char     escape sequence
              tab      \t
              newline  \n
              space    \040
              $        \044
              \        \\