As usual, this stuff is based on Debian GNU/Linux.
Oh, and BTW: Here's a great document explaining most everything about CVS--Concurrent Versions System.
For those who want to get to know Subversion: Check out Subversion for CVS Users and Subversion: The new-generation CVS.
In order to set up a new CVS repository for user "max" (presuming that the CVS server's
root directory is
/data/cvs/), run the following commands:
cvsserver:/data/cvs/# mkdir repository_name cvsserver:/data/cvs/# chown max.cvs repository_name cvsclient:~$ grep CVS ~/.bashrc export CVS_RSH=ssh export CVSROOTemail@example.com:/data/cvs cvsclient:~$ cvs checkout repository_name
This last command creates
To fill your repository with your files, you can e.g. move your stuff
~/repository_name/ and run commands like the following
(on the cvsclient):
cd ~/repository_name/ cvs add file1.txt cvs add file2.txt cvs add -kb binary.bin cvs add dir1 cvs add dir1/file3.txt cvs add dir2 cd dir2 cvs add -kb binary2.bin cvs add file4.txt cd .. cvs commit
I like running a simulation (
"-n") first before
really updating local files from the CVS repository. The other options used
here tell CVS to include/create new directories (
possibly currently not to be found locally and to remove local directories
"-P") that have been removed in the repository:
cvs -n update -dP
In order to really update your local copy of the CVS repository forget about the "-n" option and run:
cvs update -dP
If you want to get the current status of your project (e.g. to finally release it), run:
cvs checkout -P repository_name
As with CVS can restore any previous version of your project, directories
which once might have existed and had some content back then (but have been
removed in the meantime) are not deleted in the CVS directory itself.
Instead, there's an
Attic directory in it holding the removed
In order to have
cvs checkout not create those meanwhile
removed directories locally, use "-P" in the command above. (Otherwise those
old directories will be created as empty ones.)
If you want to get mails every time somebody commited something to your repository, do the following (on the cvsserver):
cp /usr/share/doc/cvs/contrib/commit_prep.gz /data/cvs/CVSROOT/ cp /usr/share/doc/cvs/contrib/log_accum.gz /data/cvs/CVSROOT/ cd /data/cvs/CVSROOT/ gunzip commit_prep.gz gunzip log_accum.gz mv commit_prep commit_prep.pl mv log_accum log_accum.pl chmod 755 commit_prep.pl chmod 755 log_accum.pl cvsserver:/data/cvs/CVSROOT# cat commitinfo # [... comments ...] # # commit_prep.pl: # -d ... enable debug messages # ^repository $CVSROOT/CVSROOT/commit_prep.pl -d -r cvsserver:/data/cvs/CVSROOT# cat loginfo # [... comments ...] # ^repository_name $CVSROOT/CVSROOT/log_accum.pl -M repository_name -m firstname.lastname@example.org -R email@example.com -u $USER %s
Two quite serious security considerations to take into account (taken from http://www.wiggy.net/code/cvs-repouid/):
Also see the according Debian Security Advisory (DSA).