CVS tips

Install on a new client

Setup SSH login with empty password

Setup CVS environment variables in .profile

export CVS_RSH=/usr/bin/ssh
export CVSROOT=:ext:peter@

Import a new project

Example ...

cd cvsroot
mkdir project
cd project
cvs import project self start
cd cvsroot
cvs co project
cp -R project_source/* project
cd project
cvs add file.txt
cvs commit

Add folder to project

Non recursive

The default behaviour of cvs is to add non-recursively.

cvs add folder
cvs commit

Add folder recursively

A smart way of using find and xargs enables folders to be added recursively.

cvs add folder
find folder -type d -print | xargs cvs add
find folder -name CVS -prune -o -type f -print | xargs cvs add

An alternative way is to use grep utility.

find folder -type d -print | grep -v CVS | xargs cvs add
find folder -type f -print | grep -v CVS | xargs cvs add

Optionally with -n1 for xargs.

Add files to project

cvs add *.rb
cvs commit

Check log

Check commit messages for a file

cvs log <file>