Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rcsintro(1RCS) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ci(1rcs)

co(1rcs)

ident(1rcs)

merge(1rcs)

rlog(1rcs)

rcs(1rcs)

rcsdiff(1rcs)

rcsmerge(1rcs)

rcsfile(5rcs)



RCSINTRO(1RCS)          COMMAND REFERENCE          RCSINTRO(1RCS)



NAME
     rcsintro - introduction to RCS commands

DESCRIPTION
     The Revision Control System (RCS) manages multiple revisions
     of text files.  RCS automates the storing, retrieval,
     logging, identification, and merging of revisions. RCS is
     useful for text that is revised frequently (for example:
     programs, documentation, graphics, papers, form letters, and
     so forth).

     The basic user interface is extremely simple. The novice
     only needs to learn two commands:  ci and co. Ci, short for
     checkin, deposits the contents of a text file into an
     archival file called an RCS file. An RCS file contains all
     revisions of a particular text file.  Co, short for
     checkout, retrieves revisions from an RCS file.

     Functions of RCS

     •    Storage and retrieval of multiple revisions of text.
          RCS saves all old revisions in a space efficient way.
          Changes no longer destroy the original, because the
          previous revisions remain accessible. Revisions can be
          retrieved according to ranges of revision numbers,
          symbolic names, dates, authors, and states.

     •    Maintenance of a complete history of changes. RCS logs
          all changes automatically.  Besides the text of each
          revision, RCS stores the author, the date and time of
          checkin, and a log message summarizing the change.  The
          logging makes it easy to find out what happened to a
          module, without having to compare source listings or
          having to track down colleagues.

     •    Resolution of access conflicts. When two or more
          programmers wish to modify the same revision, RCS
          alerts the programmers and prevents one modification
          from corrupting the other.

     •    Maintenance of a tree of revisions. RCS can maintain
          separate lines of development for each module. It
          stores a tree structure that represents the ancestral
          relationships among revisions.

     •    Merging of revisions and resolution of conflicts.  Two
          separate lines of development of a module can be
          coalesced by merging.  If the revisions to be merged
          affect the same sections of code, RCS alerts the user
          about the overlapping changes.

     •    Release and configuration control. Revisions can be



Printed 10/17/86                                                1





RCSINTRO(1RCS)          COMMAND REFERENCE          RCSINTRO(1RCS)



          assigned symbolic names and marked as released, stable,
          experimental, and so forth.  With these facilities,
          configurations of modules can be described simply and
          directly.

     •    Automatic identification of each revision with name,
          revision number, creation time, author, and so forth.
          The identification is like a stamp that can be embedded
          at an appropriate place in the text of a revision.  The
          identification makes it simple to determine which
          revisions of which modules make up a given
          configuration.

     •    Minimization of secondary storage. RCS needs little
          extra space for the revisions (only the differences).
          If intermediate revisions are deleted, the
          corresponding deltas are compressed accordingly.


     Getting Started with RCS

     Suppose you have a file f.c that you wish to put under
     control of RCS.  Invoke the checkin command

               ci  f.c

     This command creates the RCS file f.c,v, stores f.c into it
     as revision 1.1, and deletes f.c.  It also asks you for a
     description. The description should be a synopsis of the
     contents of the file. All later checkin commands will ask
     you for a log entry, which should summarize the changes that
     you made.

     Files ending in ,v are called RCS files (v stands for
     versions); the others are called working files.  To get back
     the working file f.c in the previous example, use the
     checkout command

               co  f.c

     This command extracts the latest revision from f.c,v and
     writes it into .f.c.  You can now edit f.c and check it back
     in by invoking

               ci  f.c

     Ci increments the revision number properly.  If ci complains
     with the message

               ci error: no lock set by <your login>





Printed 10/17/86                                                2





