CVS (Concurrent
Versions System)
What is CVS?
CVS is a version control system. Using it, you can record the history of sources files, and documents.
Getting ready to use CVS
First set the environment variable CVSROOT.
For csh/tcsh: setenv CVSROOT ~/cvsroot
For bash/ksh: CVSROOT=~/cvsroot;
export CVSROOT
Add directories to CVS
Directory:
cvs add directory
File:
cvs add file
cvs commit
Check out a project from CVS
Once you have put a project directory into CVS, you can check out the whole directory and continue developing the codes.
cvs co WEM
Check in files into CVS
cvs ci wem.f90
cvs commit
or
cvs commit –m “comments” wem.f90
Update your files
In a software project with multiple developers, you are not the only one working on the codes. Someone may change a file and you only an old version of that file. You can integrate the new version into your version by using:
cvs update file
Check status of files
You can check the status of a file using:
cvs status file
The various status of a file are:
Up-to-date
The file is identical with the latest
revision in the repository.
Locally Modified
You have edited the file, and not yet
committed your changes.
Needing Patch
Someone else has committed a newer revision
to the repository.
Needs Merge
Someone else has committed a newer revision
to the repository, and you have also made modifications to the file.
Remove files/directories from CVS
cvs remove file
cvs remove directory