win32 F/OSS development - CVS Source control

     Source/version/revision control is a system to track changes made to your code. Both CVS and Subversion are widely used, but here CVS will be installed.

CVS uses a client-server architecture. The server sits on the network and does the work of checking files in and out, storing copies, etc. Developers connect from client workstations using a CVS client. In a small workgroup or for a single developer, the client and server can be on the same machine.




First head over to march-hare.org and grab CVSNT open source for windows. Install using the defaults and reboot. Now we need to create some directories to keep things organized. While you can make them work, I generally avoid spaces in the folder names.

The first folder will be your workarea. This is where you write code, compile, debug and generally make a mess of things. On my work machine this is C:\CODE\. You also want a repository; a directory to store the CVS version of your code. This one you never touch directly as it 'belongs' to CVS. For me this is C:\HOME\CVS\




Now we need to set up the repository. This tells CVS where we want our code stored. (C:\HOME\CVS\) Bring up the CVSNT control panel and click the 'Repository Configuration' tab. Note the server name (it should be your machine name) and click the add button.




For the location, select the folder created above. (C:\HOME\CVS\) Make the name something easy like /CVS and add a description. Note I made this the default repository. For a single user you can use just one repository with multiple modules (sub-projects).




If you browse to the CVSROOT folder under the repository folder above (C:\home\cvs\CVSROOT\) you'll see a slew of funky files... Create a new text file named admin and add your NT username to the file. Mine is here. This tells CVS that your username is a CVS admin.




Next we'll check the setup. Since we're on a Windows box, we'll use SSPI (Security Support Provider Interface). This just means that you'll use your NT username and login when connecting.




You'll want to define an environmental variable CVSROOT. This tells your cvs client what server you're connecting to. The syntax can get funky, but for SSPI it's:
     set cvsroot=:sspi:<computername>:<repositoryname>
You can also set the CVSROOT on the commandline to override the environmental variable.




To add it, open the System Properties Control Panel. Click on the 'Advanced' tab, then click the 'Environmental Variables' button. Now add a variable named: cvsroot as shown. Replace Eveland with your machine name and /cvs with your repository name.




To test the login, open a command window and type: cvs login
Enter your windows login password. Then to verify you're in type:
cvs -ls



Next >>