Introduction to CVS
(Concurrent Versions System)
*Free* software for revision control (GNU).
Build on top of "rcs", and works on "all" Unix platforms.
Does not require NFS-mount!
- Can do :
In a multi user (or single user) environment with many Unix
machines a group of people can work on the same project, and
develop common code.
- Start : (In .tcshrc or alike) setenv CVSROOT MACHINE:/CVS_MAIN_DIRECTORY
Where .rhost is made so you can log in directly to MACHINE,
which holds the common database.
- Assume : The package "lyngby" is a part of CVS.
CHECKOUT
To get a local copy of "lyngby" from MACHINE
cvs checkout lyngby
Note that additional CVS-directories are made - don't make changes here
SEE CHANGES TO THE DATABASE
Edit files and do the following to the changes
To see the lines changed in your code to the database: cvs diff FILE
Status for all files below current dir: cvs status .
Status for FILENAME: cvs status FILENAME
To filter the output to show non-ok files only: cvs status | grep Status | grep -v Up
New files from others: cvs -Q status `find * -type f ! -path '*CVS*' ! -name '*.o'`| grep Unknown
Make aliases of these commands - VERY handy commands.
CHECK INTO THE DATABASE
In emacs : Ctrl-X v v
Fill in a message about what happened and press Ctrl-c Ctrl-c
At the prompt : cvs commit .
OR cvs commit FILE1 FILE2 ....
Add new files to the database:
cvs add FILE
cvs commit FILE
cvs add FILE just schedules the file to be added - so cvs commit.
GETTING UPDATES
To update all directories: cvs update .
To update only FILE: cvs update FILE
MAKING A NEW REPOSITORY
cd to the directory that enters cvs and do
If this is the very first time, then do cvs init
cd to the directory that you want to take into cvs
cvs import -m "MESSAGE" repository vendortag releasetag
where MESSAGE is a message stored with each file.
The repository is the name of the "main directory"
that now can be checked out.
The vendortag can be your initials.
The releasetag can be set to start.
Now a package repository has been created in the CVS database.
Finally cd ..
Move or delete the directory you were in and do a
cvs checkout repository
which
creates a directory with the name repository.
Now have fun!
If you need a good tool to show the log information - take a look
at the cvs2html homepage
You are the nd visitor since
February 1 1998
Last modified: Feb 1. 1998
Peter Toft pto@imm.dtu.dk
Post Doc
