I’m no expert on CVS (concurrent versions system), but thought I would share as it was painful for me to get this up and running:
Here is my scenario. I’m looking at adopting a version system to keep my source code and perhaps documents in. I need something that is free and easy to use. After reading a decent amount of information online I opt for CVSNT (which is the windows port of the Linux CVS program). I decide to get a nice shell integration package for it (why use the command line if you don’t have to?) so I opt for TortoiseCVS. I go to the various site do a little reading and download the latest stable releases.
My install scenario is going to be a local repository which will hold the version information for my various files and projects that I am going to commit to the version system. I just want a local setup so I can keep up to date with my changes and perhaps roll back if needed, but not worry about creating an obscure set of folders with lots of archiving.
So I install CVSNT using the pre-built installer and reboot as requested. I’ve stumbled across a nice FAQ from mobile fish on how to get CVSNT installed and configured. I run through these steps and everything seems to be going well.
Trouble enters paradise when I begin to try and test the command line before installing the TortoiseCVS front end.
On my first attempt to import a folder into the CVS repository I get this error:
cvs import: No CVSROOT specified! Please use the `-d’ option cvs [import aborted]: or set the CVSROOT environment variable.
Unfortunately for me I have no idea what the CVSRoot option is or how to apply it to my scenario for the import. After about 5 hours of reading I’ve come across the solution (which is mindless) to my problem specific to my installation:
Here is how I have CVSNT configured:
- Windows XP Pro SP2 Fully patched as of 7/24/2007
- Installed to c:\program files\cvsnt
- My Repository is on a different disk e:\cvsrepository
- I currently have one repository which is marked as the default.
I open command prompt and type in the following
set cvsroot=:local:e:\repository
No wasn’t that easy. For my instance I don’t require logins or other protocols to access my local server as it is local; hence the local keyword; after that the drive just needs to be specified.
This works in the TortoiseCVS make module command as well where you are asked to specify the protocol pick local and then in the repository folder put the path in to the folder. Much easier than this text would indicate.
As an addendum, I’m not familiar with CVS or its usage as this is my first foray into the concept, but hopefully this will help me (and anyone else who is curious) remember how to set this up in the future.
Happy hunting!