CVS Server Access to your Project
You should use a repository for all your CSE308 documents, not just your code. You can use the Computer Science CVS server in which a directory
has been set up for each project group. To access the CVS server, you will need to use a CVS client, either from the CS Labs or from your computer.
In either case, you will typically check out code or documents, revise the files and then check the files back into the CVS server. You will
use CVS to submit your project assignments since the TAs will also have access to your project and can easily check out your code and documents.
There are two CVS clients available to you: NetBeans 5.0 (or above) and Tortoise CVS. You can use NetBeans CVS to import and check out Java
code of your project and Tortoise CVS to import and check out non-Java files. These files will be contained in your project repository, which
will also be available to the TAs for review and grading of project deliverables.
Each project group has a CVS repository in the server. Your repository can be accessed through your Group ID, which has been sent to you
by e-mail from your TA. Once you connect using your group ID, your Trans Lab's user ID and password can be used to access your group's repository.
Your group repository has been set up in advance so that all groups use the same repository directory structure. This makes it easy for TAs
to locate the files to be graded
References
This page describes how to use CVS in the labs for CSE308 (and on your own computer). You can find more detailed information on CVS in an
excellent on-line tutorial. Material on the use of TortoiseCVS can be found in a TortoiseCVS
tutorial, prepared by the University of Alaska.
TortoiseCVS
TortoiseCVS is used to check-in and check-out non-Java files to the CVS server. It provides a GUI interface to the CVS server, and works with
Windows Explorer. You can either use the TortoiseCVS client in the Trans Lab or install the client code on your computer. The client software
is available at the TortoiseCVS download site.
-
- Figure 1 - Check out repository files
The Computer Science CVS server only accepts files with the following extensions, *.cab, *.class, *.doc, *.dll, *.exe, *.exp, *.gif, *.gz,
*.jar, *.jpg, *.jpeg, *.lib, *.msi, *.mso, *.pfw, *.png, *.ppt, *.sit, *.tar, *.tlb, *.vsd, *.xls, *.wmz, *.zip. Otherwise, you need to zip
your file and import it into the server repository.
How to Use Tortoise CVS
Whenever you access your CVS group repository, you first connect to the CVS server by following the steps described below:
- From Windows Explorer, position to the folder that will hold the icons representing the CVS files. From the File menu, select "CVS
Check out …" and fill in the following fields in the dialog box that appears (Figure 1):
- Protocol: Password server ( : pserver :)
- Server: cvs.translab.cs.sunysb.edu
- Port: 22
- Repository folder: /cse308/ Your- Group-ID
- User name: Your-Translab-Username
- Module : . (dot means user root)
- Custom folder name: folder name in Desktop to save files from the server repository
- Click OK and input your Trans Lab password into the prompt window. At this point, CVS will check out a CVSROOT folder from the remote repository.
An icon, representing the folder, will show in your currently active Windows Explorer window (Figure 2)
- The directory will show sub-directories for CVS, CVSROOT, and one for each of the major deliverables. You should select a folder into which
you plan to submit your work. For example, you can open the March19_SeqDiagram folder to add your Sequence Diagrams. In the folder you will
see a CVS folder and a dummy file. Copy your Sequence Diagrams into the folder and close it.
-
- Figure 2 - Explorer Window
- Right click the folder and select "CVS Add contents ...". Right click the folder again and select "CVS Commit...".
This last action will add the folder to the server repository.
- Now your assignment is ready to be graded. You can consult with the TortoiseCVS User's Guide (available from the TortoiseCVS Help menu)
for more options.
NetBeans 5.0 CVS Access
Starting with Version 5.0, NetBeans provides extensive support for CVS. NetBeans 5.0 is installed in all the CSE308 Labs, and can also be
downloaded (free) from the NetBeans Web site.
Set up a repository
To begin to share your Grinch code among your team (and with the TAs), you will first need to check in your current code base. The steps
detailed below describe how to check-in and check-out your project.
- Right-click on your project in the project pane of NetBeans (upper left part of your NetBeans window), and select CVS ->
"Import into Repository" from the drop-down. Alternatively, you can click CVS on the top menu bar and select "Import into
Repository" from the drop-down menu.
- NetBeans will open a dialog box entitled Import Project Options (Figure 3). In the dialog box, set the "CVS Root" field to connect
to the server. The entry in this field should be in the form:
:pserver :< translab userid >@cs.translab.cs.sunysb.edu:22/cse308/<your groupid>
The password is your Trans Lab password.
Alternatively, you can click the "Edit" button, and type in your log in information (User: your Trans Lab ID; Host: cvs.translab.cs.sunysb.edu;
Port: 22; Repository Path: /cse308/your group ID; Password: your Trans Lab password)
- After clicking "Next" (see Figure 4.a), you select the local directory of your project, which maps to the server repository for
this check-in. When you do that, you can enter comments and descriptions concerning your submission. Specify the folder to store your
project code in the server repository. The folder should correspond to the predefined directory folders and are named according to the major
project deliverables. Click "Finish" to
continue (see Figure 4.b)
-
- Figure 3 - NetBeans CVS Project Import
Check-out Project Code
- To check-out your project code, select CVS -> Check Out, which will save a copy of your group's project code in your local disk. You
also need to set your CVS Root variable to be in form of,
:pserver :< translab userid >@cs.translab.cs.sunysb.edu:22/cse308/<your groupid >, password is your < translab password> (Figure
4).
- Browse your local folder/directory to save the copy of your project code and CVS files from the server repository. Press "Finish" to
complete the check out process. Open the project from this directory.
Update the local repository
- If you have made some changes to your local copy of files, a small
blue disk icon will appear on the file and directories on which you made changes.
- When you are ready to make your changes available to other group members, you should commit your changes to the CVS repository. When you
do that, the blue disk icon will then disappear. That means both your local and remote repository have been updated and committed.
- Note that you cannot commit changes unless your local files are up-to-date. That is, you have been editing the most recent copy.
-
- Figure 4 - Set up CVS Root variable to connect to the server
Important Notice
If you check out the repository to your local disk and give a new name to local CVS working directory, we suggest that you remove the
old working directory from your current working directory.
If you change the name of a file or directory in your new directory, you cannot commit the code in the old directory. In general, it is best
not to rename files since this will lose all of the editing history for that file. Also, do not add directories to the repository temporarily
- you can never get rid of them. This is a drawback of CVS.