CVS

Notes on getting CVS on the air in a Windows 2000 environment

A couple of good places to start:

http://www.cvshome.org

http://www.cvsnt.org/

CVS server for NT

Download CVS server for NT from http://www.cvsnt.org/

This is a version of the cvs pserver for NT. It is implemented as an NT service, which listens on port 2401 and/or named pipes and spawns cvs.exe for each connection.

I downloaded cvsnt_1.11.1.3.exe, the version available on 22nd January 2002.

I ran the install shield wizard. I used all defaults, clicking "next" several times, as is the way...

Then a reboot...

From control panel...

Click Install

 

Do not be tempted to click start. Keep the service stopped!

Make a repository directory <folder>. I chose c:\ngh_cvs_repository using filemanager, sorry explorer. That's <silence>explorer not internet explorer.

Create a folder under that called test c:\ngh_cvs_repository\test and one called c:\ngh_cvs_repository\CVSROOT

(if things go awry use the windows event log viewer!) 

Go to the middle tab "repositories".

Note the utterly stupid Linux / Unix/  obese-nerd habit of getting the slashes arse about tit.

Now we hit the Start button!

This is fun!

Accounts

We need an accounts file! It's something we create by hand!

Here's mine:

anonymous:
bach:ULtgRLXo7NRxs
spwang:1sOp854gDF3DY
melissa:tGX1fS8sun6rY:pubcvs
qproj:XR4EZcEs0szik:pubcvs

save it under the test\CVSROOT directory as passwd. No extent. 

Now for the acid test. From another machine try connecting using telnet on port 2401.

Then try cvs. Here I'm connecting to another machine called Holly, using the account anonymous.

C:\>cvs -d :pserver:anonymous@holly:/test login
Logging in to :pserver:anonymous@holly:2401/test
CVS password:<cr>

I am now connected!

I do a quick project...

C:\temp>mkdir fred

C:\temp>cd fred

C:\temp\fred>notepad test.txt

C:\temp\fred>dir
Volume in drive C has no label.
Volume Serial Number is 284A-798F

Directory of C:\temp\fred

23/01/2002 18:21 <DIR> .
23/01/2002 18:21 <DIR> ..
23/01/2002 18:21 17 test.txt
1 File(s) 17 bytes
2 Dir(s) 7,189,401,600 bytes free

C:\temp\fred>cvs -d :pserver:anonymous@holly:/test import -m "a" b c d
N b/test.txt

No conflicts created by this import

delete the tree

C:\temp>cvs -d :pserver:anonymous@holly:/test checkout b
cvs server: Updating b
U b/test.txt

and the tree is restored!

Now I need to learn how to use CVS!

Using the CVS command line client

The example on http://www.cvsnt.org/ is a good place to start. This actually uses CVS to download the NT server source.

cvs -d :pserver:cvs@cvs.cvsnt.org:/usr/local/cvs login
cvs -d :pserver:cvs@cvs.cvsnt.org:/usr/local/cvs co cvsnt