Summary: This lab provides practice with CVS (a Concurrent Versions System) within the context of the class project.
As the class progresses from the specification and design stages of the Scheduler project to coding, coordination of group efforts becomes particularly important. Specifically, we must work within a system that allows the following:
CVS is a version control system designed specifically to address the needs of groups developing software, documentation, and other materials. While some details of CVS may be specific to this version control system, many of the basic ideas apply quite generally. Thus, as students move from this project in this course to other projects either at Grinnell or elsewhere, students are likely to find similar ideas employed in whatever software development system they encounter. Details may differ, but many control systems will have a similar purpose, and developers will finding programming in such environments share common elements.
Information of CVS (a Concurrent Version System) may be found on-line in three ways:
info
cvs in a terminal window. Basic movement through this
documentation proceeds as follows:
Steps for this Lab:
info cvs in a terminal window.
Work with CVS requires some initialization and preparation. Thereafter, work follows a relatively simple pattern.
Setup for CVS:
On MathLAN, CVS runs on server cvs.cs.grinnell.edu. While one
could include directions to this server with each CVS interaction, work is
simplified by placing the a few lines in your file
.bash_profile, found in your home directory. The following
code is designed for the instructor (username walker).
# Use the CVS repository at cvs.cs.grinnell.edu.
CVSROOT=:pserver:walker@cvs.cs.grinnell.edu:/cvs
export CVSROOT
.bash_profile file, changing
walker to your own username.
.bash_profile, you will either need to log out
and back in again or you can run the command
source ~/.bash_profile
from the terminal window you will use in the following steps.
Access to the CVS is password protected. However, once you log in a first
time, your account places password information in file
.cvspass in your home directory. Since this information is
stored in clear text, you should not use your regular password. (For this
course, Mr. Stone will assign random passwords to each student. After a
first use, you are unlikely to need to remember this detail further.)
cvs login
You will be prompted for your password.
Normal Use of CVS
In working with CVS you will want to base your activity at a logical subdirectory. The following commentary assumes you have moved to that subdirectory in a terminal window.
After initial set up, normal use of CVS on MathLAN follows these several steps:
| Step Name | Command | Commentary |
|---|---|---|
| Get source files | cvs checkout scheduler
| Obtain new copies of files for the scheduler
project |
Edit yourFile.java
| cd scheduler
| Change directory to the scheduler project Start editing your file |
| Compile/Run Tests | jcompile, jrun | |
| Commit changes | cvs commit -m "log message about update"
yourFile.java
| Put the new version of yourFile.java back in
the repository |
| Clean up | cd ..
| Move up one directory check modifications are committed before removing files verify you want to remove committed files/directories |
For this course, each group will be responsible for working on its own class. While CVS allows any user to revise any file, such flexibility could undermine development of software if one group were to change the files of another group. Further, changes must be controlled, so that software found in the CVS repository represents stable, working code. This leads the following rules for this course:
Using these rules as a base, you should try checking out classes, changing the class of your group, committing the change, and cleaning up.
scheduler project.
http://www.cs.grinnell.edu/~walker/courses/223.sp02/lab-cvs.html
|
created March 31, 2002 last revised April 1, 2002 |
|
| For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. |