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.
Documentation
Web Tools
Access
Via SVN+SSH
This is the recommended method. The repository URL (the equivalent of "CVSROOT" from CVS) is:
svn+ssh://svn.cern.ch/reps/totem/
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://USERNAME@svn.cern.ch/reps/totem/trunk 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:
Host svn.cern.ch
User USERNAME
Here USERNAME should be your lxplus login.
3. Fetch the code from SVN with default setup, not providing username:
$svn co svn+ssh://svn.cern.ch/reps/totem/trunk totemsw
Via HTTPS
This is an alternative method, useful from outside CERN and easier to use for Windows users. The repository URL in this case is:
https://svn.cern.ch/reps/totem/
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) |
HOWTO
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://svn.cern.ch/reps/totem/trunk totemsw
or if you use a different user name for LXPLUS:
$ svn co svn+ssh://USERNAME@svn.cern.ch/reps/totem/trunk 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
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.
- Go to the
src
directory and run svn propedit svn:externals .
and edit the revision (the -r....
parameter) according to your choice.
-
svn up
to fetch the update from Monitor.
- Check compilation !! In
src
directory do scram b
.
- 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.
- 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).
- 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
.