Sloan Digital Sky Survey
SDSS@JHU Cvs primer

Simple CVS commands

Remeber cvs -help gives you lots of info.

Get stuff out of CVS - checkout

to get a module/project do

cvs co cvsdemo/aproj1

to get all projects you could do

cvs co cvsdemo

NOTE: co is short for checkout

Commiting your changes

After making changes you can go anywhere in the tree and type

cvs commit

this will put all you changes in the repository if there are no conflicts.
The -m option allows you to specify a message on the command line so no editor ops up for you comment- please add sensible comments.
To add a new file or directory do

cvs add file.name

you may use wildcards at least on unix

Getting other changes - update

To get others changes you need to update your tree - do this with

cvs update

Here is is worth mentioning -d this will get any new sub directories which have been added.

To view history of a file

cvs log filename

Difference between files

To get a dif between your version and repository

cvs diff fname

diff between two versions

cvs diff -r 1.1 -r1.2 fname

BINARIES

Some files you want cvs not to touch, for these you need an admin command

cvs admin -kb fname

Better still when adding it do

cv add -kb fname

Actually the repository has been modified to do this automatically so you do not need to worry - however it is worth considering if you have some binary type file which should not have linefeeds modified etc. you may need -kb

VARIABLES

In our code we should add to all files a few basic variables which CVS updates At the top of the file put something like this (you need to remove everythign from the colon to the last dollar cvs takes care of it).
/*
 -Put a PRE tag around this at least in java -
 Current Version
 ===============
 ID:            $Id: cvsprimer.aspx,v 1.1 2003/08/01 18:02:38 womullan Exp $
 Revision:      $Revision: 1.1 $
 Date/time:     $Date: 2003/08/01 18:02:38 $
*/
and at the end of the file
/**********************************************************************
* Revision History
* ================
*
* $Log: cvsprimer.aspx,v $
* Revision 1.1  2003/08/01 18:02:38  womullan
*  moved cvs stuff over to new menu
*
* Revision 1.4  2003/03/20 15:51:48  womullan
*  no really fixed the menu
*
* Revision 1.3  2003/03/20 15:47:41  womullan
* fixed menu hopefully
*
* Revision 1.2  2003/03/20 15:33:50  womullan
* added menu
*
* Revision 1.1  2003/03/11 17:13:59  womullan
* Added more on cvs
*
*
**/

There are many other varaibles but htese are probably the most usefull.


William O'Mullane
Last Modified :Friday, August 1, 2003 at 2:02:38 PM , $Revision 1.1 $