back to tutorial index
  back to homepage


Setting up your computer for CVS access

By Michael Hearn


This tutorial will show you how to set up your machine to access code in a SourceForge projects CVS repository. Because the process for this is long and complex I wrote SFSetup to do it for you and so this tutorial will assume you will be using this. If you are using Windows 2000 you may need to set up the environment variables manually using the special GUI, more info on this later.

To set up your machine for CVS access you first need to download and install WinCVS from www.wincvs.org, make sure you go for the latest version and ignore the warnings about beta code - it's fine trust me. WinCVS 1.1x has more features than the 1.0x versions, so go for it. Install it, then move on.

Next, download the SFSetup program from the homepage, and run it. Make sure you select all 3 steps and proceed. You will be asked for various details, most are self-explanatory. You must remember the directory you give it for where to store your CVS controlled code. When you've given the program all the info press OK and hopefully the program will go do its stuff. If you run Windows 2000 however, you may hit problems because it restricts access to autoexec.bat, which is where the program sets the environment variables. If this happens (a) set the variables manually and (b) please help me remove this problem!

To set the variables manually you need to do the equivalent of the following commands

SET PATH=%PATH%; sshinstalldir
SET HOME=sshinstalldir

where obviously you replace sshinstalldir with the path of where you unpacked SSH to. This will ensure that SSH can be found no matter where you are in the system and is needed for WinCVS to operate.

Basically, the program does the following things:

Now you must test SSH to make sure everything went ok. Make sure you are connected to the net and at a command prompt type this:

ssh -l username shell.sourceforge.net

Obviously replace "username" with your SourceForge username. This command tells SSH to log into the  SourceForge UNIX servers, and you should a password prompt. Give it your SourceForge password and hopefully if all goes well you should see lines of greeting text scroll by. If it does type exit and press enter to be returned to the DOS command prompt. If things don't go well at this stage, try these things:

If SSH is OK, the next thing to do is run WinCVS.

IMPORTANT NOTE!!!! : You do NOT need to select Login or Logout, this is automatic. You will be prompted for you password each time you run a CVS command and if you try and use the Login or Logout commands you will just get an error message.

You should find the browser (the pane on the left hand side of the screen pointing to the empty directory created by SFSetup. This is good. If it isn't make sure it points to that directory using the menu commands. Now do the following to checkout your code module (you need to know the name of this, your project admin or whoever set up the repository will tell you this. I hate it when the MS docs say that. If you are the admin then you need to read the Setting up for a new project tutorial first :)

It should start, although you will probably need to enter your SourceForge password when the SSH box appears. The output should look something like this:

U Myfile.pas
U Picture.bmp
....

The code is now in your local directory ready to be worked on. Happy coding! -mike