Wednesday, March 25, 2009

CVS HOW TO

Terminology:
CVS - Concurrent Versions System
RCS - Revision Control System (RCS)
Module - particular set of files kept in CVS
Repository - Location on CVS server where modules are kept
Tag - A certain milestone in a file or module's development
Branch - A fork of the module.

SETUP CVS:
1. export CVSROOT=/cvs (add to the path)
2. cvs init (create depository)
3. cd /home/mike/cvs/project_directory (change directory to projec directory)
4. cvs import -m "Sample Program" project sample start (import project to CVS repository)
5. cvs checkout projectname (get copy of the $projectname. Can be done from Linux(ssh/pserver or Windows(through ssh using WINCVS[http://www.wincvs.org/])

Most Useful Commands:
Add/Update changes to CVS - [cvs commit -m 'Message to the update' $filename]
Add a New File:
1. cvs add $filename (CVS to version control the file)
2. cvs commit $filename (CVS to check in the file to the repository)
3. cvs log $filename
4. cvs diff -r tag1 tag2 $filename

Remove:
1. rm $filename (remove file from the modulo)
2. cvs remove $filename (CVS to delete the file)
3. cvs commit $filename (perform the removal from the repository

SHELL (CVS over SSH) on Linux for bash:
1.export CVS_RSH=SSH
2.cvs -d :ext:USERNAME@host:/cvsroot CVS_COMMAND

No comments:

Post a Comment