RCSINTRO(1RCS)          COMMAND REFERENCE          RCSINTRO(1RCS)



     then your system administrator has decided to create all RCS
     files with the locking attribute set to strict. In this
     case, you should have locked the revision during the
     previous checkout. Your last checkout should have been

               co  -l  f.c

     Of course, it is too late now to do the checkout with
     locking, because you probably modified f.c already, and a
     second checkout would overwrite your modifications. Instead,
     invoke

               rcs  -l  f.c

     This command will lock the latest revision for you, unless
     somebody else got ahead of you already. In this case, you'll
     have to negotiate with that person.

     Locking assures that you, and only you, can check in the
     next update, and avoids nasty problems if several people
     work on the same file.  Even if a revision is locked, it can
     still be checked out for reading, compiling, and so forth.
     All that locking prevents is a CHECKIN by anybody but the
     locker.

     If your RCS file is private, for example, if you are the
     only person who is going to deposit revisions into it,
     strict locking is not needed and you can turn it off.  If
     strict locking is turned off, the owner off the RCS file
     need not have a lock for checkin; all others still do.
     Turning strict locking off and on is done with the commands

               rcs  -U  f.c       and         rcs  -L  f.c

     If you don't want to clutter your working directory with RCS
     files, create a subdirectory called RCS in your working
     directory, and move all your RCS files there. RCS commands
     will look first into that directory to find needed files.
     All the commands discussed above will still work, without
     any modification.  (Actually, pairs of RCS and working files
     can be specified in 3 ways:  (a) both are given, (b) only
     the working file is given, (c) only the RCS file is given.
     Both RCS and working files may have arbitrary path prefixes;
     RCS commands pair them up intelligently).

     To avoid the deletion of the working file during checkin (in
     case you want to continue editing), invoke

               ci  -l  f.c        or          ci  -u  f.c

     These commands check in f.c as usual, but perform an
     implicit checkout. The first form also locks the checked in



Printed 10/17/86                                                3





RCSINTRO(1RCS)          COMMAND REFERENCE          RCSINTRO(1RCS)



     revision, the second one doesn't. Thus, these options save
     you one checkout operation.  The first form is useful if
     locking is strict, the second one if not strict.  Both
     update the identification markers in your working file (see
     below).

     You can give ci the number you want assigned to a checked in
     revision. Assume all your revisions were numbered 1.1, 1.2,
     1.3, and so forth, and you would like to start release 2.
     The command

               ci  -r2  f.c       or          ci  -r2.1  f.c

     assigns the number 2.1 to the new revision.  From then on,
     ci will number the subsequent revisions with 2.2, 2.3, and
     so forth. The corresponding co commands

               co  -r2  f.c       and         co  -r2.1  f.c

     retrieve the latest revision numbered 2.x and the revision
     2.1, respectively. Co without a revision number selects the
     latest revision on the trunk (for example, the highest
     revision with a number consisting of two fields). Numbers
     with more than two fields are needed for branches.  For
     example, to start a branch at revision 1.3, invoke

               ci  -r1.3.1  f.c

     This command starts a branch numbered 1 at revision 1.3, and
     assigns the number 1.3.1.1 to the new revision. For more
     information about branches, see rcsfile(5rcs).


     Automatic Identification

     RCS can put special strings for identification into your
     source and object code. To obtain such identification, place
     the marker

               $Header$

     into your text (for instance, inside a comment).  RCS will
     replace this marker with a string of the form

               $Header:  filename  revision_number
               date  time  author  state $

     With such a marker on the first page of each module, you can
     always see with which revision you are working.  RCS keeps
     the markers up to date automatically.  To propagate the
     markers into your object code, simply put them into literal
     character strings. In C, this is done as follows:



Printed 10/17/86                                                4





RCSINTRO(1RCS)          COMMAND REFERENCE          RCSINTRO(1RCS)



               static char rcsid[] = "$Header$";

     The command ident extracts such markers from any file, even
     object code and dumps.  Thus, ident lets you find out which
     revisions of which modules were used in a given program.

     You may also find it useful to put the marker $Log$ into
     your text, inside a comment. This marker accumulates the log
     messages that are requested during checkin.  Thus, you can
     maintain the complete history of your file directly inside
     it.  There are several additional identification markers;
     see co(1rcs) for details.

CAVEATS
     The maximum number of revisions that can be stored in a
     single RCS file is 719. When there are more than 700
     revisions in a file, a warning message is printed on the
     terminal (if possible) every time an RCS command works on
     the file. See the manual page for rcsfile(5rcs) for
     information on what action to take in this case.

     On older versions of RCS, the maximum number of revisions
     that can be stored in a single RCS file is 239.  No warning
     is displayed on the terminal if this number is exceeded.

SEE ALSO
     ci(1rcs), co(1rcs), ident(1rcs), merge(1rcs), rlog(1rcs),
     rcs(1rcs), rcsdiff(1rcs), rcsmerge(1rcs), rcsfile(5rcs).



























Printed 10/17/86                                                5





































































%%index%%
na:72,75;
de:147,2613;2904,2121;5169,2369;7682,2293;10119,666;
ca:10785,619;
se:11404,358;
%%index%%000000000124

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