Setting up Eclipse to use CVS

The easiest way to do this in the CS domain is to use the extssh method in Eclipse, and to share an already existing project. The steps are:

  1. Have an Eclipse project with at least one file in it that you want to share with other people in your team.
  2. Set up a CVS repository on a Linux machine. CVS is runnable on any Linux host in the domain. First create a repository root at the top level of your home space:

    %mkdir cvs.
  3. Next, initialize the repository:

    %cvs -d ~/cvs init

    This sets up the correct directory structure so that the repository can receive projects.
  4. To allow access by members of your group, you will need to set the permissions so that anyone can read and write the files. Use chmod -R 777 cvs to do this. Since this is obviously a security hole, probably using a repository name that is hard to guess would be better.
  5. In Eclipse, right-click on the project in the Package Explorer, and choose Team/Share Project... A dialog will appear. For Host, type in any Linux host. e.g. cobra.cs.nmsu.edu. For Repository Path, type in the absolute path to your new repository. e.g. /home/server1/name/cvs. For Authentication, type in your regular CS domain Linux name and password. For connection type, choose extssh. (We do not have a pserver running in the CS domain). Click Next and Next again (to use the project name as the CVS module name).
  6. A dialog box will appear with the project in the left pane. Click Finish. It will ask you if you want to commit your changes (to make the initial version) Click Yes, and Yes again.
  7. A comment dialog will appear. You can type in something like "initial version", and click OK. All the files in the project will be copied to the repository.
  8. The files will be annotated in the Package Explorer with the version number in 1.1 style. When you make a change to a file, it will be annotated in the Package Explorer with a '>'. This means there are uncommitted changes. Right click on the file and choose Team/Commit... Again you can type in a commit and the new version will be saved and the version number incremented.
  9. Other users can check out the whole project by creating a link to the repository through the Team Synchronization perspective. In the Synchonization pane, click on the Synchronize icon. A dialog with synchronization types will appear. Select CVS (the only one) and click Next. The CVS repository dialog will appear. Type in the details as in step 4, select extssh as the method, and click Next. A dialog will appear askign for the module name. Either type in the same name as the project (step 4) or choose Use an existing module and then the module name will appear. Choose the module name, and click Finish. The whole project will be checked out into your workspace.
  10. After every user has the project, they can use Team/Commit to put changes into the repository, or Team/Synchronize with repository to get changes that other people have made.