Calvin seal CS 108: Introduction to Computing
Spring 2006

Using CVS to Access Code Presented in Lecture

The code I write or demonstrate in class is available via CVS. Some of you are using CVS to maintain your own code on different machines. CVS is usually used so that multiple people (on multiple machines) can access the same code at the same time.

You will have read only access to my CVS repository. That is, you can change the code as much as you want, but you will not be allowed to check it back in. Since my changes during the semester may conflict with yours, copy the code to a completely different project before you change it.

Creating a Connection to the Repository in Eclipse

You have to get Eclipse to recognize my CVS repository. Here are the steps:

  1. Start up Eclipse.
  2. In Eclipse, select the Window -> Show View -> Other... menu item.
  3. In the new dialog window, select the CVS -> CVS Repository option and hit the OK button.
  4. Now you should see the CVS Repository view in the bottom portion of the Eclipse workspace.
  5. Right click in the CVS Repository view, and select the New -> Repository Location menu item.
  6. In the new dialog that pops up, enter this information:
    • Host: udu.calvin.edu
    • Repository path: /home/jdfrens/cs108cvs
    • User: your Calvin username
    • Password: your email password
    • Connection type: extssh
    • Use Default Port selected
    • Validate Connection on Finish checked
    • Do not check the Save password box.
    Make sure you're connected to the Internet when you do this. In the GLUW-lab, you get this for free; at home, you may have to dial-up first.
  7. Now hit the Finish button.
  8. You might be asked a series of questions about not missing a key for udu and questions if it's all right for Eclipse to create various directories. Answer "yes" to these questions; it's creating the security you want.
  9. If all is fine, then you'll see the new repository in the CVS Repository view. If there's a problem, Eclipse will complain; do not keep the repository location, and try again.

Now to check the project out.

  1. In the CVS Repository view, expand the cs108cvs repository.
  2. Expand the HEAD entry.
  3. Right click on the CS 108 Examples folder.
  4. Select Check out.

Now you'll find the project in your Package Explorer. Enjoy!

Updating the Examples

Throughout the semester I will make changes to the code, on my own and in class. To get these changers, you have to synchronize and update.

Keep in mind that you cannot commit any changes that you make. My updates may conflict with your changes, so I suggest that you copy my code into a different project before you make changes to it.

To synchronize and update:

  1. Make sure you're connected to the Internet.
  2. In Eclipse, select and right click on the CS 108 Examples project
  3. Select the Team -> Synchronize with Repository menu item.
  4. You may be prompted for your password; type it in.
  5. You may also be asked if you want to use the "Team Synchronizing perspective"; it's useful, so say "Ok".
  6. If there aren't any changes at all,
    1. Eclipse will notify you of this in a dialog box.
    2. Hit "Ok".
    3. Switch back to the Java perspective.
  7. If there are changes,
    1. Above the tree of changes on the left, hit the "Update" button.
    2. Eclipse will do some work.
    3. If everything updates fine, the tree on the left should indicate that there are no differences between your versions and the repository.
    4. Switch back to the Java perspective, and continue your work.