Old CVS setup

From Rsewiki

As of 20031001 the CVS repositories for the various robotics projects are being moved to /shome/cvs/repository on the server Little.

So far the following modules are in place:

  • robot
  • oskit
  • linux (SMRd)
  • robot2005 (SMRdemo)
  • aumat (matrix library)
  • ausmrcc (SDL GUI for remote controlling SMDdemo based robots)
  • ausmrcc2 (New version where development is done - Linux support)
  • aurobotsim (Java multi robot simulator)
  • aurobotservers (camera and laserscanner server - new clean server)
  • hakoclient (Client program for executing HAKO specific route plans)

To access these modules make sure the following steps have been taken.

For the impatient

To checkout the robot module do the following (change USERNAME to your login):

$ export CVS_RSH=ssh

$ cvs -d USERNAME@kalman:/shome/cvs/repository checkout robot

The following commands expect that you are in the directory created by the above command (or another directory that holds your local copy of a CVS tree).

To update your local version of the robot module:

$ cvs update -d

'Note: Check for conflicts!'

To see what changes you have made since you last updated:

$ cvs diff

'Note: the above command checks against the version you actually checked out and not the newest version on the server'

To see what changes exist between the newest version on the server and your local copy:

$ cvs diff -D "now"

To commit your changes to the server:

$ cvs commit


Use an account that is a member of the vip group

To become a member of the vip group contact your system administrator. Currently mailto:or@oersted.dtu.dk

Configure CVS environment variables

Make sure that you have configured your CVS program to use secure shell (ssh) for logins. How this is done varies from program to program and a complete coverage of all available programs are beyond the scope of this document.

On GNU/Linux or *NIX you have to set the environment variable CVSROOT and CVS_RSH to USERNAME@little:/shome/cvs/repository and ssh respectively. Change the USERNAME to the name of the account you'll using to check out CVS modules. How this is done in practise is dependant on what shell you are using. If you are using the Bourne Again Shell (BASH) you can set the variables with the export command: export CVS_RSH=ssh. If you are using another shell consult that shell's documentation to see how variables are set.

It is usually a good idea to set at least the CVS_RSH variables in your shell configuration files so they will be automatically set for you when you login, but this is not absolutely necessary. See your shell's documentation to see what files should be edited to set this up.

Do a 'checkout' of a module

To get access to the files in a CVS module you have to do a 'checkout' on it first. Do the following:

  1. Start a terminal and enter the directory where you want the modules to be placed (as subdirectories).
  1. Set the environment variables as explained above.
  1. Run the command cvs checkout MODULE where MODULE is replaced by name of one of the modules listed above.

You will probably be prompted for a password at this stage as CVS tries to connect to the server via SSH. Enter your password and press Enter.

If your password is accepted and everything goes well you should now see a list of filenames. These are all the files that exist in the module you have just checked out. Each filename is preceded by a capital U telling you that the file has been Updated.

When all the files have been copied from the CVS server you can enter the new directory (it has the same name as the module you checked out) and start editing the files.

Checking for updates

To see if any of the other developers have submitted any changes to a module you are working on go into that module's directory and type cvs update -d. It is not necessary to set the CVSROOT variable, but you have to set CVS_RSH or CVS will not know that it should use ssh to make the connection.

The -d option specifies that any new directories should be created in your working copy of the module. It is possible to turn this on by default by adding a line with update -d to the .cvsrc file located in your home directory.

Submitting your changes

When you have finished editing the files in the module go to the top level directory for that module. There you run the command cvs commit that will contact the CVS server and 'inform' it of your changes. You will be asked to give some comments on your changes during this process.

Adding new files

CVS only works on files that has actively been added to the repository. This means that if you create new directories and files for a module you have to manually add them. This is done by issuing a cvs add FILENAME for each file or directory you have created.

Note that this should only be done for files that are actually needed by the other developers. Files that are automatically generated (dependency files made by build processes, object files etc) should not be added.

If you need to add a binary file (e.g. an image file) use the command cvs add -kb FILENAME to let the CVS server know that the file should not be searched for CVS keywords and so on.

Creating a brand new CVS module

Change directory into the root of the source code directory structure you want to add. Then to create an entirely new module on the CVS server set your CVSROOT environment variable and type the following:

  * cvs import MODULENAME VENDORTAG RELEASETAG

Be sure to use the name of your module instead of MODULENAME. The two tags will usually be your initials, e.g. sra, and the word initial.

Further information

The CVS Manual and a lot of tips and tricks can be found at:

http://www.cvshome.org/