What it is
(Subversion) is a version-control system used at ATLAS, it provides groups with a common repository and allows them to work on the same piece of code simultaneously. Repositories can be checked out, updated, versions can be merged (though that is not unproblematic). There is also the possibility of having several branches, and older versions of code are stored as revisions, or more accessible as tags.
Check out an ATLAS offline package
What you should do before you access svn (with your user name instead of sheim):
or (in case you want to access another repository):
Sometimes you might also need:
(for example for switching to trunk)
check out a directory
svn co $SVNGRP/..../dirName
update a directory
- First always do (in local copy)
- Check in
svn ci -m "message" (go to the appropriate directory)
apply a tag to your version (directly from ATLAS SVN twiki)
svn cp $SVNROOT/<path-to-package>/<package>/[trunk|branches/<branch-tag>] -r <rev> $SVNROOT/<path-to-package>/<package>/tags/<tag> -m "message"
- is the directory hierarchy to your package (which might be empty but is
MyTopLevel/MyDirectory/ in this example)
is the name of your package (
!MyPackage = in this example)
branches/depending on whether your commit was made to the trunk or to a branch.
-r denotes the revision number that was displayed from your previous commit command.
tags/ is the tags directory within your package (which is reserved for this use)
is the new package tag (e.g.
-m "message" is an optional message. If you don't supply this, the editor will be activated.
Here is an example:
svn cp $SVNOFF/PhysicsAnalysis/AnalysisCommon/InsituPerformance/InsituEGammaPerformance/trunk -r 304359 $SVNOFF/PhysicsAnalysis/AnalysisCommon/InsituPerformance/InsituEGammaPerformance/tags/InsituEGammaPerformance-00-02-28 -m "Adding Sideband functionality"
Sometimes you might need to switch from tag to trunk (as the tags are protected). You do this like:
svn switch $SVNOFF/PhysicsAnalysis/AnalysisCommon/InsituPerformance/InsituEGammaPerformance/trunk
get a repository
get access rights
make directories, remove them --> careful, I am not sure how this goes with the package structure...
svn mkdir $SVNGRP/path/SomeDirectoryName -m "Comment follows ..."
svn rm $SVNGRP/path/SomeDirectoryName -m "Comment follows ..."
add a single file
touch some_new_file #<- the file should exist before the check-in
svn add some_new_file
svn ci some_new_file -m "Checking in the file for the first time"
add a directory
svn import some_local_dir/ $SVNGRP/..../Parent_dir/DirName -m "Import ... "
rename a directory
svn move $SVNGRP/..../Parent_dir/DirName $SVNGRP/..../Parent_dir/DirNameNew
submit a package (which has cmt, requirements file)
svn mkdir $SVNGRP/path/myPackageName -m "Some comment ..."
svn import . $SVNGRP/path/myPackageName/trunk -m "Initial import"
svn mkdir . $SVNGRP/path/myPackageName/tags -m "We'll need this dir. to create tags"
- if you leave out the option "-m ...", an editor will open
- if you try to submit a package that doesn't comply to ATLAS rules
(p.ex. multiple package structure, but not every subpackage has a trunk, cmt directory), it won't let you upload it.
- 05 Mar 2010