Write Access to the NVO CVS Server
Write access to the NVO CVS server requires that you have an account with CACR at Caltech with the NVO project. To get an account, fill out and sign the form at http://bill.cacr.caltech.edu/Cacr/userform.cfm and fax it to 626-628-3994. Please note on your form that you wish to have write access to the NVO CVS server. If your application is approved by local NVO staff you will receive an email when your account is set up.
Set CVS_RSH variable
If you haven't used a remote repository before, you'll need to set the variable CVS_RSH to equal "ssh". If you use the bash shell, this means adding the following to your $HOME/.bashrc file:
% export CVS_RSH="ssh"
Or, if you use a C shell derivative, you should add the following to your .cshrc :
% setenv CVS_RSH "ssh" sh and bash users should instead have these lines in their '.profile' or `.bashrc':
CVSROOT=cvs.us-vo.org:/srv/cvs/us-vo export CVSROOT
Tell CVS where your repository is
Set the $CVSROOT environment variable to an absolute path to the root of the repository. To set $CVSROOT, all csh and tcsh users should have this line in their '.cshrc' or '.tcshrc' files:
% setenv CVSROOT cvs.us-vo.org:/srv/cvs/us-vo
Or you can use the -d option in your commands:
% cvs -d username@cvs.us-vo.org:/srv/cvs/us-vo checkout utilities
You need to specify this any time you're not inside of an existing checked out working directory, e.g. the first time you do a 'cvs checkout'; but after that, anything you do within the working directory that you've checked out should automatically use the right variables.
Getting the source
The first thing you must do is to get your own working copy of the source. For this, you use the checkout command:
% cvs checkout utilities or % cvs -d username@cvs.us-vo.org:/srv/cvs/us-vo checkout utilities
This will create a new directory called 'utilities' and populate it with the source files.
% cd utilities % ls
CVS nasm
The CVS directory is used internally by CVS. Normally, you should not modify or remove any of the files in it.
Add and commit
To add a new file to a directory, follow these steps.
-
Create the new file inside your working copy of the directory.
-
Use cvs add filename to tell CVS that you want to version control the file. If the file contains binary data, specify -kb.
-
Use cvs commit filename to actually check in the file into the repository. Other developers cannot see the file until you perform this step.
You can also use the add command to add a new directory. If you are putting in a binary file, e.g. a jar file, then you need to use the -kb flag:
cvs add -kb blah.jar
Otherwise the binary will be corrupt.
Delete/remove and commit
To remove a file from a module, but remain able to retrieve old revisions:
-
Make sure that you have not made any uncommitted modifications to the file. If you remove the file without committing your changes, you will not be able to retrieve the file as it was immediately before you deleted it.
-
Remove the file from your working copy of the module. You can use rm .
-
Use cvs remove filename to tell CVS that you really want to delete the file.
-
Use cvs commit filename to actually perform the removal of the file from the repository.
Import sources into CVS
Use the import command to check in the sources for the first time. When you use the import command to track third-party sources, the vendor tag and release tags are useful. The vendor tag is a symbolic name for the branch. The release tags are symbolic names for a particular release, such as 'FSF_0_04' .
% cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
The vendor tag is named 'FSF_DIST' in the above example, and the only release tag assigned is 'WDIFF_0_04' .
Further Reading
-
Detailed instructions on how to use CVS are available here.
