Installing CVS on Windows
To access and work with the the CVS repositories you must install a CVS client on your Windows PC that can talk to the CVS servers. There are scores of CVS clients available, but at a minimum you must install the CVS command line client.
This document also includes the instructions needed to install two GUI Windows clients for CVS: WinCvs and TortoiseCVS.
Use the instructions in this document to install the CVS command-line client and (optionally) one or both of the GUI clients on a Windows PC.
Install CVS Command-Line Client
- First use the Installing CVS on Windows procedure to get SSH set up and to obtain user account(s) on one or more CVS servers.
- Create a directory called ‘cvs’ on a local harddrive. This directory will be referred to as ‘d:\cvs’ in the rest of these instructions.Note – When working with Windows/Unix tools, it is best to avoid directories and file names with embedded spaces. So don’t create the ‘cvs’ directory under your ‘Program Files’ folder.
- Copy the cvs code to your new d:\cvs directory.
- Now add the ‘d:\cvs’ directory to your SYSTEM PATH environment variable using the System option in the Windows Control Panel. Press the Apply button to make the new PATH setting take affect.
- Open a DOS command window and type the ‘set’ command. Make sure (a) that your PATH now includes ‘d:\cvs’; and (b) that the CVS_RSH variable is defined and points to the location of the ‘plink’ program.
- In your DOS command window, move to the directory where you want to put your CVS project directory. For example:cd /D d:\projects
- Now test your CVS setup by checking out the CVS project that you will be working on using the command:cvs -d :ext:@:/home/cvs checkoutfor example, if user ‘username’ wants to checkout project ‘project’ from the CVS server ServerName the correct command is:cvs -d :ext:username@ServerName:/home/cvs checkout project
- You should get a ‘cvs server: Updating ‘ message and CVS will put a working copy of the entire project in your current directory.
- You can then use any tools you want to make and test project changes. Use the ‘cvs add’ command to notify CVS of any new directories and files you add to the project. Use ‘cvs commit’ to submit your changes back into CVS once you have completed coding and testing.
- If you are new to CVS, a good tutorial can be found in chapter two of Karl Fogel’s book Open Source Development with CVS. Of particular use for beginners are the sections CVS Basics and A Day With CVS. A copy of this book and of the CVS manual itself (called the Cederquist), were put in your d:\cvs directory when you installed the CVS command-line client above.
Installing the WinCvs Client
- In order to work properly, WinCvs requires that you install both Python and Tcl on your PC first. You will also need a good text editor and a good diff program. Instructions for Python, Tcl and ExamDiff program installation are included in this section.
- Install Python:
- Download and run the latest Python EXE in this directory. This will launch a standard Windows installer. Follow the instructions to install Python on your PC.
- When installing Python, the only component required for WinCvs is the Python interpreter and libraries. You can exclude all the remaining components from the install.
- Install Tcl:
- Download and run the latest ActiveTcl EXE in this directory. This will launch a standard Windows installed. Follow the install prompts to complete the installation.
- Install ExamDiff:
- Create a directory for ExamDiff on your PC. For example: d:\examdiff or d:\Program Files\examdiff.
- Download ExamDiff to your local ExamDiff directory.
- Now begin the WinCvs install. Download and run the SETUP.EXE program to install WinCvs on your PC.
Configuring WinCvs to Connect to CVS Server
- After installing WinCvs, run it from your Start–>Program–>GNU–>WinCvs menu. WinCvs will automatically open the ‘WinCvs Preferences’ dialog the first time it is run.
- Under the ‘GENERAL’ tab, set ‘Authentication’ to ‘SSH’. Click on the SETTINGS button and enter additional SSH information:
- Check the ‘If SSH is not in the PATH’ box and enter the full path of the plink program – ‘d:\putty\plink’.
- Check the ‘Additional SSH options’ box and enter ‘-ssh’.
- Click on OK to save your SSH settings.
- In the ‘Path’ field enter: ‘/home/cvs’ (this is the location of the CVS repository on the CVS server).
- In the ‘Host Address’ field enter the name of your CVS server.
- In ‘User Name’ enter your network logon (lowercase). For example, ‘username’.
- Under the ‘GLOBALS’ tab, uncheck the ‘Checkout read-only’ option.
- Under the ‘WINCVS’ tab, set the following options:
- In the ‘HOME…’ field enter a home directory name such as ‘d:\home\WinCvs’. (WinCvs will create the directory if it does not already exist.)
- Check the ‘External diff program’ box and enter the location of the ExamDiff executible you installed earlier.
- Under ‘Default viewer used to open files’ enter the full path of your favorite text editor, such as Textpad.
- Click on the OK button to exit the WinCvs Preferences dialog.
Getting Started with WinCvs – Documentation
There are two documents that can help you get started with WinCvs:
The “WinCvs Daily Use Guide” is probably the best place to start.
Installing the TortoiseCVS GUI
TortoiseCVS is a plug-in for the Windows Explorer. It gives you easy, direct access to CVS commands from the Explorer. Even with WinCvs installed you will still probably find TortoiseCVS handy to have installed on your PC.
- Install TortoiseCVS on your PC by downloading and running the latest version of the TortoiseCVS.
- Because TortoiseCVS is an Explorer plug-in, you will need to REBOOT your PC after running the Tortoise installer.
- Next go to Start–>Programs–>TortoiseCVS–>Preferences to configure a connection to the CVS server.
- Under the MAIN tab, select the ExamDiff program as your ‘External diff application’.
- Under the SSH tab, enter the name of your ssh application – normally this will be ‘d:\putty\plink.exe’.
- Click on OK to save your preferences.
- Now open Windows Explorer and go the the directory where you plan to put your CVS projects. Right-click in that directory and select the ‘CVS Checkout’ option.
- Under the MODULE tab make the following changes:
- Make sure ‘Protocol’ is set to ‘Internet (secure shell)’.
- Set ‘Server’ to ‘ServerName’ as appropriate.
- Set ‘Repository directory’ to ‘/home/cvs’.
- Set ‘User name’ to your network logon id (lowercase!).
- Set ‘Module’ to the name of the CVS project you want to work on. (You can click on the FETCH LIST button and TortoiseCVS will populate the drop-down box with a list of all valid CVS projects on the server.)
- Click on OK to proceed with the checkout.
- TortoiseCVS will pull a copy of the requested CVS project down to your PC and you can start working on it.
- For more information how to use TortoiseCVS, please read the TortoiseCVS Support Documentation
Using WinCvs & TortoiseCvs Together
You can use WinCvs and TortoiseCvs (and the CVS command-line) interchangeably. For example, you can checkout a project using TortoiseCvs, work on it with WinCvs and then commit it using the CVS command-line.
As a rule this should also hold true for any other CVS clients you might decide to install on your PC. Possible exception: clients built into IDEs like Forte and Eclipse.
This page is based on an internal page written by Bruce Files at MPCT (later Aleri) in Chicago. It has been modified to make it a generic guide suitable for publication on the internet.