next up previous contents
Next: Checking Out Flesh and Up: Using CVS Previous: CVS Options   Contents

CVS Examples

We list some sample CVS commands to treat the most typical Cactus 4.0 CVS situations.
Logging into the server
cvs -d :pserver:cvs_anon@cvs.cactuscode.org:/cactus login
You will be asked for the password for user cvs_anon, which is anon.

Checking out the code
cvs -d :pserver:cvs_anon@cvs.cactuscode.org:/cactus checkout Cactus
check out a CVS module named ``Cactus'', in this case it checks out the Cactus Computational Toolkit. A directory ./Cactus is created if it doesn't already exist. If you perform a checkout on an already existing and locally modified copy of the module, CVS will try to merge the files with your local copy.

Updating a file or directory
Assuming that you have a file ./foobar in your checked out copy, you may perform a
cvs status ./foobar
to inform yourself about the necessary updates, etc. To update the file issue
cvs update ./foobar
If that was file was locally modified, CVS will try to merge the changes. Manual merging might be necessary and will be indicated by a CVS warning.

Updating a directory
To recursively update the current directory and all subdirectories, type
cvs update .
To update a directory ./mysources, type
cvs update ./path/to/mysources

Committing a changed file
To commit changes you have applied to your local copy, your file must be in sync with the repository: your changes must be done to the latest version, otherwise CVS will instruct you to perform an update first. To commit changes made to a file ./foobar, type
cvs commit -m "Reason for the change" ./foobar
You may specify several files to commit.

Adding and committing a new file
Adding a new file to the repository is a two fold procedure you first schedule the file for addition, then you commit it:
cvs add ./newfoo
cvs commit -m "new few message" ./newfoo

Creating a new thorn

To add a new module (e.g. an arrangement) to a Cactus repository we first have to create a directory for you with the right permissions. Please contact cactus@cactuscode.org providing the name of the requested module, and who should be able to commit changes to the module.

To add the new module, change directory so that you are in the first directory that you want to commit to the repository. (e.g. if you want to commit a new arrangement called MyArrange then change directory to MyArrange). Then type
cvs -d :pserver:your_login@cvs.cactuscode.org:<repository name> import module_name start V1
(where start and V1 are the vendor and release tags, which you could change to something different).

To add a new directory <new dir> to an existing module (that you have write permissions for), either add the directory using
cvs add <new dir>
and then recursing down adding all the new files and directories contained inside, or import the directory by changing directory to sit inside it, and then using
cvs -d :pserver:your_login@cvs.cactuscode.org:<repository_name> import <relative name> start V1
Where <relative name> means the position of the directory within the module. (For example, if you have a module called AMod which contains a directory BMod, and you want to add CMod inside BMod, then change directory to BMod, and use AMod/BMod for the relative name).


next up previous contents
Next: Checking Out Flesh and Up: Using CVS Previous: CVS Options   Contents