Tools

CVS Version Control on Windows in 10 minutes

Do you need a reliable version control for your website, personal notes, transferring data from work to home to university back & forth without any costs in time or budget?

Do you still don’t want to setup a Linux machine just because CVS requires Linux for stable use (like some dude told you ages ago?)

Do you not want to hassle around with flimsy Unix-stuff but only have convenient Version Control in a manner like PCVS or Microsoft VSS ??

Well just take CVS (CVSNT 2.x) and TortoiseCVS / WinCVS for your home/laptop/school machine and become happy with it… you don’t need anything else and get used to open-source industry-proven version and configuration management control.

Read on for a setup-howto consisting mainly of links to relevant pages and tools…

1) you need the CVSNT – version 2.x – for running the CVS server itself on your windows box. If you have a Linux-server, then forget this step and look up ordinary CVS on Linux setup guides… else

a) download the latest CVSNT 2.0.8 and start the setup. Don’t forget to install the services (Which are the actual CVS server services running in the background…) do a reboot afterwards, or you will receive some errors when creating your repository

b) checkout this Beginners guide to CVS for more detailled installation tips (i.e. user management)... I assume you simply install the stuff on your single PC/notebook with local users.

c) after Reboot your will have a panel “CVS For NT” in your Control Panel

2) The following steps explain a basic repository installation

a) stop the service in the CVS for NT panel

b) now create a repository for your PC – the repository is the directory where the internal representation of your version files are stored – sort of file-database…

c) Go to the tab “Repositories” and with a “prefix” of e.g. “c:\cvsrepos” you can define this basic path, which will be common for all repositories… Note: one repository is only a collection of many modules (which could be different projects )...

d) Use the Add button to add a repository. Enter TEST after the prefix in the box that appears. Accept the offer to create the repository. Again: You can have several separate repositories on the same server, in that case you will use the Add button once for each repository you need. Once the list of repositories contain those you want you are done here.

e) Go to the tab “ Advanced” and setup your temp-path to e.g. “c:\cvstemp”

e) Start the service again

3) The following steps explain a basic user setup – instead of localhost you can put in your IP or real hostname… these commands have to be performance in a commandline-window (CMD.EXE)

a) set cvsroot=:sspi:localhost:/TEST

b) cvs passwd -r {real account name} -a {new username}

e.g. cvs passwd -r Administrator -a Adminstrator

—- then enter the password on the commandline

Any user entered like this MUST be an NT user on the local system!

More tips to be found in this documentation about adding users to CVS if necessary, but for the first test it will be ok.

4) now for the connection testing – these commands have to be performance in a commandline-window (CMD.EXE)

a) set cvsroot=:{protocol}:{user}@{computername}:/TEST

e.g. set cvsroot=:pserver:Administrator@localhost:/TEST

b) cvs login

—- then enter the password on the commandline

c) cvs ls -l -R

to perform a basic query – don’t worry – the gui stuff is comming up right away…

5) Install TortoiseCVS

TortoiseCVS is a great plugin for the windows explorer that provides you all the necessary CVS functions via right-click&select like other version control systems do… I prefer it much more over WinCVS for daily use, because the standard-tasks of check-out (cvs:“update”) or check-in(cvs:“commit”) can be done very easy and seamless with it…

Don’t forget to reboot or at least re-login man…

6) now we will perform a simple module-import… a module-import bring files initially into CVS.

a) create a directory TestModule

b) right-click “TestModule” : CVS -> Create New Module

c) Enter the CVSROOT you used above like

</p>

    :sspi:Administrator@localhost:2401:/test

	<p>

and press OK to enter this module into CVS – that’s ONLY the directory so far!

d) now put some files/directories in this “module”-directory

e) right-click “TestModule” : CVS : add contents to add all the contained files/directories

f) and now “Commit” these changes, means to finish this “transaction” with

g) right-click “TestModule” : CVS : check in (einchecken)

Now these files are in an initial revision in your CVS repository! Congratulations!

6) for more advanced use and topics I also recommend to install the WinCVS GUI front-end for CVS you can get here... I am already using the beta 1.3, so give it a try… also make sure to install Python 2.1.3 for advanced scripting features… I am not sure if 2.2 or 2.3 will work aswell!

7) Use above steps for other directories/projects you wish to version control and keep the following simple steps in mind:

a) Import Module for initial load to CVS – create a “clean” version of your files – deleting from CVS is a hassle

b) CVS Check-Out to get one module / project to your work-directory the first time as a sort of complete export

c) CVS Update to sync your local work-directory with the CVS repository

d) CVS Commit to “check-in” again and make sure everythings on the server…

More documentation is to be found in the CVS NT Reference Manual

so long for now…

Average rating
(1 vote)

Comments

CVS Version Control on Windows in 10 minutes

Hello Mr. Cemper,
My name is Charles Lumpkin. I am a web developer in Atlanta, Georgia. I recently came accross your article entitled "CVS version control on Windown in 10 Minutes." The article is great, and did indeed get me running pretty quickly. In the interest of helping others through unknown terrain, I would just like to comment on a few hiccups I had along the way.

In reference to:
3) The following steps explain a basic user setup - instead of localhost you can put in your IP or real hostname... these commands have to be performance in a commandline-window (CMD.EXE)
a) set cvsroot=:sspi:localhost:/TEST
b)cvs passwd -r {real account name} -a {new username}

e.g. cvs passwd -r Administrator -a Adminstrator

The second "Administrator" in the line above is misspelled (no second 'i'). You later reference the CVS user as "Administrator" spelled correctly. I am often slow when integrating new tools into my knowledge store so I copied and pasted many of the lines from the tutorial. I later happened upon the error.

Secondly when I tried testing the following lines:
a) create a directory TestModule
b) right-click "TestModule" : CVS -> Create New Module
c) Enter the CVSROOT you used above like

:sspi:Administrator@localhost:2401:/test

Here is where I first cam accross the misspelling, but the bigger problem was that I should actually be using :pserver: instead of :sspi:

This article was really great. Trust me, it would have taken me much longer without your help. It is people like you who make the Internet great. I appreaciate you taking the time to write an article to shed some light for us "slow" people. Thank you. As always I am

Very Truly Yours,
Charles Lumpkin

Similar entries

  • CVSNT 2.0.8 released

  • TortoiseCVS 1.6.14 is released as well as an unstable test version of TortoiseCVS 1.7.3 mainly bug fixe changes: ... especially the bug "CVS/Repository content is invalid" sound like hard-core… guess we will roll out this version in my project tomorrow…

  • Finally, a 5.x capable version of comment_notify is ready for testing.

  • Tidy is a PHP extension for the Tidy HTML clean and repair utility which allows you to not only clean and otherwise manipulate HTML documents, but also traverse the document tree. It’s performance is great and you have a ton of features to make your html code or smarty output html compliant.

    Read how to install it in 5 minutes – regardless if you have a Linux or Windows box…

  • Single-User Subversion and Multiuser Subversion by Rafael Garcia-Suarez explain the setup of the Subversion version control system which tends to be the better CVS. He demonstrates how to use it for multiuser, distributed projects aswell as single user enviroments. What…