Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

Each project is a top-level name in the repository and has three "subdirectories" under it: trunk, branches and tags. Ordinary development occurs under trunk. A branch or a tag is defined by copying a trunk revision (normally the latest) to a named subdirectory under branches or tags  Branches are only used when a project depends on a different development line for the system (i.e. LSST).  Tags here are now obsolete.

Code Block
none
none

setenv SVNROOT file:///afs/slac/g/cci/repositories/ctkrepo
svn copy ${SVNROOT}/foo/trunk ${SVNROOT}/foo/tags/V01-20-04

svn copy ${SVNROOT}/foo/trunk ${SVNROOT}/foo/branches/experimental5

As you can see Subversion doesn't really know what branches and tags are. The division into trunk, branches and tags is a common developer convention. It's possible to check out a branch or a tag, make changes and commit just as for the trunk. Committing to tags should be done only to add required bug fixes to previously released software. Branches should be treated as fully independent lines of development which are eventually either abandoned or merged back into the trunk.

Tagging is now done with the $SVNROOT/core_tags directory.  This directory contains "snapshot" and "prod".  Each entry in both snapshot and prod corresponds to a fully buildable workspace.  Snapshots are usually snapshots of the trunk, and are tagged "YYYYMMDD_HHMM"  (like 20140702_1453).  Production tags (in prod) are tagged with VM.m.p where M==Major, m=minor and p=patch revision.   The choosing of these numbers is up to the maintainer of the release system.

Subversion copies are "smart" in the sense that they produce references back to the original; only subsequent changes made to a copy get stored there. A copy in effect produces a snapshot of the original source tree which is unaffected by subsequent changes to the original.

Anchor
checkout
checkout

To check out code to make a full build of the core software using the trunk:

Code Block
none
none

cd work
setenv SVNROOT file:///afs/slac/g/cci/repositories/ctkrepo
svn checkout ${SVNROOT}/workspace/trunk workspace
cd workspace
svn checkout ${SVNROOT}/bootstrap/trunk bootstrap
svn checkout ${SVNROOT}/cm/trunk cm
svn checkout ${SVNROOT}/configuration/trunk configuration
svn checkout ${SVNROOT}/oldPpiplatform/trunk oldPpiplatform 
svn checkout ${SVNROOT}/platformrtems/trunk platformrtems 
svn checkout ${SVNROOT}/ppiservice/trunk ppiservice 
svn checkout ${SVNROOT}/rtemstool/trunk rtemstool 
svn checkout ${SVNROOT}/servicexilinx/trunk service  xilinx 

To check out a production tag, simply do

Code Block
setenv SVNROOT file:///afs/slac/g/cci/repositories/ctkrepo
svn checkout ${SVNROOT}/tool/trunk tool 
core_tags/prod/VM.m.p

A snapshot tag can be checked out from the snapshot directory.  To make a snapshot tag, use workspace/make/tools/snapshot.shTo check out release Vxx-yy-xx substitute tags/Vxx-yy-xx for trunk.

Subversion can set so-called attributes of files such as whether to expand keywords such as $Author$ or whether to convert endline characters to native format in check-out files. Normally you want both of those inhibited for binary files. Luckily it's possible to give Subversion a configuration file enabling it to do a good job telling whether a new file is binary or not. Attached to this page is a file that you should place in ~/.subversion/config.