Some on-line ConcurrentVersionsSystem tutorials:
How to set up a ConcurrentVersionsSystem repository on your own machine.
(Beware UnixCulturalAssumption; see http://cvsbook.red-bean.com/cvsbook.html#Getting_And_Installing_CVS)
Initial Setup Do I have CVS installed on my machine?
Probably. Type cvs at your shell prompt and see. Type which cvs to see where it lives (this tutorial will assume it lives as /usr/local/cvs).
If you've never used cvs before, type the following to set it up initially.
sudo mkdir /usr/local/cvsrep # Make the repository. sudo chmod g+w /usr/local/cvsrep # Group (usually wheel) can use the repository.Cvs uses an environmental variable called CVSROOT to show the path to CVS. Edit your .bash_profile to include the following:
CVSROOT=/usr/local/cvsrep export CVSROOTSave your profile and load it.
To start CVS for the first time type:
cvs -d /usr/local/cvsrep init #If you haven't changed your .bash_profile. cvs init #If you have.
As a casual Unix user, I missed the whole "chgrp & chmod g+s" trick to get cvs additions to be available to everyone. This didn't seem to be covered well in the FAQs and other documentation. Maybe I missed something, or maybe native Unix users consider it obvious. It wasn't obvious to me. Initially I had all the CVS users in the same default group, now I know that's not necessary. Maybe there are some other not-so-obvious tricks, as well?
Here's a slightly more detailed explanation:
cvs creates files with the user as owner, and the user's default group as group. so if somebody else comes along, they can't get at those files unless they're in the same default group. Unless:
chgrp PROJECTGROUP on the existing stuff chmod g+s on the project directoriesThat way any files or directories created inside the project are in PROJECTGROUP, and the g+s propagates the group setting to new subdirectories. Now anyone in PROJECTGROUP has full access to existing and new files.
To do this to an already existing project tree:
chgrp -R projgroup dir chmod -R g+w dir find dir -type d | xargs chmod g+sSometimes it is also feasible to make cvsroot's mode +t. But usually it's cleaner to just have separate repositories for all groups of users.
A very useful cvs command:
cvs -nq upshows you a status summary without changing anything.