Using the Edinburgh CVS repository

We have a CVS repository at CERN.


Basic information

CVS = Concurrent Versioning System/ Version Control System

Multiple editors for a file can quickly get confusing, especially when the authors are spread around the world.

CVS provides the answer, a backed-up, archived repository of, well, pretty much anything you wish to send to it.

Share your C++ code, your thesis, interesting papers, collaborate on code and papers with CVS!


Recommended: access the CVS server through ssh via:

adding the CVS_RSH environment variable:

  • CVSROOT ->
    • outside CERN, you will need to use
  • CVS_RSH -> ssh

The CVS server can be accessed via Kerberos IV by defining the following environmental variables:

  • CVSROOT ->

or via ssh by defining:

  • CVSROOT ->

Another useful environment variable is CVSEDITOR to control the editor application:

  • pico: CVSEDITOR -> '/usr/bin/pico'
  • emacs: CVSEDITOR -> '/usr/bin/emacs -nw'
  • if not defined, the default is VI

These variables can be set from your login shell script ( .bashrc if bash, or .cshrc cshell ) but this should not be done as default if you are wanting to use LHCb software.
The getpack script relies on and/or resets such variables. It is much safer to put an alias in your logon shell script, or use a cvs setup shell script,
see the following examples (replace username with your cern account name): - for bash:

  • CVSROOT=''
    export CVSROOT
    #This sets the CVS repository location.
    CVSEDITOR='/usr/bin/emacs -nw'
    export CVSEDITOR
    #This controls the editor application.
    export CVS_RSH
    #This tells the cvs how to access the server.
    #You should check this by:
    printenv |grep -i cvs

cvs-setup.csh - for cshell or tcshell:

  • setenv CVSROOT ''
    #This sets the CVS repository location.
    setenv CVSEDITOR '/usr/bin/emacs -nw'
    #This controls the editor application
    setenv CVS_RSH 'ssh'
    #This tells the cvs how to access the server.
    #You should check this by
    printenv |grep -i cvs

Adding a module

In order to give a structure to the CVS repository we have different directories. These directories define a context to which you can add your own modules. Currently this is the structure:

Folder Test
a test directory
Folder Analysis
Analysis code and packages i.e. Folder Bs2Jpsiphi Folder ...
Folder Thesis
Student's thesis
Folder User
users personal modules i.e. Folder cmclean Folder rlambert Folder ...
Folder Scripts
shell scripts, root scripts, etc
Folder Webpages
general group web pages
Folder EdPapers
collaboration papers

Once you have created locally a module (it can be anything, your DaVinci analysis code, your ToyMC code, your thesis ...) you are ready to import it to the repository. Tip, idea Make sure you have removed no wanted files, such as binaries, object files, or emacs backup files (ending in ~).

The following illustrates the use of the command cvs import (notice the Test/ before the module name):

<aooliver@lochnagar# cd MyModule/
<aooliver@lochnagar# ls
 exe  README  src
<aooliver@lochnagar# cvs import -m 'My new module' Test/MyModule aosorio v1
 Enter passphrase for RSA key '/Home/aooliver/.ssh/identity':
N Test/MyModule/README
 cvs import: Importing /local/reps/lhcbedinburgh/Test/MyModule/src
 N Test/MyModule/src/main.cpp
 N Test/MyModule/src/code.hh
 N Test/MyModule/src/
 cvs import: Importing /local/reps/lhcbedinburgh/Test/MyModule/exe
 N Test/MyModule/exe/options.dat

No conflicts created by this import

Tip, idea ssh-key: to access the cvs repository, you can generate a ssh-key. In the above example, I have been asked for the password to unlock this key. Once you have done this, you won't need to type in any password during a session. See for example the documentation on the LHCb Software.


Some useful commands are:

  • cvs checkout: Checkout sources for editing
  • cvs commit: Check files into the repository
  • cvs update: Bring work tree in sync with repository
  • cvs add / remove: Add/Remove an entry from the repository
  • cvs status: Display status information on checked out files
  • cvs import: Import sources into CVS

For a complete set of commands, please visit the suggested documentation.

CVS in windows

A freeware Java program called Eclipse is available for windows to browse and checkout from CVS. Eclipse provides a lot of functionality for use with CVS and much much more.

Download eclipse SDK from here.

Eclipse has lots of interfaces and perspectives for managing and editing projects and includes a nice TeX perspective and a Java/C++ integrated development environment IDE.... though you have to download these as plugins.

To add a repository to Eclipse, open the CVS repository perspective. In the CVS repositories window pane:

  • right click, new->repository location.
  • Host is,
  • repository path is /local/reps/ _projectname_,
  • enter your afs username and password,
  • select extssh as the connection.

Once a repository is added you can easily check out, update, commit CVS projects by browsing the repository and right-clicking the contents.

Opening another perspective can give you nice user-friendly text editors depending on the file type and project.

If you have existing files to publish to CVS the easiest way is to create a project using UNIX first, then copy them in.

Try it out for the lhcb project, browsing the full CVS code for Boole, Brunel etc.

Web access

Access is Disabled at the moment (sorry). Two packages CVSWEB and ViewCVS.


The CVS Librarian, Franz, Yuehong and Phil have admin rights. It means they can edit the CVSROOT directory, remove/create directories and remove locks. In addition, an account on lxplus has been created for the Librarian. The login name is cvslhcbe. Our current Librarian is AndresOsorio. The account has the afs path to the repository.

Statistics of usage of our CVS repository are available at: Statistics of usage

Support Wrench, tools

Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r21 - 2008-09-17 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback