next up previous contents
Next: CVS Options Up: Using CVS Previous: Using CVS   Contents

Essential CVS Commands

cvs login
Logs into the repository. You will be prompted for a password. This CVS command leaves a file .cvspass in your home directory. There is no need to login every time you issue a CVS command, as long as this file exists. For a Cactus checkout, you have to log into the CVS server, using the CVS option -d to specify CVSROOT:
cvs -d :pserver:cvs_anon@cvs.cactuscode.org:/cactus login

Note: that there is no ``logout'' command: if you log in with administrative rights from an arbitrary account, you should be aware that the password file enables subsequent administrative logins from that account. Delete the file if necessary.

cvs checkout modules ...
This command creates your private copy of the source for modules. You can work with this copy without interfering with others' work. At least one subdirectory level is always created: it does not write all files into your current directory but creates a directory. For Cactus, you need to either include the -d options to specify the CVSROOT directory and the CVS server, or specify them with an environment variable (see below). Once you have checked out the repository there is no need to include the -d option and its rather lengthy argument: the necessary information is contained in the local CVS/ directories.

cvs update
Execute this command from within your private source directory when you wish to update your copies of source files from changes that other developers have made to the source in the repository. Merges are performed automatically when possible, a warning is issued if manual resolution is required for conflicting changes. If your local copy is several versions behind the actual repository copy, CVS will refetch the whole file instead of applying multiple patches.

cvs add file
Use this command to enroll new files in CVS records of your working directory. The files will be added to the repository the next time you run `cvs commit'.

cvs commit file
Use this command to add your local changes to the source to the repository and thereby making it publically available to checkouts and updates by other users. You cannot commit a newly created file unless you have added it.

cvs diff file
Show differences between a file in your working directory and a file in the source repository, or between two revisions in source repository. (Does not change either repository or working directory.) For example, to see the difference between versions 1.8 and 1.9 of a file foobar.c:

cvs diff -r 1.8 1.9 foobar.c

cvs remove file
Remove files from the source repository, pending a cvs commit on the same files.

cvs status [file]
This command returns the current status of your local copy relative to the repository: e.g. it indicates local modifications and possible updates.

cvs import repository tag1 tag2
Import adds an entire source distribution (starting from the directory you issue the command in) to the repository directory. Use this command to add new arrangements to the Cactus4.0 repository. The repository argument is a directory name (or a path to a directory) and the CVS root directory for repositories; to obtain this directory on the CVS server, send a request to cactus@cactuscode.org. tag1 and tag2 are two tags (vendor and release tags) that have to be supplied. For example, to add MyThorn to the MyArrangement arrangement, which may or may not already exist on the CVS repository

cvs -d :pserver:<name>@cvs.cactuscode.org:/cactus import MyArrangement/MyThorn
start v1

After you import a thorn, you should check it out from the repository straight away, and only edit this version.


next up previous contents
Next: CVS Options Up: Using CVS Previous: Using CVS   Contents