home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / UTILITY / DOSRCSMP.ZIP / RCSINTRO.MAN < prev    next >
Encoding:
Text File  |  1990-08-22  |  10.4 KB  |  331 lines

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