home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / software / 3424 < prev    next >
Encoding:
Text File  |  1992-09-11  |  35.8 KB  |  948 lines

  1. Newsgroups: comp.software-eng
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!spool.mu.edu!umn.edu!csus.edu!netcom.com!dbander
  3. From: dbander@netcom.com (David B. Andersen)
  4. Subject: Summary: SCCS vs RCS
  5. Message-ID: <!xvn8wk.dbander@netcom.com>
  6. Date: Fri, 11 Sep 92 18:26:16 GMT
  7. Organization: Netcom - Online Communication Services (408 241-9760 guest)
  8. Sender: David B. Andersen
  9. Distribution: comp.software-eng
  10. Lines: 936
  11.  
  12.  
  13.  
  14. A week or so ago, I posted a question asking about the
  15. relative merits of SCCS vs RCS.  What follows is a summary
  16. of your responses.
  17.  
  18. Many thanks to all for your valuable information.
  19.  
  20. ---------------------------------------------------------------------
  21. From: ceder@lysator.liu.se
  22.  
  23. The biggest win with RCS is that you can run CVS on top of it.
  24.  
  25. I have used CVS for a project that is some 50 000 lines of code with
  26. no big problems. I know of a company that uses it in a much bigger
  27. project. They are about 6 persons that often edit the same file
  28. simultaneously. They are also pleased with it.
  29.  
  30. CVS is availble via anonymous ftp from prep.ai.mit.edu in
  31. pub/gnu/cvs-1.3.tar.Z. It is also mirrored in various places, so you
  32. might be able to find an ftp site closer to you.
  33.  
  34. These are the three strongest advantages of CVS over RCS and SCCS, in
  35. my experience:
  36.  
  37. Collection of files
  38. -------------------
  39.  
  40. One of the strong points about CVS is that it does not only lets you
  41. retrieve old versions of specific files. You can collect some files
  42. (or directories of files) into ``modules'' and a lot of the CVS
  43. commands can operate on an entire module at once. The RCS history
  44. files of all modules are kept at a central place in the file system
  45. hierarchy. When someone wants to work an a certain module he just
  46. types "cvs checkout bugtrack" which causes the directory ``bugtrack''
  47. to be created and populated with the files that make up the bugtrack
  48. project.
  49.  
  50. With "cvs tag bugtrack-1.0" you can give the symbolic tag
  51. "bugtrack-1.0" to all the versions of the file in the bugtrack module.
  52. Later on, you can do "cvs checkout -r bugtrack-1.0 bugtrack" to
  53. retrieve the files that make up the 1.0 release of bugtrack. You can
  54. even do things like "cvs diff -c -r bugtrack-1.0 -r bugtrack-1.5" to
  55. get a context diff of all files that have changed between release 1.0
  56. and release 1.5!
  57.  
  58. No locking
  59. ----------
  60.  
  61. If you work in a group of programmer you have probably often wanted to
  62. edit the function foo() in bar.c, but Joe had locked bar.c because he
  63. is editing gazonk().
  64.  
  65. CVS does not lock files. Instead, both you and Joe can edit bar.c. The
  66. first one to check in it won't realise that the other have been
  67. editing it. (So if you are quicker than Joe you wont have any trouble
  68. at all). Poor Joe just have to do "cvs update bar.c" to merge in your
  69. changes in his copy of the file. As long as you changeing different
  70. sections of the file the merge is totaly automatic. If you change the
  71. same lines you will have to resolve the conflicts manually.
  72.  
  73. Friendlier user interface
  74. -------------------------
  75.  
  76. If you don't remember the syntax of "cvs diff" you just type "cvs -H
  77. diff" and you will get a short description of all the flags. Just "cvs
  78. -H" lists all the sub-commands. I find the commands less cryptic than
  79. the RCS equivalents. Compare "cvs checkout modulename" (which can be
  80. abbreviated to "cvs co modulename") with "co -l RCS/*,v" (or whatever
  81. it is you are supposed to say - it was a year since I used RCS
  82. seriously).
  83.  
  84. I enclose an introduction to CVS written by Steven.Pemberton@cwi.nl
  85. below.
  86. ---
  87. Per Cederqvist, Lysator Academic Computer Society., Univ. of Linkoping, Sweden
  88. Email: ceder@lysator.liu.se    
  89. Phone: +46 13 26 09 17         "CVS - Check It Out!"
  90. ---
  91.  
  92. INTRODUCTION TO USING CVS
  93.  
  94.     CVS is a system that lets groups of people work simultaneously on
  95.     groups of files (for instance program sources).
  96.  
  97.     It works by holding a central 'repository' of the most recent version
  98.     of the files.  You may at any time create a personal copy of these
  99.     files; if at a later date newer versions of the files are put in the
  100.     repository, you can 'update' your copy.
  101.  
  102.     You may edit your copy of the files freely. If new versions of the
  103.     files have been put in the repository in the meantime, doing an update
  104.     merges the changes in the central copy into your copy.
  105.     (It can be that when you do an update, the changes in the
  106.     central copy clash with changes you have made in your own
  107.     copy. In this case cvs warns you, and you have to resolve the
  108.     clash in your copy.)
  109.  
  110.     When you are satisfied with the changes you have made in your copy of
  111.     the files, you can 'commit' them into the central repository.
  112.     (When you do a commit, if you haven't updated to the most
  113.     recent version of the files, cvs tells you this; then you have
  114.     to first update, resolve any possible clashes, and then redo
  115.     the commit.)
  116.  
  117. USING CVS
  118.  
  119.     Suppose that a number of repositories have been stored in
  120.     /usr/src/cvs. Whenever you use cvs, the environment variable
  121.     CVSROOT must be set to this (for some reason):
  122.  
  123.     CVSROOT=/usr/src/cvs
  124.     export CVSROOT
  125.  
  126. TO CREATE A PERSONAL COPY OF A REPOSITORY
  127.  
  128.     Suppose you want a copy of the files in repository 'views' to be
  129.     created in your directory src. Go to the place where you want your
  130.     copy of the directory, and do a 'checkout' of the directory you
  131.     want:
  132.  
  133.     cd $HOME/src
  134.     cvs checkout views
  135.  
  136.     This creates a directory called (in this case) 'views' in the src
  137.     directory, containing a copy of the files, which you may now work
  138.     on to your heart's content.
  139.  
  140. TO UPDATE YOUR COPY
  141.  
  142.     Use the command 'cvs update'.
  143.  
  144.     This will update your copy with any changes from the central
  145.     repository, telling you which files have been updated (their names
  146.     are displayed with a U before them), and which have been modified
  147.     by you and not yet committed (preceded by an M). You will be
  148.     warned of any files that contain clashes, the clashes will be
  149.     marked in the file surrounded by lines of the form <<<< and >>>>.
  150.    
  151. TO COMMIT YOUR CHANGES
  152.  
  153.     Use the command 'cvs commit'.
  154.  
  155.     You will be put in an editor to make a message that describes the
  156.     changes that you have made (for future reference). Your changes
  157.     will then be added to the central copy.
  158.  
  159. ADDING AND REMOVING FILES
  160.  
  161.     It can be that the changes you want to make involve a completely
  162.     new file, or removing an existing one. The commands to use here
  163.     are:
  164.  
  165.     cvs add <filename>
  166.     cvs remove <filename>
  167.  
  168.     You still have to do a commit after these commands. You may make
  169.     any number of new files in your copy of the repository, but they
  170.     will not be committed to the central copy unless you do a 'cvs add'.
  171.  
  172. OTHER USEFUL COMMANDS AND HINTS
  173.  
  174.     To see the commit messages for files, and who made them, use:
  175.  
  176.     cvs log [filenames]
  177.  
  178.     To see the differences between your version and the central version:
  179.  
  180.     cvs diff [filenames]
  181.  
  182.     To give a file a new name, rename it and do an add and a remove.
  183.  
  184.     To lose your changes and go back to the version from the
  185.     repository, delete the file and do an update.
  186.  
  187.     After an update where there have been clashes, your original
  188.     version of the file is saved as .#file.version.
  189.  
  190.     All the cvs commands mentioned accept a flag '-n', that doesn't do
  191.     the action, but lets you see what would happen. For instance, you
  192.     can use 'cvs -n update' to see which files would be updated.
  193.  
  194. MORE INFORMATION
  195.  
  196.     This is necessarily a very brief introduction. See the manual page
  197.     (man cvs) for full details.
  198.  
  199. ------------------------------------------------------------------------
  200.  
  201. From: mahesh@gadget.evb.com (B.G. Mahesh)
  202.  
  203. can I have a look at those sccs tools ? I have installed
  204. cvs. I am thinking of moving to cvs later on.
  205.  
  206. thanks
  207.  
  208. -- 
  209.  
  210. B.G. Mahesh
  211. mahesh@evb.com
  212.  
  213. ------------------------------------------------------------------------
  214.  
  215. From: netcon!intime!scottm@CS.UCLA.EDU
  216.  
  217. Actually, you caught me at a good time - I'm in the process of converting
  218. to RCS/CVS. I've found that RCS is less of a straight jacket than SCCS,
  219. and combined with CVS, makes for good concurrent development. If you are
  220. looking at RCS vs. SCCS at a narrow "raw tool" scope, there's not much
  221. to be said, save two things:
  222.  
  223.     - RCS is easier to learn and use.
  224.       1) You have to use two commands to check a file into SCCS,
  225.          namely admin for the first time, and get for each subsequent.
  226.          RCS uses one command, "ci" (check in).
  227.       2) RCS prompts you for a description of the file. SCCS doesn't
  228.          have this feature.
  229.       3) RCS has fewer keywords to remember.
  230.       4) RCS allows one to associate a symbolic name with a revision
  231.          number.
  232.  
  233.     - RCS allows one to remove revisions (deltas) that are not the
  234.       ends of a branch. For example, assume a revision path:
  235.  
  236.        1.1 -- 1.2 -- 1.3 -- 1.4 -- 1.5 -- 2.1 ...
  237.                                         |
  238.                     +- 1.5.1.1 -- 1.5.1.2 ...
  239.       
  240.       If for the sake of argument, 1.5 is where I released the file
  241.       into production, and I no longer see any need for revisions
  242.       1.2 - 1.4, I can remove them. SCCS won't allow me to do this
  243.       kind of pruning.
  244.  
  245. With an expanded scope to CVS, a tool built on top of RCS, allows one
  246. to use the symbolic tag feature of RCS to identify releases and products.
  247. CVS also defines a master source repository (where RCS files live), and
  248. the concept of modules (a directory and repository database). This is
  249. infinitely useful since it allows me to pull an individual module (a
  250. component of a product) or an entire product (a whole set of modules).
  251. CVS also works recursively on directories. No such tool exists in the 
  252. public domain for SCCS, so you have to roll your own.
  253.  
  254. Having toiled over the problem for a couple of years, I can say that I
  255. am happy with the choice I made.
  256.  
  257.  
  258. ------------------------------------------------------------------------
  259.  
  260. From: bryant@sol.ced.utah.edu (Bryant Eastham)
  261.  
  262. Hello, my name is Bryant Eastham and I am a system administrator/programmer
  263. at the University of Utah. I have used both SCCS and RCS, although it has
  264. been quite a while since I used SCCS. From my point of view, here are
  265. the benefits of RCS:
  266.  
  267.    * Multiple platform support - you have the source.
  268.      I have a friend that runs it on his PC at home.
  269.  
  270.    * Speed. It is faster at extraction than SCCS.
  271.  
  272.    * Interface. The program seems to have a "cleaner" interface.
  273.      Very easy to write shell scripts that modify things.
  274.  
  275.    * I cannot remember the features that it has that SCCS doesn't,
  276.      but I know that there are a few.
  277.  
  278. Hope it helps.
  279. Bryant Eastham
  280. Center for Engineering Design
  281. bryant@ced.utah.edu
  282.  
  283.  
  284. ------------------------------------------------------------------------
  285. From: Peter Mutsaers <muts@fys.ruu.nl>
  286.  
  287. RCS has easier commands (but this is no advantage as you're already
  288. familiar with SCCS). The main difference is :
  289. 1) It is free and source is available, so you can put it everywhere.
  290.  
  291. 2) You can use symbolic tag names and thus check out an entire
  292. configuration. You tag every file in the current version with a name
  293. and later check this out. (I think this was not available in sccs). 
  294.  
  295. 3) You can use the (free) cvs on top of rcs, which manages not only 1
  296. directory, but a whole hierarchy of sources, and is suiteable for very
  297. big projects.
  298.  
  299.  
  300. ------------------------------------------------------------------------
  301.  
  302. From: mulvihil@oasys.dt.navy.mil (Lawrence Mulvihill)
  303.  
  304. Looking forward to your post!
  305.  
  306.  
  307. ------------------------------------------------------------------------
  308.  
  309. From: eggert@shadow.twinsun.com (Paul Eggert)
  310.  
  311. Here's Bill Wohler's FAQ for your question:
  312.  
  313. From: wohler@sapwdf.UUCP (Bill Wohler)
  314. Newsgroups: comp.unix.misc,comp.unix.questions,comp.unix.shell
  315. Subject: Summary: RCS vs SCCS
  316. Message-ID: <3678@sapwdf.UUCP>
  317. Date: 2 Jul 92 13:29:12 GMT
  318. Reply-To: Bill Wohler <wohler@sap-ag.de>
  319. Followup-To: comp.unix.misc
  320. Organization: SAP AG, Walldorf, Germany
  321. Lines: 556
  322.  
  323. folks,
  324.  
  325.   since the topic of RCS vs. SCCS comes up every so often, i put
  326.   together some of the responses.  most of my stuff comes from a
  327.   discussion from last year.  the most recent discussion hashed out
  328.   the differences of speed, and didn't add too much new stuff.
  329.  
  330.   i didn't notice this topic in the faq.  perhaps the faq could
  331.   mention that this summary is available to those who want it (someone
  332.   please volunteer an anonymous ftp site!)
  333.  
  334.   if you have anything to add, please let me know.  we can use this
  335.   summary if the question pops up again.  sound good?
  336.  
  337.                 *****
  338.  
  339. The following is a comparison of RCS and SCCS, as well as a
  340. description of a couple of other packages and a bibliography.  This is
  341. a compilation of work from the following people.
  342.   
  343.     Karl Vogel <vogel@c-17igp.wpafb.af.mil>
  344.     Mark Runyan <runyan@hpcuhc.cup.hp.com>
  345.     Paul Eggert <eggert@twinsun.com>
  346.     Greg Henderson <henders@infonode.ingr.com>
  347.     Dave Goldberg <dsg@mbunix.mitre.org>
  348.   
  349. If you see the word "easier", then be forewarned that this might be
  350. a religious issue.  I've included them just the same.
  351.   
  352.   
  353. 1.    RCS vs SCCS
  354.   
  355. The majority of the replies (in a recent poll) were in favor of RCS, a
  356. few for SCCS, and a few suggested alternatives such as CVS.
  357.  
  358. Functionally RCS and SCCS are practically equal, with RCS having a bit
  359. more features since it continues to be updated.
  360.  
  361. Note that RCS learned from the mistakes of SCCS...
  362.   
  363. 1.1.    RCS has an easier interface for first time users.  There are less
  364.     commands, it is more intuitive, and provides more useful
  365.     arguments.
  366.   
  367. 1.2.    RCS allows you treat a set of files as a family of files while
  368.     SCCS is meant primarily for keeping the revision history of
  369.     files.    RCS has the ability to use symbolic names to point to
  370.     sets of revisions.
  371.   
  372. 1.3.    RCS keeps history in files with a ",v" suffix.    SCCS keeps history
  373.     in files with a "s." prefix.  Some Make programs recognize the
  374.     "s."  prefix while having trouble with ",v" suffix.  Your
  375.     mileage will vary.
  376.  
  377.     RCS files are directly editable.  SCCS files should only be
  378.     acted on by the SCCS tools.  (While you *may* edit an SCCS
  379.     file, you will have to recalculate the checksum using the
  380.     admin program.    Also, editing either RCS or SCCS files is a
  381.     bad idea just because mistakes are so easy to make and so
  382.     fatal to the history of the file).
  383.  
  384.     RCS looks for RCS files automatically in the current directory
  385.     or in a RCS subdirectory.  You have to explicitly name a sccs
  386.     file--annoying.
  387.  
  388.     RCS stores its revisions by holding a copy of the latest
  389.     version and storing backward deltas.  SCCS uses a "merged
  390.     delta" concept.
  391.  
  392.     All RCS activity takes place within the single RCS file.  SCCS
  393.     maintains several files.  This can be confusing.
  394.   
  395. 1.4.    Locks are kept in separate files for SCCS.  A lock on an RCS file is 
  396.     kept in the RCS file.
  397.   
  398. 1.5.    If you have an RCS file but not RCS, you can still retrieve the
  399.     latest version.     Not true with SCCS.
  400.   
  401. 1.6.    You can translate SCCS to RCS, but not the other way.  
  402.   
  403. 1.7.    RCS and SCCS use different keywords that are expanded in the text.
  404.     For SCCS the keyword "%R%" is replaced with the revision
  405.     number if the file is checked out for reading.    In RCS, the
  406.     keyword $Revision$ has the revision number added to it when
  407.     the file is checked out (either locked or not).     The RCS
  408.     keywords are easier to remember.
  409.   
  410. 1.8.    RCS has symbolic names: you can mark all the source files
  411.     associated with an application version with `rcs -n', and then
  412.     easily retrieve them later.
  413.   
  414. 1.9.    SCCS doesn't have an equivalent of rcsmerge (merging changes between
  415.     version a and b into version c).
  416.   
  417. 1.10.    Since RCS stores the latest version in full, it is much faster
  418.     in retrieving the latest version.  After RCS version 5.6, it
  419.     is also faster than SCCS in retrieving older versions.
  420.   
  421. 1.11.    SCCS is supported by AT&T.  RCS isn't.
  422.   
  423. 1.12.    SCCS has more options for determining when a specific line of code
  424.     was added to a system.
  425.   
  426. 1.13.    Command comparison     
  427.   
  428.     Note that when providing a filename to SCCS, one must specify
  429.     the SCCS file, and as the SCCS files are normally in a SCCS
  430.     subdirectory, one must type SCCS/s.file.  In contrast, in RCS,
  431.     one only has to specify the working file name, and the RCS
  432.     filename, in the current directory or in a RCS directory (as
  433.     is common), is automatically generated.
  434.   
  435.   Here are the commands:
  436.   
  437.   SCCS                RCS        Explanation
  438.   admin -i -nfile s.file    ci file        Checks in the file for the
  439.                         first time, creating
  440.                         the revision history file.
  441.   get s.file            co file        Check out a file for reading.
  442.   get -e s.file            co -l file    Check out a file for
  443.                         modification.
  444.   delta s.file            ci file        Check in a file previously
  445.                         locked.
  446.   prs s.file            rlog file    Print a history of the file.
  447.   sccsdiff -rx -ry s.file    rcsdiff -rx -ry file    Compare two revisions.
  448.   sccs diffs s.file        rcsdiff file    Compare current with last
  449.                         revision.
  450.   ???                rcs -l file    Lock the latest revision.
  451.   ???                rcs -u file    Unlock the latest revision.
  452.                         Possible to break another's 
  453.                         lock, but mail is sent to the
  454.                         other person explaining why.
  455.   
  456. 2.    RCS vs ADC
  457.   
  458. I've had the the chance to examine ADC and figure out how we might
  459. make some use of it.  The biggest concern I have to date on ADC is the
  460. fact that the company owns the source and contracts out to consultants
  461. to help provide support for the tool (rather than support it
  462. directly).  It appears that the expectation is for you to hire a
  463. consultant who spends a few months setting the tools up with you and
  464. then works with you to make sure that your needs are being met.     RCS
  465. and SCCS at least allow the option for you to examine the source
  466. code...
  467.  
  468. It uses the concept of change sets.  All changes made to a group of
  469. files is filed as one change set (as you are working, you have an
  470. active changeset).  You have the choice of keeping a set of change
  471. sets to make a release.     This makes it easy to support bug fixes for
  472. particular requests because you can decide to keep or not a set of
  473. changes to make a release.
  474.   
  475. 3.    CVS
  476.  
  477.                   CVS II:
  478.             Parallelizing Software Development
  479.  
  480.                   Brian Berliner
  481.  
  482.                    Prisma, Inc.
  483.               5465 Mark Dabling Blvd.
  484.             Colorado Springs, CO  80918
  485.                 berliner@prisma.com
  486.  
  487.                  ABSTRACT
  488.  
  489.        The program described in this paper fills a need in the
  490.       UNIX community for a freely available tool to manage software
  491.       revision and release control in a multi-developer, multi-
  492.       directory, multi-group environment.  This tool also addresses
  493.       the increasing need for tracking third-party vendor source dis-
  494.       tributions while trying to maintain local modifications to ear-
  495.       lier releases.
  496.   
  497. 3.1.    Background
  498.  
  499. In large software development projects, it is usually necessary for
  500. more than one software developer to be modifying (usually different)
  501. modules of the code at the same time.  Some of these code
  502. modifications are done in an experimental sense, at least until the
  503. code functions correctly, and some testing of the entire program is
  504. usually necessary.  Then, the modifications are returned to a master
  505. source repository so that others in the project can enjoy the new
  506. bugfix or functionality.  In order to manage such a project, some sort
  507. of revision control system is necessary.
  508.  
  509. Specifically, UNIX[1] kernel development is an excellent example of
  510. the problems that an adequate revision control system must address.
  511. The SunOS[2] kernel is composed of over a thousand files spread across
  512. a hierarchy of dozens of directories.[3] Pieces of the kernel must be
  513. edited by many software developers within an organization.  While
  514. undesirable in theory, it is not uncommon to have two or more people
  515. making modifications to the same file within the kernel sources in
  516. order to facilitate a desired change.  Existing revision control
  517. systems like RCS [Tichy] or SCCS [Bell] serialize file modifications
  518. by allowing only one developer to have a writable copy of a particular
  519. file at any one point in time.    That developer is said to have
  520. "locked" the file for his exclusive use, and no other developer is
  521. allowed to check out a writable copy of the file until the locking
  522. developer has finished impeding others' productivity.  Development
  523. pressures of productivity and deadlines often force organizations to
  524. require that multiple developers be able to simultaneously edit copies
  525. of the same revision controlled file.
  526.  
  527. The necessity for multiple developers to modify the same file con-
  528. currently questions the value of serialization-based policies in
  529. traditional revision control.  This paper discusses the approach that
  530. Prisma took in adapting a standard revision control system, RCS, along
  531. with an existing public-domain collection of shell scripts that sits
  532. atop RCS and provides the basic conflict-resolution algorithms.     The
  533. resulting program, cvs, addresses not only the issue of
  534. conflict-resolution in a multideveloper open-editing environment, but
  535. also the issues of software release control and vendor source support
  536. and integration.
  537.   
  538. 3.2.    The CVS Program
  539.  
  540. cvs (Concurrent Versions System) is a front end to the RCS revision
  541. control system which extends the notion of revision control from a
  542. collection of files in a single directory to a hierarchical collection
  543. of directories each containing revision controlled files.  Directories
  544. and files in the cvs system can be combined together in many ways to
  545. form a software release.  cvs provides the functions necessary to
  546. manage these software releases and to control the concurrent editing
  547. of source files among multiple software developers.
  548.  
  549. The six major features of cvs are listed below, and will be described
  550. in more detail in the following sections:
  551.   
  552. 3.2.1.    Concurrent access and conflict-resolution algorithms to guarantee
  553.     that source changes are not "lost."
  554.   
  555. 3.2.2.    Support for tracking third-party vendor source distributions
  556.     while maintaining the local modifications made to those
  557.     sources.
  558.   
  559. 3.2.3.    A flexible module database that provides a symbolic mapping of
  560.     names to components of a larger software distribution.    This
  561.     symbolic mapping provides for location independence within
  562.     the software release and, for example, allows one to check out
  563.     a copy of the "diff" program without ever knowing that the
  564.     sources to "diff" actually reside in the "bin/diff" directory.
  565.   
  566. 3.2.4.    Configurable logging support allows all "committed" source file
  567.     changes to be logged using an arbitrary program to save the
  568.     log messages in a file, notesfile, or news database.
  569.   
  570. 3.2.5.    A software release can be symbolically tagged and checked out at
  571.     any time based on that tag.  An exact copy of a previous
  572.     software release can be checked out at any time, regardless of
  573.     whether files or directories have been added/removed from the
  574.     "current" software release.  As well, a "date" can be used to
  575.     check out the exact version of the software release as of the
  576.     specified date.
  577.   
  578. 3.2.6.    A "patch" format file [Wall] can be produced between two software
  579.     releases, even if the releases span multiple directories.
  580.  
  581. The sources maintained by cvs are kept within a single directory
  582. hierarchy known as the "source repository." This "source repository"
  583. holds the actual RCS ",v" files directly, as well as a special
  584. per-repository directory (CVSROOT.adm) which contains a small number
  585. of administrative files that describe the repository and how it can be
  586. accessed.
  587.   
  588. 3.3.    Software Conflict Resolution[4]
  589.  
  590. cvs allows several software developers to edit personal copies of a
  591. revision controlled file concurrently.    The revision number of each
  592. checked out file is maintained independently for each user, and cvs
  593. forces the checked out file to be current with the "head" revision
  594. before it can be "committed" as a permanent change.  A checked out
  595. file is brought up-to-date with the "head" revision using the "update"
  596. command of cvs.     This command compares the "head" revision number with
  597. that of the user's file and performs an RCS merge operation if they
  598. are not the same.  The result of the merge is a file that contains the
  599. user's modifications and those modifications that were "committed"
  600. after the user checked out his version of the file (as well as a
  601. backup copy of the user's original file).  cvs points out any
  602. conflicts during the merge.  It is the user's responsibility to
  603. resolve these conflicts and to "commit" his/her changes when ready.
  604.  
  605. Although the cvs conflict-resolution algorithm was defined in 1986, it
  606. is remarkably similar to the "Copy-Modify-Merge" scenario included
  607. with NSE[5] and described in [Honda] and [Courington].    The following
  608. explana- tion from [Honda] also applies to cvs:
  609.  
  610.    Simply stated, a developer copies an object without locking it,
  611.    modifies the copy, and then merges the modified copy with the
  612.    original.  This paradigm allows developers to work in isolation
  613.    from one another since changes are made to copies of objects.
  614.    Because locks are not used, development is not serialized and can
  615.    proceed in parallel.     Developers, however, must merge objects
  616.    after the changes have been made.  In particular, a developer
  617.    must resolve conflicts when the same object has been modified by
  618.    someone else.
  619.  
  620. In practice, Prisma has found that conflicts that occur when the same
  621. object has been modified by someone else are quite rare.  When they do
  622. happen, the changes made by the other developer are usually easily
  623. resolved.  This practical use has shown that the "Copy-Modify-Merge"
  624. paradigm is a correct and useful one.
  625.   
  626. 3.4.    Tracking Third-Party Source Distributions
  627.  
  628. Currently, a large amount of software is based on source distributions
  629. from a third-party distributor.     It is often the case that local
  630. modifications are to be made to this distribution, and that the
  631. vendor's future releases should be tracked.  Rolling your local
  632. modifications forward into the new vendor release is a time-consuming
  633. task, but cvs can ease this burden somewhat.  The checkin program of
  634. cvs initially sets up a source repository by integrating the source
  635. modules directly from the vendor's release, preserving the directory
  636. hierarchy of the vendor's distribution.     The branch support of RCS is
  637. used to build this vendor release as a branch of the main RCS trunk.
  638. Once this is done, developers can check out files and make local
  639. changes to the vendor's source distribution.  These local changes form
  640. a new branch to the tree which is then used as the source for future
  641. check outs.
  642.  
  643. When a new version of the vendor's source distribution arrives, the
  644. checkin program adds the new and changed vendor's files to the already
  645. existing source repository.  For files that have not been changed
  646. locally, the new file from the vendor becomes the current "head"
  647. revision.  For files that have been modified locally, checkin warns
  648. that the file must be merged with the new vendor release.  The cvs
  649. "join" command is a useful tool that aids this process by performing
  650. the necessary RCS merge, as is done above when performing an "update."
  651.  
  652. There is also limited support for "dual" derivations for source files.
  653. This example tracks the SunOS distribution but includes major changes
  654. from Berkeley.    These BSD files are saved directly in the RCS file off
  655. a new branch.
  656.   
  657. 3.5.    Location Independent Module Database
  658.  
  659. cvs contains support for a simple, yet powerful, "module" database.
  660. For reasons of efficiency, this database is stored in ndbm(3) format.
  661. The module database is used to apply names to collections of
  662. directories and files as a matter of convenience for checking out
  663. pieces of a large software distribution.  The database records the
  664. physical location of the sources as a form of information hiding,
  665. allowing one to check out whole directory hierarchies or individual
  666. files without regard for their actual location within the global
  667. source distribution.
  668.  
  669. Consider the following small sample of a module database, which must
  670. be tailored manually to each specific source repository environment:
  671.  
  672.     #key      [-option argument] directory [files...]
  673.     diff      bin/diff
  674.     libc      lib/libc
  675.     sys      -o sys/tools/make_links sys
  676.     modules      -i mkmodules CVSROOT.adm modules
  677.     kernel      -a sys lang/adb
  678.     ps      bin Makefile ps.c
  679.  
  680. The "diff" and "libc" modules refer to whole directory hierarchies
  681. that are extracted on check out.  The "sys" module extracts the "sys"
  682. hierarchy, and runs the "make_links" program at the end of the check
  683. out process (the -o option specifies a program to run on checkout).
  684. The "modules" module allows one to edit the module database file and
  685. runs the "mkmodules" program on checkin to regenerate the ndbm
  686. database that cvs uses.     The "kernel" module is an alias (as the -a
  687. option specifies) which causes the remaining arguments after the -a to
  688. be interpreted exactly as if they had been specified on the command
  689. line.  This is useful for objects that require shared pieces of code
  690. from far away places to be compiled (as is the case with the kernel
  691. debugger, kadb, which shares code with the standard adb debugger).
  692. The "ps" module shows that the source for "ps" lives in the "bin"
  693. directory, but only Makefile and ps.c are required to build the
  694. object.
  695.  
  696. The module database at Prisma is now populated for the entire UNIX
  697. distribution and thereby allows us to issue the following convenient
  698. com- mands to check out components of the UNIX distribution without
  699. regard for their actual location within the master source repository:
  700.   
  701. 3.6.    How to get CVS
  702.  
  703. It's available via anonymous FTP from prep.ai.mit.edu in
  704. pub/gnu/cvs-1.2.tar.Z.
  705.   
  706. 4.    CMS scripts
  707.  
  708. If one places the RCS keyword $Id$ into static char arrays in C code,
  709. they end up in the compiled binary.
  710.  
  711. After I do my checkins and remake the binary, I run a script called
  712. "snapshot" which gives me a nicely-formatted list of the RCS headers.
  713. This makes it easy to check out an entire group of files which are at
  714. different revision levels.
  715.  
  716. Here is the output of the command "snapshot /usr/bin/cite".
  717.   
  718. =====================================================================
  719. cite
  720.           cite.c   1.3         1991/11/29     16:59:04  vogel     
  721.         getopt.c   1.3         1991/11/29     16:59:47  vogel     
  722.          ismailhdr.c   1.2         1991/12/13     20:34:41  vogel     
  723.           scanmail.c   1.2         1991/11/29     17:02:01  vogel     
  724.   
  725. A simple awk script can create a series of "co" commands to get
  726. back these versions of each file.  Here is the code for snapshot:
  727.   
  728. #!/bin/sh
  729. #
  730. #     $Header: snapshot,v 1.2 90/04/12 16:46:01 vogel Exp $
  731. #
  732. #     snapshot:          examines one or more files, and prints RCS header
  733. #              information about each one.  Used to keep track of
  734. #              all of the relevant versions of C functions which
  735. #              make up a working program.
  736. #
  737. #          Usage:  snapshot file [file ...]
  738. #
  739. #     Author: Karl Vogel <vogel@c-17igp.wpafb.af.mil>  
  740. #
  741.  
  742. PATH=/bin:/usr/ucb:/usr/bin:/usr/local:/d/cdc/vogel/local
  743. export PATH
  744.  
  745. BANNER='====================================================================='
  746.  
  747. case "$#"
  748. in
  749.     0)    echo "usage:  snapshot file [file ...]"          >&      2
  750.         exit 1
  751.         ;;
  752.  
  753.     *)    for NEXT in $*
  754.         do
  755.             echo $BANNER
  756.             basename $NEXT
  757.             rcsh $NEXT
  758.         done
  759. esac
  760.  
  761. exit 0
  762.  
  763. #!/bin/sh
  764. #
  765. #     $Id: rcsh,v 1.5 1991/07/22 18:57:12 vogel Exp $
  766. #
  767. #     rcsh:          takes RCS header strings from either stdin or
  768. #              argument files, reformats them, and prints them
  769. #              nicely.
  770. #
  771. #          Usage:  rcsh [files]
  772. #
  773. #     Author: Karl Vogel <vogel@c-17igp.wpafb.af.mil>  
  774.  
  775. PATH=/bin:/usr/bin:/usr/new
  776. export PATH
  777.  
  778. SED='/\$Id:/s/,v//p
  779. /\$Header:/s/,v//p
  780. '
  781.  
  782. AWK='{
  783.     sub = substr ($2, 1);
  784.  
  785.     while ((i = index (sub, "/")) > 0)
  786.         sub = substr (sub, i + 1);
  787.  
  788.     printf "%30s   %-10s%-12s%-10s%-10s\n", sub, $3, $4, $5, $6
  789. }'
  790.  
  791. case "$#"
  792. in
  793.     0)    sed -n "$SED" | sort | uniq | awk "$AWK" ;;
  794.     *)    ident $* | sed -n "$SED" | sort | uniq | awk "$AWK" ;;
  795. esac
  796.  
  797. exit 0
  798.   
  799. 5.    Software Configuration Management literature
  800.  
  801. General books:
  802.  
  803. _Software_Configuration_Management_:_Coordination_for_Team_Productivity_,
  804.   by Wayne A. Babich, Addison-Wesley, 1986, ISBN 0-201-10161-0.
  805.  
  806. _The_Program_Development_Process_, by J.D. Aron, Addison-Wesley, 1983,
  807.   ISBN 0-201-14451-4.
  808.  
  809. _Software_Configuration_Management_:_An_Investment_in_Product_Integrity_,
  810.   by E. Bersoff, V. Henderson, and S. Siegel, Prentice-Hall, 1980,
  811.   ISBN 0-13-821769-6.
  812.  
  813. _Proceedings of the International Workshop on Software Version and
  814.   Configuration Control_, edited by Jurgen F.H. Winkler, German Chapter
  815.   of the ACM, Grassau, FRG, January 27-29, 1988.  ISBN 3-519-02671-6
  816.  
  817. _Proceedings of the 2nd International Workshop on Software Configuration
  818.   Management_, Princeton, New Jersey, Oct 24, 1989.
  819.  
  820. _Workshop proceedings on Software Management_, USENIX, New Orleans,
  821.   Louisiana, April 3-4, 1989
  822.  
  823. Papers:
  824.  
  825. "RCS - A System for Version Control", Walter Tichy, _Software-Practice_and_
  826.   Experience_, Vol 15(7), p637-654, (July 1985).
  827.  
  828. "Build-A Software Construction Tool", V. Erickson and J. Pellegrin,
  829.   _AT&T_Bell_Lab_Technical_Journal_, Vol 63(6), p1049-1059, (July-August 
  830.   1984).
  831.  
  832. "Design, Implementation, and Evaluation of a Revision Control System",
  833.   Walter Tichy, _IEEE_, Vol ?(?), p 58-67, (??? 1982).
  834.  
  835. "Project Hygiene", Vic Stenning, _USENIX_Workshop_Proceedings_on_Software_
  836.   _Management_, p1-9, (April 3-4, 1989).
  837.  
  838. "Software Manaagement Using a CASE Environment", M. Honda and T. Miller,
  839.   _USENIX_Workshop_Proceedings_on_Software_Management_, p11-16,
  840.   (April 3-4, 1989).
  841.  
  842. "Boxes, Links, and Parallel Trees: Elements of a Configuration Management
  843.   System", Andy Glew, _USENIX_Workshop_Proceedings_on_Software_Management_, 
  844.   p17-28(April 3-4, 1989).
  845.  
  846. "Controlling Software for Multiple Projects", Dale Miller, _USENIX_Workshop_
  847.   _Proceedings_on_Software_Management_, p39-50, (April 3-4, 1989).
  848.  
  849. "CCSLAND", Nathaniel Bronson III, _USENIX_Workshop_Proceedings_on_Software_
  850.   _Management_, p87-94, (April 3-4, 1989).
  851.  
  852. "The Release Engineering of 4.3BSD", M. McKusick, M. Karels, and K. Bostic,
  853.   _USENIX_Workshop_Proceedings_on_Software_Management_, p95-100,
  854.   (April 3-4, 1989).
  855.  
  856. "Rtools: Tools for Software Management in a Distributed Computing
  857.   Environment", H harrison, s. Schaefer, T. Yoo, _USENIX_Conference_
  858.   _Proceedings_, p85-106, (June 20-24, 1988).
  859.  
  860. "A Schema for Configuration Management", Terrence Miller, 
  861.   _Proceedings_of_the_2nd_Int'l_Workshop_on_Software_Configuration_Management,
  862.   October 24-27 1989, Princeton. Published as ACM SIGSOFT Software Engineering
  863.   Notes, Volume 17(8) pp 26-29, November 1989.
  864.  
  865. _Generic_Software_Configuration_Management:_Theory_and_Design_, by
  866.   Douglas Wiebe, University of Washington, Technical Report 90-07-03;
  867.   published 1990.
  868.  
  869. "Software Configuration Management of Computer-Aided Design Tools",
  870.   by Peter Nicklin, Hewlett Packard Report DTC-89-01, December 22, 1989.
  871.  
  872. "Version Control in Families of Large Programs", Juergen Winkler,
  873.   _Proceedings_of_the_9th_International_Conference_on_Software_Engineering,
  874.   Monterey, CA, March 30-April 2, 1987, pp150-161
  875.  
  876. ------------------------------------------------------------------------
  877. From: kevin@asw.ds.boeing.com (Kevin Hintergardt)
  878.  
  879. We're currently using an in-house SCM program that combines Ingres ESQL with
  880. RCS. RCS was chosen because the reverse deltas are more efficient in the
  881. common cases and source code was freely available so we could link it into
  882. a single executable instead of shelling out SCCS commands. RCS also had
  883. some neat interrupts handling code we shanghied (sp) to solve interrupt
  884. shortfalls with Ingres FRS (forms).
  885.  
  886. In case your real new to SC, the RCS reverse deltas keep the MOST RECENT
  887. copy intact and stores deltas (really sed edit commands) to recreate old
  888. versions if needed. SCCS maintains the ORIGINAL intact and must process
  889. all forward deltas to get the most recent version. Since programmers
  890. usually want the most recent version. Reverse deltas are more efficient.
  891. RCS still uses forward deltas for branch versions and it always branches
  892. from the most recent root version.
  893.  
  894. I've been on programs that use SCCS raw, SCCS with a front-end, self-
  895. generating csh scripts (yuk) and this RCS/Ingres approach. The latter
  896. is the only approach where I haven't heard programmer complaining about
  897. slow checkin/checkout, complexity, or lack of features. It does have
  898. about 20,000 line of C to integrate together but if we need an extra
  899. validation check or more control over the 200+ programmers, we can do it.
  900. Not that I'm bias or anything. For a project our size, the dedicated
  901. tool builder (me) was justifiable.  I dont know what your situation is.
  902.  
  903.             kevin@asw.ds.boeing.com
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944. -- 
  945. /------------------------------------------------------------------\
  946. |     David B. Andersen             (dbander@netcom.com)           |
  947. \------------------------------------------------------------------/
  948.