There are two types of CVS access: Anonymous (read-only access; open to all), and developers (read/write access;restricted).
To access the CVS server (known as 'pserver'), you will need to have an account (username and password). For the purpose of this document, we will assume your username is myaccount and password is rocks.
For anonymous access replace the username with anoncvs and password with anoncvs.
CVS write access is not lightly given. You may want CVS access if you are:
Starting a new project
Contributing to an existing project
If you are requesting an account to start a new project, then your account will be approved once the Core Management Team has apporoved your project. However, if you are requesting an account to contribute to an existing project, then the coordinator of that particular project will have to approve your account creation first.
In order to request CVS write access on Arabeyes' CVS repository, you must file a bug-report via bugs.arabeyes.org. It is also expected that you have read this document and know exactly why you are needing CVS access.
The first thing to do is to login! Here are some vital pieces of information you are going to need set your CVSROOT, like:
bash-2.04$ export CVSROOT=:pserver:myaccount@cvs.arabeyes.org:/home/arabeyes/cvs
|
If you are using WinCVS then you will need to break it down to:
Authentication type - pserver
Username - myaccount
Host name - cvs.arabeyes.org
CVSROOT - /home/arabeyes/cvs
Once you have your environment set, you can then login as follows:
bash-2.04$ cvs login
|
Enter your password when it prompts you for one. You are in!
The word 'checkout'[1] in CVS refers to downloading the files to your local machine. It is analogous to you checking out a book from the library, however you are not only expected to bring it back, but update it too!
bash-2.04$ cvs checkout projects
|
The above command will create a directory structure on your computer, which will have everything that is under projects on the CVS repository. So, let us say we don't want everything under projects. Let us assume that you want the Akka project source and everything for it.
bash-2.04$ cvs checkout projects/akka
|
When you 'commit' a file, you are essentially uploading it to the repository. So, now that you have downloaded the files and have made some changes, you would like to put it back on the repository.
For the sake of this example, we will say you are modifying the file 'myfile.cc'. Here is how to commit it:
bash-2.04$ cvs commit myfile.cc
|
If the file does not already exist, and you are creating a new one then you need to 'add' it first. Here is how:
bash-2.04$ cvs add myfile.cc bash-2.04$ cvs commit myfile.cc |
The first command creates an entry for the file in the repository, and the second one actually makes the commit to the repository (making it available). If the file already exists and you are making changes to it, you can ignore the 'cvs add' command. For more help do 'man cvs' from your linux/unix prompt.
Once you execute the commit command, a text editor will be launched so you can enter a brief log of what you have done. This is especially useful for others who are working on the same project - as it gives them an insight of what you have changed without having to look through the file(s). The editor is usually vi, on most Linux/Unix systems.However, that is not necessarily the case. It is whatever you have the environment $EDITOR set to. To find out what it is set to in your environment, do:
bash-2.04$ env | grep EDITOR
|
In order to get into insert mode under VI, press i. Then you may continue to type in your brief log. Once you are done, press ESC (which will get you out of the insert mode), and enter :wq then hit return. This will write (to save) and quit. Your commit will then be executed.
Since there are others who are likely to have made changes during the course of the project, your local working copy of the cvs contents may not always be up to date. In order for you to keep your copy up-to-date you can:
bash-2.04$ cvs update
|
Note that this can only be done while you are inside the directory you are intending to update.