Get Started With CVS
What is CVS?
CVS (Concurrent Version Control System) is a system that allows multiple developers to keep their project source code and documentation in sync. It does it by maintaining a central repository of files, from which the developers can check out the necessary files and return them back to the repository after making changes.
Why do I use it?
CVS has a command interface that allow the developer to communicate with his local copy of the CVS and also with the central repository. They allow him among other things to
- bring new files under CVS control
- remove files from CVS control
- check files out of the central repository
- check files back into the central repository
- update local files from the repository after some other developers made changes to them
Where do I get CVS?
if you are running linux, cvs client should come with Red Hat distribution. If you are running windows, you can get cvs client from http://www.cvsgui.org, or on server AICIP /mnt/update/windows directory.
How to setup CVS client
- step1: at initial script such as ".bashrc", add following lines. Different user should replace "hqi" with their login name on panda (they don't need a login in /etc/passwd to access CVS files on panda)
CVSROOT=:pserver:email@example.com:/cvsroot export CVSROOT
- step 2: run "cvs login" and provide the password sys adm give to you. This step is only needed if it is the first time you acess CVS files on panda
- step 3: now you are ready to use "cvs co" to check out
How to setup a CVS account at the server?
- add a login name for this user, but disable the account since you don't really want him/her to have a home directory and ssh to panda
- run the following command to generate a CVS password for the user. this password is different from /etc/passwd.
perl -e 'print crypt ("YourPassword", "salt");'
- cut&paste the password to /cvsroot/CVSROOT/passwd file.
How to setup a new CVS directory?
- create a empty directory (anywhere in your home directory), say "sensit00"
- go into this directory and run:
cd sensit00 cvs import -m "initial check in" sensit00 sensit00 start
- remove this empty directory "sensit00",
rm -rf sensit00
- check the new project out from CVS by:
cvs co sensit00
cvs status cvs update xxx cvs co (checkout) - read from server cvs commit xxx cvs commit cvs diff -r 1.5 -r 1.4 xxx cvs log xxx