TWiki> TOTEM Web>CompSVN (revision 10)EditAttachPDF

TOTEM SVN repository

Subversion (SVN): version control system software keeps track of all work and all changes in a set of files, and allows several developers (potentially widely separated in space and/or time) to collaborate. It is a replacement for an old version control system - CVS.


Web Tools



This is the recommended method. The repository URL (the equivalent of "CVSROOT" from CVS) is:


For users with non-standard (non-lxplus) accounts

Usually if you want use non-standard username to connect SVN server, you should type:

$ svn co svn+ssh:// totemsw

Unfortunately some parts of our code are using links (svn:external) through which non-standard usernames are not propagating. If you face such situation, for example on your local machine, with different username than your lxplus login, please follow these steps:

1. Create (if it does not exists) empty file file ~/.ssh/config with access rights 700.

2. Write to that file two lines:


Here USERNAME should be your lxplus login.

3. Fetch the code from SVN with default setup, not providing username:

$svn co svn+ssh:// totemsw


This is an alternative method, useful from outside CERN and easier to use for Windows users. The repository URL in this case is:

SVN commands

The basic commands are similar to CVS:

CVS Subversion
cvs add svn add
cvs checkout svn checkout
cvs commit svn commit
cvs rm svn rm
cvs update svn update

However, there are some new useful commands that have no direct CVS equivalents:

Command Description
svn cp old new Copies specified file or directory to a new name/location, preserving commit history
svn mv old new_ Renames/moves specified file or directory to a new name/location, preserving commit history (unlike cvs rm old ; cvs add _new)


How to fetch TOTEM offline code from SVN repository ?

The recommended method is to use svn protocol over ssh, i.e.:

$ svn co svn+ssh:// totemsw

or if you use a different user name for LXPLUS:

$ svn co svn+ssh:// totemsw

This command will check out the latest revision of the code (called trunk in SVN-speak, the equivalent of main branch in CVS) into a directory called "totemsw" in current directory.


TotemRawData is the package for reading and validating raw data. The code is used in Monitor and OfflineSW, that's why a special treatment is needed. We have decided to separate the package into a standalone project in the SVN repository: totem/trunk/TotemRawData. The package is included to Monitor and OfflineSW via svn:externals. Since most TotemRawData development is done within the Monitor framework, Monitor's external points to the HEAD revision of TotemRawData. In order to assure the OfflineSW to be kept in compiling state, its external points to a fixed revision of TotemRawData (now it is 1943 for instance).

This structure has beet set up in order to simplify the maintenance. On the other hand, unwise behavior can cause a lot of troubles. Hence, please avoid committing to TotemRawData unless you are sure that you know what you are doing. In case of any doubts, do not hesitate to ask any of the SVN repository maintainers (Leszek, Jan, etc.).

Flow of modifications

When the TotemRawData code is modified and committed within the Monitor framework, the global revision counter ticks, let's say from N to N+1. For CMSSW nothing changes as the external points to TotemRawData of revision N (or in principle any older). If you want to propagate the update also to CMSSW, do the following.

  1. Go to the src directory and run svn propedit svn:externals . and edit the revision (the -r.... parameter) according to your choice.
  2. svn up to fetch the update from Monitor.
  3. Check compilation !! In src directory do scram b.
  4. In src, do svn ci ., which would commit the modified link to TotemRawData.

When the TotemRawData code is modified and committed within the CMSSW framework, the procedure is more delicate.

  1. Commit your changes in TotemRawData: svn ci TotemRawData. This brings the update to the HEAD (of TotemRawData) advances the revision counter let's say from N to N+1. This means that the modifications are automatically and immediately ( be careful) propagated to the Monitor, but (seemingly surprisingly) not to the CMSSW - its external link still points to revision N (or any older).
  2. Readjust the external link: svn propedit svn:externals . and modify the revision to N+1. Commit the updated link: svn ci . (this would push the revision yet further to N+2, but TotemRawData code is identical in N+1 and N+2 revisions).

As stated in bold, be careful in the first step. The modifications appear immediately in the Monitor and thus (at least) its compilation should be verified right after that.

Making tags and branches

Please read the last paragraph of the chapter on svn:externals.

Edit | Attach | Watch | Print version | History: r14 | r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r10 - 2010-03-12 - LeszekGrzanka
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    TOTEM 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