About CVS

This document explains how to use the Concurrent Versions System (CVS) with the BioCocoa project. To be able to use CVS and contribute code to the BioCocoa project, you will need to have an account at bioinformatics.org, and request to be added to the developer list by the project leader, Peter Schols. You can get more information about the use of CVS with bioinformatics.org projects here.



Getting the BioCocoa project on your computer

To upload/export the BioCocoa project into your computer, open Terminal.app on your machine and make sure that you are using the bash shell by typing bash at the prompt. Now you can excecute the following commands:

The entire BioCocoa project will be now be transfered to your local folder. You can monitor what's going on in the Terminal window.


Setting up ssh keys

To be able to use CVS transparently in GUI applications, in particular Xcode and CVL, you will need to set up ssh on your machine and on your account at bioinformatics.org, so that you don't need to type your account password everytime you want to use CVS. After setting this up, you will never be asked for your bioinformatics password anymore. This is how GUI applications can run without having to deal with passwords. One other advantage of doing this is that your scripts will be able to run without human intervention. The disadvantage is that anyone who can access your account on your local Mac OS X box will also be able to access those remote servers which have stored your public key.

Create public/private key pair with the ssh-keygen command

Open Terminal.app on your machine and type the following commands at the prompt:

Note that you could choose to type a password, it does not have to be the same as your bioinformatics.org password. However, if you type a password, it will be needed to access your ssh account. This can makes things more complicated, in particular with CVL. You can always change that password or remove it (by replacing it with an empty password), using the command ssh-keygen -p.

Place your public key on the remote host

Once you have created your private and public keys, you need to place your public key on the remote host in a place where ssh and scp can recognize it. For this, add the contents of your local ~/.ssh/id_dsa.pub file to the file called authorized_keys in the ~/.ssh directory in your remote account at bioinformatics.org (if you don't have such file already, you can create it). You can do this by SFTP'ing to your bioinformatics.org account and by creating a .ssh folder in your Home directory and by adding a authorized_keys file to this dir.

Another option is to use the Terminal (I have not tested that):

If you are going to access the CVS from different machines, you will have to add one line per machine, so make sure you are on a new line when adding another key to the authorized_keys file.


Using SVN in Xcode

Add a section on using Subversion here

Using CVS in Xcode

To be able to use CVS in Xcode, you need to set up a pair of private/public key on your machine and on your account at bioinformatics.org, as described above. Xcode will then be able to connect to the CVS server without asking a password. You can use the built-in SCM support to work on the project and use CVS in Xcode.

To start using CVS in Xcode, double-click the project icon at the top of the 'Groups and Files' view. In the 'General' tab, check the box 'enable SCM' and choose CVS. Click on the edit button to specify to use ssh.

Look into the SCM smart group on the 'Groups and Files' panel on the left. New files and modified files will appear in this group, as indicated by a letter on the left, 'U' for updated (you have an old version), 'M' for modified (you have modified it and may need to commit), 'A' for new files (need to be added first), 'R' for removal, 'C' for conflict,...

The files for the project itself are in the file package 'BioCocoa.pbproj', which contains 'project.pbxproj' and one file per user, e.g. 'username.pbxuser'. The first file is modified every time the project is modified (adding files, changing target settings,...), the second when a user changes her settings. These files will only appear in the 'SCM' smart group, and should be committed to save changes to the project, or the other developers won't have access to the changes.

Things you can NOT do in Xcode, and for which you will have to use another tool (command line or CVL):


Using CVL to perform CVS operations

As an alternative to Xcode, there are other GUI tools available, including CVL, that you can download from here. The following instructions have been tested with version 3.4.7 (b72).

CVL has instructions to use a remote repository like bioinformatics.org. Here are these instructions:

Here are the most important items that you will probably use in the menus:

Switch off SCM in Xcode if you want to use CVL. Remember to always close your project in Xcode when you update the project file package itself, as Xcode might otherwise get very confused. Never delete a file in Xcode. Only remove the reference. Then you can mark files for removal and commit using CVL.


Moving files and folders

This is quite complicated with CVS. Read a CVS manual before doing it if you are not familiar with CVS.


Using the command-line for CVS

This is not an attempt to write a tutorial for the use of CVS, the reader is referred to the many excellent tutorials that already exist, most of them freely available through the web. And of course 'man cvs' is your friend. However, there are a few useful tips that are listed below. These instructions assume that the user is familiar with the command line.


Back to index