Source Code Control Procedure

You may customize this procedure as necessary for your team.

The tool our team uses for source code control is CVS. Below are brief directions for setting up your account and using CVS. Please read the CVS documentation. CVS is not intuitively obvious and you need to understand proper use or you can easily destroy your work. Also your CM person should be able to assist if you have difficulties. If you are new to UNIX, you'll need to learn how to manage your files and use a text editor such as pico or vi. Here is a beginning unix tutorial and a quick command reference to get you started.

Initial Setup Of Your Hornet Account And Source Download

  1. SSH to Hornet.csc.calpoly.edu
  2. Login to your Hornet account.
  3. Edit your configuration file
  4. Type:      vi .mycshrc

  5. Add the following line to the bottom of the file, right below the other SETENV line. Replace the letter "X" with the digit that corresponds to your team number.
  6. setenv CVSROOT ~team-jdX/cvsroot

  7. Save the file and exit vi
  8. Create a directory to hold source files
  9. Type:      mkdir 206Project

  10. Make the source code directory the current directory
  11. Type:      cd 206Project

  12. Check out the source code and download the files to your account,
  13. Type:      cvs co .    (yes, the last character IS a period)

To Update Source Code

  1. Login to your Hornet account.
  2. Navigate to your 206Project directory
  3. Update your files with the latest files from the repository
  4. Type:      cvs update

  5. Perform unit development work.
  6.  
  7. (Important) Before committing your changes, check once more to make sure you have the latest files
  8. Type:      cvs update
    If someone else has updated the files, you will have to "merge" your changes with theirs.  If you skip this step you will destroy someone else's work.

  9. Commit changes and upload them to the repository
  10. Type:      cvs commit

  11. You will be prompted to update the CVS log.  Be sure to enter an accurate and complete description of your changes.  The Change Manager will periodically check the CVS log and issue penalties for missing or inadequate log messages. 
  12. Your source code changes will now be merged in with the rest of the project's code.


Putting the version into the file

By placing the cvs tag $Id in the source file, when you commit the file, CVS will replace the tag with the file ID, which includes the version number. You can even put this in a String constant, and then display it.