create new tag
view all tags

Using SVN to maintain your code

How to maintain your code in LHAASO SVN (LhSVNSimpleManual is a simple manual of using SVN)



SVN space

1. The space for the LHAASO software: LhSoft SVN Space
2. The SVN space for personal software developing: People SVN Space. twiki: LhPeople
  • Code developer are strongly advised to use the personal space, before publish your code official


  • LHAASO软件的目录结构和对应开发者,总结在 LhSoftPerson
  • 你也可以点击该连接 http://svn.lhaaso.ihep.ac.cn/LodeStar/ 通过SVN查看LHAASO软件的目录结构
    • 其中的offline包含了数据分析所需要的所有package ( LhPackage
    • offline中包含三个文件夹,trunck,tags,branches
      • trunk中存储了LhSoft的整个目录结构,和所有package的多个历史版本,是pacakge阶段性发展到一定程度后由开发者copy过来的。
      • tags是trunk目录结构在某一个时间的快照,这个快照中的pacakge之间经过了自洽性检验,整个目录结构是一个可以发布的LhSoft版本。
      • branches和trunk是相同的功能,目前还没有使用的计划


  1. With the official release, you have most packages to build up your analysis code, after setup the environment as in LhSoft
  2. If you still need some package which is NEWER THAN or NOT EXIST YET in the official release, but in other developer's SVN space
  3. Develop your own package/code to compose your analysis chain (see below).


  • LHAASO合作组建了了两个SVN空间,分别为个人空间People和官方空间LodeStar,内部目录如下图所示
    • People为大家提供个人自由的使用空间,在trunk中记录个人所设计package的每日更新,例如早上checkout,编辑后晚上checkin。(方法下面详述)
    • Package阶段性成熟后,copy到tags中去,并存为唯一的版本号为名的目录中,因此随着发展会有多个版本目录存在。(方法下面详述)
    • 根据官方需要,将tags中某个版本的package,copy到官方空间LodeStar/offline/trunk的指定目录下(方法下面详述)
  • 官方空间
    • LodeStar /offline/trunk目录树是完整的LhSoft目录结构,packages从所有的code developers的tags中收集,但是不同的pacakge之间可能存在矛盾。
    • LodeStar /offline/tags存储从trunk中拷贝过来,经过验证可以运行的全部目录结构(只有管理员有权限),用于发布官方版本.
  • 个人空间和官方空间的结构和pacakge之间的关系,如下图


  • LHAASO软件的开发者,例如zhang,将要设计一个名为RawEvent的pacakge。那么如何在svn的帮助下设计和发布你的pacakge


  • 参看 LhSoft , 建立LHAASO软件环境,使用 cmt create RawEvent v0.0 产生一个RawEvent的基本目录
  • 参看 LhPackage ,了解设计pacakge的基本规则
  • 开发程序代码


  • 代码开发一定程度以后,可以导入SVN
  • 导入之前,将RawEvent中make产生的所有文件和文件夹清理干净: cmt make clean.
  • 在RawEvent上级目录中执行 svn import ./RawEvent http://svn.lhaaso.ihep.ac.cn/People/zhang/trunk/RawEvent/. -m" first time import my RawEvent to SVN"
  • 虽然导入成功后,SVN中出现了该RawEvent的内容,但是此时的./RawEvent并不是一个和svn建立了联系的文件夹,你需要
  • 继续修改RawEvent中的code,并随时通过svn commit -m"xxx"将修改同步到SVN
  • 也可以删除本地RawEvent文件夹,在其他地方checkout,修改并上传SVN
  • 参照 LhSVNSimpleManual 了解如何使用svn命令同步当地和svn文件。



The command used by manager of SVN

  1. Create an account on the SVN reponsitory: people

    • htpasswd passwdpeople zhangs //add account xxxx in SVN area people, this command used to update the password too.
    • svn mkdir -m"test" http://svn.lhaaso.ihep.ac.cn/People/zhangs. //makedir, remember use the administration's account and password.
    • vi authpeople.conf //add the following two line at the bottom
      • [/zhangs]
      • zhangs = rw

  1. for LodeStar Area
    • htpasswd passwd xxxxxx //add account xxxx in SVN area LodeStar
    • vi accesstt.conf //add the read/write for the account.

-- Chengguang ZHU - 2019-12-18


Topic attachments
I Attachment History Action Size Date Who CommentSorted ascending
PNGpng SVNstructure.png r1 manage 66.5 K 2020-04-14 - 02:53 ZhuChengguang  
Microsoft Excel Spreadsheetxlsx Structure.xlsx r2 r1 manage 15.2 K 2019-12-25 - 16:00 ZhuChengguang  
Microsoft Word filedocx svn_meger_and_commit.docx r1 manage 101.6 K 2020-01-07 - 16:09 ZhuChengguang  
Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r21 - 2020-07-01 - ZhuChengguang
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback