Difference: SVN (1 vs. 7)

Revision 7
21 Jan 2013 - Main.BarbaraAlvarez
Line: 1 to 1
 
META TOPICPARENT name="WebHome"

What it is

Added:
>
>
  SVN (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.

How to

Line: 23 to 28
  SVNGRP=svn+ssh://svn.cern.ch/reps/atlasgrp SVNUSR=svn+ssh://svn.cern.ch/reps/atlasusr SVNROOT=svn+ssh://svn.cern.ch/reps/atlasoff
Deleted:
<
<
(for example for switching to trunk)
 
Added:
>
>
(for example for switching to trunk)
 

check out a directory

Added:
>
>
 
svn co $SVNGRP/..../dirName

update a directory

Line: 30 to 36
 
svn co $SVNGRP/..../dirName

update a directory

Changed:
<
<
  1. First always do (in local copy)
     svn update
  2. Check in
    svn ci -m "message"
    (go to the appropriate directory)
>
>
  1. First always do (in local copy)
     svn update
  2. 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"
Deleted:
<
<
where:
 
Changed:
<
<
  • <path-to-package> 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)
  • [trunk|branches/<branch-tag>]specify either trunk or branches/<branch-tag>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. MyPackage-01-02-03)
  • -m "message" is an optional message. If you don't supply this, the editor will be activated.
>
>
where:
 
Added:
>
>
  • 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)
  • [trunk|branches/]specify either trunk or 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. MyPackage-01-02-03)
  • -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" 
Line: 56 to 62
 

get a repository

Added:
>
>
  s.a.

get access rights

Added:
>
>
  s.a.
Changed:
<
<

make directories, remove them --> careful, I am not sure how this goes with the package structure...

>
>

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 ..."
Line: 90 to 102
 

Useful links

Changed:
<
<
>
>
  -- SarahHeim - 05 Mar 2010 \ No newline at end of file
Revision 6
10 Jun 2010 - Main.SarahHeim
Line: 1 to 1
 
META TOPICPARENT name="WebHome"

What it is

SVN (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.
Line: 59 to 59
  s.a.

get access rights

s.a.
Changed:
<
<

make directories, remove them

>
>

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 ..."
Line: 71 to 71
 

add a directory

svn import some_local_dir/ $SVNGRP/..../Parent_dir/DirName -m "Import ... "
Added:
>
>

rename a directory

svn move $SVNGRP/..../Parent_dir/DirName $SVNGRP/..../Parent_dir/DirNameNew
 

submit a package (which has cmt, requirements file)

cd /dir/myPackagename/
Revision 5
09 Jun 2010 - Main.SarahHeim
Line: 1 to 1
 
META TOPICPARENT name="WebHome"

What it is

SVN (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.
Line: 17 to 17
  SVNOFF=svn+ssh://sheim@svn.cern.ch/reps/atlasoff SVNUSR=svn+ssh://sheim@svn.cern.ch/reps/atlasusr
Changed:
<
<
>
>
Sometimes you might also need:
SVNOFF=svn+ssh://svn.cern.ch/reps/atlasoff
SVNGRP=svn+ssh://svn.cern.ch/reps/atlasgrp
SVNUSR=svn+ssh://svn.cern.ch/reps/atlasusr
SVNROOT=svn+ssh://svn.cern.ch/reps/atlasoff
(for example for switching to trunk)
 

check out a directory

Line: 25 to 31
 

update a directory

  1. First always do (in local copy)
     svn update
Changed:
<
<
  1. Check in
    svn ci -m "message"
>
>
  1. Check in
    svn ci -m "message"
    (go to the appropriate directory)
 

apply a tag to your version (directly from ATLAS SVN twiki)

Line: 40 to 46
 
  • is the new package tag (e.g. MyPackage-01-02-03)
  • -m "message" is an optional message. If you don't supply this, the editor will be activated.
Added:
>
>
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" 
 
Added:
>
>
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 help

Revision 4
06 Mar 2010 - Main.SarahHeim
Line: 1 to 1
 
META TOPICPARENT name="WebHome"

What it is

SVN (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.
Line: 32 to 32
 
svn cp $SVNROOT/<path-to-package>/<package>/[trunk|branches/<branch-tag>] -r <rev> $SVNROOT/<path-to-package>/<package>/tags/<tag> -m "message"
where:
Changed:
<
<
* source<path-to-package>/ is the directory hierarchy to your package (which might be empty but is sourceMyTopLevel/MyDirectory/ in this example) * source is the name of your package ( source MyPackage in this example) * source[trunk|branches/<branch-tag>] specify either source trunk or =source branches/<branch-tag>=depending on whether your commit was made to the trunk or to a branch. * source-r denotes the revision number that was displayed from your previous commit command. * source tags/ is the tags directory within your package (which is reserved for this use) * source is the new package tag (e.g. source MyPackage-01-02-03) * source-m "message" is an optional message. If you don't supply this, the editor will be activated.
>
>
  • <path-to-package> 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)
  • [trunk|branches/<branch-tag>]specify either trunk or branches/<branch-tag>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. MyPackage-01-02-03)
  • -m "message" is an optional message. If you don't supply this, the editor will be activated.
 

Revision 3
06 Mar 2010 - Main.SarahHeim
Line: 1 to 1
 
META TOPICPARENT name="WebHome"
Added:
>
>

What it is

SVN (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.
 

How to

Changed:
<
<
What you should do before any access:
>
>

Check out an ATLAS offline package

use CMT

access svn

What you should do before you access svn (with your user name instead of sheim):
 
Changed:
<
<
SVNROOT=svn+ssh://sheim@svn.cern.ch/reps/atlasgrp
>
>
SVNGRP=svn+ssh://sheim@svn.cern.ch/reps/atlasgrp or (in case you want to access another repository):
SVNOFF=svn+ssh://sheim@svn.cern.ch/reps/atlasoff
SVNUSR=svn+ssh://sheim@svn.cern.ch/reps/atlasusr
 
Added:
>
>

check out a directory

svn co $SVNGRP/..../dirName

update a directory

  1. First always do (in local copy)
     svn update
  2. Check in
    svn ci -m "message"

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"
where:

* source<path-to-package>/ is the directory hierarchy to your package (which might be empty but is sourceMyTopLevel/MyDirectory/ in this example) * source is the name of your package ( source MyPackage in this example) * source[trunk|branches/<branch-tag>] specify either source trunk or =source branches/<branch-tag>=depending on whether your commit was made to the trunk or to a branch. * source-r denotes the revision number that was displayed from your previous commit command. * source tags/ is the tags directory within your package (which is reserved for this use) * source is the new package tag (e.g. source MyPackage-01-02-03) * source-m "message" is an optional message. If you don't supply this, the editor will be activated.

get help

 

get a repository

Added:
>
>
s.a.
 

get access rights

Added:
>
>
s.a.
 

make directories, remove them

Changed:
<
<

submit a whole directory structure

submit a package

>
>
svn mkdir $SVNGRP/path/SomeDirectoryName -m "Comment follows ..."
svn rm $SVNGRP/path/SomeDirectoryName -m "Comment follows ..."
 
Added:
>
>

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" 
 
Changed:
<
<

Useful links

twiki ATLAS: https://twiki.cern.ch/twiki/bin/view/Atlas/SoftwareDevelopmentWorkBookSVN#Subversion_SVN_in_ATLAS
>
>

add a directory

svn import some_local_dir/ $SVNGRP/..../Parent_dir/DirName -m "Import ... "

submit a package (which has cmt, requirements file)

 
Added:
>
>
cd /dir/myPackagename/
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" 

Important notes

  • if you leave out the option "-m ...", an editor will open

Trouble shooting

  • 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.

Useful links

 

-- SarahHeim - 05 Mar 2010 \ No newline at end of file
Revision 2
05 Mar 2010 - Main.SarahHeim
Line: 1 to 1
 
META TOPICPARENT name="WebHome"

How to

What you should do before any access:
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback