set access

  • set access to CERN cvs by SSH
    • export CVSROOT =
    • export CVS_RSH=ssh
  • my cvs account is: cvstopan
  • login cvstopan on and organize the reponsitory in /afs/

creat project mannual

  • see created projects at cvs project AnalysisExamples
  • create projects: (stand in the directory of AnalysisExamples)
    • cvs import -m "release 10.0.1 start point" AnalysisExamples athena10_0_1 AnalysisExamples10_0_1-0_0
    • cvs import -m "release 11.0.41 start point" AnalysisExamples athena11_0_41 AnalysisExamples11_0_41-0_0
    • cvs import -m "release 12.0.6 start point" AnalysisExamples athena12_0_6 AnalysisExamples12_0_6-0_0
  • this can be used to create project under some project
    • cvs import -m "test" AnalysisExamples/test test test1
    • cvs checkout -r test1  AnalysisExamples/test
  • just make a container directory
    • cvs import -m "project container" myAnalysisCode R0 R00
  • create projects with some files ignored
    • cvs import -I*ps -I*.gif  -m "1206vs1303" myAnalysisCode/1206.vs.1303 R0 R0_0

to Check out

  • file
  • module
    • cvs co -r AnalysisExamples11_0_41-0_0 AnalysisExamples *
    • cvs co -d mynew -r AnalysisExamples11_0_41-0_0 AnalysisExamples
    • -q quiet on output
    • -d creat and use this directory to contain this checkout release, here you will see a package named as "mynew" ,not "!AnalysisExamples", but the content is same as last command
    • Similarly, cvs co -d mynew1 -r R0_0 myAnalysisCode/Abias will not use long directory myAnalysisCode/Abias. but only put all content to "mynew1"
  • add remove file
    • cvs add file
    • cvs remove file
    • cvs commit=


set access right for other person

  • change file /afs/


use in CERN or outside of CERN

  • the example in the following is for using svn in CERN with
  • if use it outside of CERN change "svn+ssh://" to "svn+ssh://" in all the example below.
    • for example, Duyanyan has account on "ydu" the she use svn+ssh:// to access SVN

the repository

  • the main reponsitory is svn+ssh://, you can view it with web
  • directory in the repository are opened for persons, they have the write and reading right.
    • svn+ssh:// for duyanyan
    • svn+ssh:// for shaoruobin
  • to do excise, for example, ydu
    • svn mkdir svn+ssh:// to make a subdirectory and do any excise in it
    • to make a directory structure for your package saving is a good cumtom.


  • first time to check in one package, e.g. import package MyD3PD_Ana/ to name topD3PD in responsitory
    • svn mkdir svn+ssh://
    • svn mkdir svn+ssh://
    • svn import --message "Initial import" MyD3PD_Ana/ svn+ssh://
      • all the files and subdirectories in MyD3PD_Ana will be copied in to trunk as a developing code

check out

  • svn co svn+ssh:// test
    • will checkout all file and directories in "topD3PD/trunk" directory to a dir "test"


  • svn commit --message " "
    • this will only write back the changes of existing files, not add new files in working copy to reponsitory.
  • if want to add new files, use: "svn add file" and then "svn commit"

make tags

  • when code in truck has been developed for some time and is good to use, you can make a copy in the tags directory
  • svn copy --message " say something for this version" svn+ssh:// svn+ssh://
  • this is samilar that you are providing a good product to people, so you give a clear tag name.


  • This is an example of how to cooperate in code developing with "svn merge"

  • Downloading JetSelectionD3PD-00-00-06 to your working copy JetSelectionD3PD
  • if user wants to modify this package:
    • cd JetSelectionD3PD
    • svn import -m"start of JetSelectionD3PD-00-00-06 branch JetSelectionD3PD-01" svn+ssh:// //e.g it is rev 100
    • svn switch svn+ssh://
    • svn ci -m"...."
  • I will merge your modification into my JetSelectionD3PD/trunk
    • cd JetSelectionD3PD // this is my developing copy which may also changed a lot
    • svn merge svn+ssh:// svn+ssh://
    • If no conflicts ( both didn't modify the same line, it's OK, otherwise you can choose option (p), and edit after merging.
    • svn ci -m"dev"
    • make new tag
  • be careful, for each new downloaded tagged package, you should make a new branch, the old branch will be discarded.


svn: Checksum mismatch for file ...

  • backup file
  • svn delete --force file
  • cp file back
  • svn add file

error in commit:

  • error message
svn: Commit failed (details follow):
svn: Directory '/tmp/czhu/forR16Data_4/externalPac/RootCore/python/.svn' containing working copy admin area is missing

  • solution
    • mv it out and svn delete the directory
    • mv it back and svn add

  • 2
svn: Commit failed (details follow):
svn: No repository found in 'svn+ssh://'

  • solution no very good solution now svn diff to find which files need to be committed svn ci XXXXfile -m"" to check in the files one by one. remove this working copy and re-checkout all the copy.


svn: Directory 'externalPac/RootCore/python/.svn' containing working copy admin area is missing

  • solution rm externalPac/RootCore/python svn del --force externalPac/RootCore/python

but this will induce the problem 2 above.

  • 4
Transmitting file data .svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:
Some parts of your commit look suspiciously like merge
conflict markers.  Please double-check your diff and try
committing again.

  • solution some contents of the files are rejected by svn. you can commit files one by one to see which file does match the problem

*5 svn: Commit blocked by pre-commit hook (exit code 1) with output: Clash: '/xAODanalysis/trunk/MyPhysics/MyPhysics/physicsD3PD.h' '/xAODanalysis/trunk/MyPhysics/MyPhysics/PhysicsD3PD.h'

  • solution, there are two files in the same directory, which are only different in Capton letters.

*6 svn: Directory '/DMcode/trunk/configure/backupCode' is out of date

move your useful files to other place, run "svn up configure/backupCode", move your useful files back and do svn add or ci.

*7 svn ci -m"update" svn: Commit failed (details follow): svn: Aborting commit: '/afs/' remains in conflict

svn resolve MyAnalysis --accept working //according to which version you want to keep.

Edit | Attach | Watch | Print version | History: r26 < r25 < r24 < r23 < r22 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r26 - 2015-01-05 - ChengguangZhu
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback