home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RCS43X.ZIP / RCSINTRO.MAN < prev    next >
Text File  |  1990-11-19  |  10KB  |  231 lines

  1. NAME
  2.      rcsintro - introduction to RCS commands
  3.  
  4. DESCRIPTION
  5.      The Revision Control System (RCS) manages multiple revisions
  6.      of text files.  RCS automates the storing, retrieval, log-
  7.      ging, identification, and merging of revisions. RCS is use-
  8.      ful for text that is revised frequently, for example pro-
  9.      grams, documentation, graphics, papers, form letters, etc.
  10.  
  11.      The basic user interface is extremely simple. The novice
  12.      only needs to learn two commands: ci(L) and co(L).  Ci,
  13.      short for "check in", deposits the contents of a text file
  14.      into an archival file called an RCS file. An RCS file con-
  15.      tains all revisions of a particular text file.  Co, short
  16.      for "check out", retrieves revisions from an RCS file.
  17.  
  18.      Functions of RCS
  19.  
  20.      +    Storage and retrieval of multiple revisions of text.
  21.           RCS saves all old revisions in a space efficient way.
  22.           Changes no longer destroy the original, because the
  23.           previous revisions remain accessible. Revisions can be
  24.           retrieved according to ranges of revision numbers, sym-
  25.           bolic names, dates, authors, and states.
  26.  
  27.      +    Maintenance of a complete history of changes. RCS logs
  28.           all changes automatically.  Besides the text of each
  29.           revision, RCS stores the author, the date and time of
  30.           check-in, and a log message summarizing the change.
  31.           The logging makes it easy to find out what happened to
  32.           a module, without having to compare source listings or
  33.           having to track down colleagues.
  34.  
  35.      +    Resolution of access conflicts. When two or more pro-
  36.           grammers wish to modify the same revision, RCS alerts
  37.           the programmers and prevents one modification from cor-
  38.           rupting the other.
  39.  
  40.      +    Maintenance of a tree of Revisions. RCS can maintain
  41.           separate lines of development for each module. It
  42.           stores a tree structure that represents the ancestral
  43.           relationships among revisions.
  44.  
  45.      +    Merging of revisions and resolution of conflicts.  Two
  46.           separate lines of development of a module can be
  47.           coalesced by merging.  If the revisions to be merged
  48.           affect the same sections of code, RCS alerts the user
  49.           about the overlapping changes.
  50.  
  51.      +    Release and configuration control. Revisions can be
  52.           assigned symbolic names and marked as released, stable,
  53.           experimental, etc.  With these facilities, configura-
  54.           tions of modules can be described simply and directly.
  55.  
  56.      +    Automatic identification of each revision with name,
  57.           revision number, creation time, author, etc.  The iden-
  58.           tification is like a stamp that can be embedded at an
  59.           appropriate place in the text of a revision.  The iden-
  60.           tification makes it simple to determine which revisions
  61.           of which modules make up a given configuration.
  62.  
  63.      +    Minimization of secondary storage. RCS needs little
  64.           extra space for the revisions (only the differences).
  65.           If intermediate revisions are deleted, the correspond-
  66.           ing deltas are compressed accordingly.
  67.  
  68.  
  69.      Getting Started with RCS
  70.  
  71.      Suppose you have a file f.c that you wish to put under con-
  72.      trol of RCS. Invoke the check-in command
  73.  
  74.                ci  f.c
  75.  
  76.      This command creates the RCS file f.c,v, stores f.c into it
  77.      as revision 1.1, and deletes f.c.  It also asks you for a
  78.      description. The description should be a synopsis of the
  79.      contents of the file. All later check-in commands will ask
  80.      you for a log entry, which should summarize the changes that
  81.      you made.
  82.  
  83.      Files ending in ,v are called RCS files (`v' stands for
  84.      `versions'), the others are called working files.  To get
  85.      back the working file f.c in the previous example, use the
  86.      check-out command
  87.  
  88.                co  f.c
  89.  
  90.      This command extracts the latest revision from f.c,v and
  91.      writes it into f.c. You can now edit f.c and check it back
  92.      in by invoking
  93.  
  94.                ci  f.c
  95.  
  96.      Ci increments the revision number properly. If ci complains
  97.      with the message
  98.  
  99.                ci error: no lock set by <your login>
  100.  
  101.      then your system administrator has decided to create all RCS
  102.      files with the locking attribute set to `strict'. In this
  103.      case, you should have locked the revision during the previ-
  104.      ous check-out. Your last check-out should have been
  105.  
  106.                co  -l  f.c
  107.  
  108.      Of course, it is too late now to do the check-out with lock-
  109.      ing, because you probably modified f.c already, and a second
  110.      check-out would overwrite your modifications. Instead,
  111.      invoke
  112.  
  113.                rcs  -l  f.c
  114.  
  115.      This command will lock the latest revision for you, unless
  116.      somebody else got ahead of you already. In this case, you'll
  117.      have to negotiate with that person.
  118.  
  119.      Locking assures that you, and only you, can check in the
  120.      next update, and avoids nasty problems if several people
  121.      work on the same file.  Even if a revision is locked, it can
  122.      still be checked out for reading, compiling, etc. All that
  123.      locking prevents is a CHECK-IN by anybody but the locker.
  124.  
  125.      If your RCS file is private, i.e., if you are the only per-
  126.      son who is going to deposit revisions into it, strict lock-
  127.      ing is not needed and you can turn it off.  If strict lock-
  128.      ing is turned off, the owner of the RCS file need not have a
  129.      lock for check-in; all others still do. Turning strict lock-
  130.      ing off and on is done with the commands
  131.  
  132.                rcs  -U  f.c     and     rcs  -L  f.c
  133.  
  134.      If you don't want to clutter your working directory with RCS
  135.      files, create a subdirectory called RCS in your working
  136.      directory, and move all your RCS files there. RCS commands
  137.      will look first into that directory to find needed files.
  138.      All the commands discussed above will still work, without
  139.      any modification. (Actually, pairs of RCS and working files
  140.      can be specified in 3 ways: (a) both are given, (b) only the
  141.      working file is given, (c) only the RCS file is given. Both
  142.      RCS and working files may have arbitrary path prefixes; RCS
  143.      commands pair them up intelligently).
  144.  
  145.      To avoid the deletion of the working file during check-in
  146.      (in case you want to continue editing), invoke
  147.  
  148.                ci  -l  f.c     or     ci  -u  f.c
  149.  
  150.      These commands check in f.c as usual, but perform an impli-
  151.      cit check-out. The first form also locks the checked in
  152.      revision, the second one doesn't. Thus, these options save
  153.      you one check-out operation.  The first form is useful if
  154.      locking is strict, the second one if not strict.  Both
  155.      update the identification markers in your working file (see
  156.      below).
  157.  
  158.      You can give ci the number you want assigned to a checked in
  159.      revision. Assume all your revisions were numbered 1.1, 1.2,
  160.      1.3, etc., and you would like to start release 2.  The com-
  161.      mand
  162.  
  163.                ci  -r2  f.c     or     ci  -r2.1  f.c
  164.  
  165.      assigns the number 2.1 to the new revision.  From then on,
  166.      ci will number the subsequent revisions with 2.2, 2.3, etc.
  167.      The corresponding co commands
  168.  
  169.                co  -r2  f.c     and     co  -r2.1  f.c
  170.  
  171.      retrieve the latest revision numbered 2.x and the revision
  172.      2.1, respectively. Co without a revision number selects the
  173.      latest revision on the "trunk", i.e., the highest revision
  174.      with a number consisting of 2 fields. Numbers with more than
  175.      2 fields are needed for branches.  For example, to start a
  176.      branch at revision 1.3, invoke
  177.  
  178.                ci  -r1.3.1  f.c
  179.  
  180.      This command starts a branch numbered 1 at revision 1.3, and
  181.      assigns the number 1.3.1.1 to the new revision. For more
  182.      information about branches, see rcsfile(L).
  183.  
  184.  
  185.      Automatic Identification
  186.  
  187.      RCS can put special strings for identification into your
  188.      source and object code. To obtain such identification, place
  189.      the marker
  190.  
  191.                $Header$
  192.  
  193.      into your text, for instance inside a comment.  RCS will
  194.      replace this marker with a string of the form
  195.  
  196.                $Header:  filename  revision_number  date  time
  197.      author  state $
  198.  
  199.      With such a marker on the first page of each module, you can
  200.      always see with which revision you are working.  RCS keeps
  201.      the markers up to date automatically.  To propagate the
  202.      markers into your object code, simply put them into literal
  203.      character strings. In C, this is done as follows:
  204.  
  205.                static char rcsid[] = "$Header$";
  206.  
  207.      The command ident extracts such markers from any file, even
  208.      object code and dumps.  Thus, ident lets you find out which
  209.      revisions of which modules were used in a given program.
  210.  
  211.      You may also find it useful to put the marker $Log$ into
  212.      your text, inside a comment. This marker accumulates the log
  213.      messages that are requested during check-in.  Thus, you can
  214.      maintain the complete history of your file directly inside
  215.      it.  There are several additional identification markers;
  216.      see co(L) for details.
  217.  
  218. IDENTIFICATION
  219.      Author: Walter F. Tichy, Purdue University, West Lafayette,
  220.      IN, 47907.
  221.      Revision Number: 1.3 ; Release Date: 89/10/30 .
  222.      Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  223.  
  224. SEE ALSO
  225.      ci(L), co(L), ident(L), merge(L), rcs(L), rcsdiff(L),
  226.      rcsmerge(L), rlog(L), rcsfile(L),
  227.      Walter F. Tichy, "Design, Implementation, and Evaluation of
  228.      a Revision Control System," in Proceedings of the 6th Inter-
  229.      national Conference on Software Engineering, IEEE, Tokyo,
  230.      Sept. 1982.
  231.