General CVS Information
For general CVS information and guides, please refer to the CVS man-page, or any of the very informative tutorials found online. For example,hereandhere.
Acquiring a CVS Account
The CRBS CVS repository is available to all CRBS participants. If you do not already have an account, you can request one here.
Please include the repos you need access to in the request.
Using CVS
Once you have an account, you can access the CRBS CVS repository with the following connection parameters:
- CVS_RSH=ssh
- CVSROOT=<username>@cvs.crbs.ucsd.edu:/CVSROOT
The path for the CAMERA repo is "/CAMERA_CVS"
Module/repo names are either upper or lower case, upper case modules are controlled by the CVS administrators, and as a normal user you cannot add new directories or files at that level. Lower case modules or subdirectories are under user control, meaning that you are free to add content as needed for your project.
Please note that if you specify the local environmental variable $CVSROOT to contain the path to the repo you are working with, you may omit "-d username@cvs.crbs.ucsd.edu:/CVSROOT" as shown in the following examples. Type "echo $CVSROOT" to check this path.
Checking out:
In order to begin work, you need to check out a local copy of a specific module. This will be downloaded as a copy on your computer or home directory so you can modify without making changes to the central copy until you commit them. To checkout a module from yourrepos, use the following format:
cvs -d username@cvs.crbs.ucsd.edu:/CVSROOT co module
where "username" is your username, "/CVSROOT" is the path of the CVS root for the specific repo (as mentioned above), and module is the name of your module you are downloading.
Example:
cvs -d crbsuser@cvs.crbs.ucsd.edu:/CVSREPOS/NCMIR_CVS/NCMIR co GTS
It will then prompt you for your password. Enter you password, and it should then start downloading a local copy of the module to your working directory. If it gives you a permission denied error, it likely means you are not part of the relevant developer group. That being that case, please follow these steps, and be sure to mention the repo you need to access.
Click here for a complete list of modules by repo.
Updating:
When you want your local copy to reflect the latest copy of the module on the server, you need to update. To update your local copy of the module, simply run:
cvs -d username@cvs.crbs.ucsd.edu:/CVSROOT update module
to update only a specific file, just specify the file path within the module such as
cvs -d username@cvs.crbs.ucsd.edu:/CVSROOT update module/path/filename
Adding/Removing:
Sometimes you'll need to add a new file to your module. The first thing to do is is to change to the folder in your module where you want to place the new file. This is because the "cvs add" command does not recurse down directories.
cd module/path
then you can add your new file if it is not already there. As purely an example:
touch example.txt
this creates the empty text file "example.txt".
Once this file is ready to be added to the repository:
cvs add -m "Log message here" example.txt
Log messages are not required, but are good practice to keep everyone up to date on the changes you are making. You should receive the following message:
"cvs add: scheduling file `example.txt' for addition
cvs add: use 'cvs commit' to add this file permanently"
This file will not be added to the repo until you commit. If you change your mind about adding the file before committing, or want to remove a file from the repo in general, run the following code:
rm hello.txt cvs remove -m "Log message here" example.txt
Note that this will not only stop the file from being added from to the repo, but delete the file itself from your local directory. So if you want to keep a copy of the file, create a copy somewhere else.
Committing:
When you've made changes to file(s), it's time to update the changes from your local copy to the server.
To commit a change to the repo from the local copy of your entire module or from a specific file, run:
cvs -d username@cvs.crbs.ucsd.edu:/CVSROOT commit -m "Log message here." module   ---or--- cvs -d username@cvs.crbs.ucsd.edu:/CVSROOT commit -m "Log message here." module/path/filename
where the filename is the name of the file you are updating. Note that you can update or commit at any level in the file tree of the module. Make sure you enter a log message so people know what changes you made.
For a complete list of CVS commands, see this page.
FAQ
Is there anonymous access:
No.
Can I login to the CVS server and "look around"?
No, but you can use Crucible to browse it if you have a CRBS SSO Account.
Can I restrict access to my code?
Yes. Create a Jira ticket with the specific details of what code you want restricted and to whom.
Can I use an ssh key so I don't have to continually type my password?
Yes. Install your ssh key like this:
ssh <username>@cvs.crbs.ucsd.edu add-pub-key e.g. ssh vrowley@cvs.crbs.ucsd.edu add-pub-key
Can I access CVS via Jira/Bamboo/Eclipse/Confluence/Fisheye?
Yes. If the code you want to access isn't immediately available, enter a Jira ticket.
Can I change my CVS password?
The CVS server is not yet tied into our CRBS SSO system. In the meantime, to change your CVS password, execute the following command:
ssh <username>@cvs.crbs.ucsd.edu password e.g. ssh vrowley@cvs.crbs.ucsd.edu password
You should see this:
client$ ssh cvs.crbs.ucsd.edu password <username>@cvs.crbs.ucsd.edu's password: Old CVS PASSWORD: New CVS PASSWORD: Verify New CVS PASSWORD: Changing password for user <username>. Changing password for <username>