helpdesk@stat.rice.edu
This how-to gives introduction on how to set up and use cvs (Concurrent revision system) on stat network.Briefly, cvs system maintains a center repository and let you check out, check in files conveniently both locally and remotely. It allows you to work on the most current version of your files from any machine. The usual scenario of using cvs system is:
cvs checkout project # check out a module
cd project
... work on the project ...
cvs commit # commit changes, check in
cd ..
cvs release -d myproject # delete local copy. optional
setenv CVSROOT ~/CVS
setenv CVSEDITOR vi # or your favorite editor
your-laptop.stat.rice.edu yourusernameNote:
- yourusername
setenv CVSROOT ":ext:username@stat007.stat.rice.edu:/home/username/CVS"Note:
setenv CVSEDITOR vi # or your favorite editor
setenv CVS_RSH rsh
rsh stat007.stat.rice.edu 'echo $path'
Helpdesk has written some shell scripts to speed up the use of cvs system. However, you would better read some tutorials and understand how basic cvs commands work.
Module are just directories in cvs system. It contains files or subdirectories. cvs allows you to define modules within a module but that is out of the range of this introduction.
cd stat410Note:
cvs import stat410 vendor release
cvsadd dotfiles .cshrc .muttrc .emacswill add these three files to module dotfiles. If dotfiles does not exist, you will be prompted to create it.
cvsls # list module namesRead cvsls to see how it works.
cvsls -a # list all modules
cvsls module1 module2 # list files of module1 module2
cvs co module
cd module cp files .
cvs add files
cvs commit
cvsadd module filesIt is basically an automation of the above procedure.
It is easier to import a directory as a new module. If you would like to add a directory to an existing module:
cvs co module
cd module
cp -r directory . # or mkdir and add files
cvs add directory
cd directory
cvs add * # and keep going on.
cvsadd module directorycvsadd does the adding procedure recursively.
Usually, you work in this way
cvs co projectAfter a while, if you have modified some of the files from other places
cd project
...work on it ...
cvs commit
cvs update # read the newest version from center repository.If you would like to remove local copy,
cd .. cvs release -d projectNote: You can
cd ..directly. cvs release will check if you have un-committed changes before removal.
rm -rf project
cvs co module
cd module
cvs remove -f file # tell cvs to remove
cvs commit # really remove
cvsremove module files-or-directoriesautomation of above procedure.
co module cp module/file somewhere com -rf module
cvsget module files
add -kb option to cvs add or cvsadd command.
Keywords are words such as Log, Date, that are delimited by $ $ and will be managed by cvs system. I can not write it here since it will be replaced by cvs and will not be recognized. See the last part of this file how Date, Log are replaced by cvs. See /home/helpdesk/bin/cvs* for examples.
It is not easy, but you can use "public-key" authorization instead of "password" authorization so you do not have to enter password each time. However, you are under the risk that:
ANYONE WOULD BE ABLE TO LOG ON TO STAT007 IF THEY HAVE ACCESS TO YOU LOCAL ACCOUNT!Anway, if you will work off-campus a lot and would like to take the risk, here is how:
cd ~/.ssh2
echo "IdKey id_dsa_2048_a" > identification
sftp stat007.stat.rice.eduscp can be used too.
...
> cd .ssh2
> put id_dsa_2048_a.pub
> quit
scp id_dsa_2048_a.pub stat007.stat.rice.edu:~/.ssh2
cd .ssh2 echo "Key id_dsa_2048_a.pub" > authorization
ssh stat007.stat.rice.edu
If you are using Openssh through Linux or Windows/Cygwin and would like to connect to stat007 without password, here is a undocumented trick from internet:
ssh-keygen -d -f $HOME/.ssh/id_dsa
cd $HOME/.ssh
ssh-keygen -x -f $HOME/.ssh/id_dsa > ssh2.pub
echo "IdKey id_dsa" > identification
echo "Key ssh2.pub" > authorization
cvs scripts are under development. Helpdesk is not responsible for data lose or any consequences of using them. I will appreciate your help if you can report any bug to me.
The public-key method is dangerous. Helpdesk is not responsible for any data lose or invasion to your account due to its use.
helpdesk@stat.rice.edu
$Date: 2003/07/17 02:49:21 $
This document was generated using the LaTeX2HTML translator Version 2002-1 (1.68)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -local_icons -no_subdir -split 0 cvs.tex
The translation was initiated by Statistics Helpdesk on 2003-07-16