wiki:SubversionTreeChange
Last modified 10 years ago Last modified on 10/21/2008 09:00:17 AM

from Subversion

LSST Guideline on Restructuring the svn Directory Layout

Policy

The Data Management svn code development tree should reflect the DM Work Breakdown Structure.

Scope

Given the policy statment above, the rest of this document provides the criteria to use when locating new products or source within the DM svn tree.

The document assumes the reader is fluent in svn use. $SVN_ROOT corresponds to the root directory of the LSST svn tree.

Introduction

In order to maintain order within the DM svn tree, developers are asked to abide by the following guidelines when adding new products or directories to the svn tree.

The root of the tree has been structured to accommodate a variety of products:

  • 3rd party source;
  • source developed or maintained by other LSST (non-DM) software groups; and
  • DM's Data Challenges.

The svn root's README file details the contents.

The development branch, DMS, corresponds to Data Management's Work Breakdown Structure. The correspondence is mapped in Dc3SvnReconfiguration.

Adding a New Product to the svn Tree

Select the appropriate section below based ont he Product and its attributes.

Third Party Product, No LSST changes envisioned

If the product only needs to be distributed via the LSST distribution system and no modification is envisioned then the code should not be installed under svn. It should be provided to the DM Build Manager for inclusion in package distribution.

Third Party Product: Minor Changes for LSST Use

  • svn import the new Product into $SVN_ROOT/vendor/<product>/trunk.
  • svn copy the new svn directory into $SVN_ROOT/vendor/<product>/<product version#>.
  • Create an empty svn directory in $SVN_ROOT/vendor/<product>/tags. This directory will eventually receive LSST-modified varients whose naming depends on the LSST version numbering convention. For example: "1.1.1 + 2" describes product distribution "1.1.1" with the LSST varient "2" applied.

An example of creating the svn product branches:

mkdir <temp_dir>
cd <temp dir>
mkdir <product>            # build product directory for import
mkdir <product>/tags       # build the empty tags
mv <local 3rd party source> <product>/trunk   # build trunk source branch
svn import -m "New Import" <product> $SVN_ROOT/vendor/<product>/

Third Party Product: Major Rewrite for LSST Integration

The product will generally be installed into the $SVN_ROOT/DMS branch.

If the product is a pipeline application, such as MOPS or Association, the product should be svn import into $SVN_ROOT/DMS/<product>/trunk. Additional empty svn directories for tags, tickets, and branches should be created.

For example:

mkdir <temp_dir>
cd <temp dir>
mkdir <product>            # build product directory for import
mkdir <product>/tags       # build the empty product branches
mkdir <product>/tickets
mkdir <product>/branches
mv <local 3rd party source> <product>/trunk   # build trunk source branch
svn import -m "New Import" <product> $SVN_ROOT/DMS/<product>/

If the product is a supporting library, such as a statistics library or visualization library, the appropriate Team Lead should determine if an appropriate framework directory already exists which should host the new library. If so, the library should be added to the selected framework directory. If a new framework directory needs to be made, please contact the Configuration Management Lead to ensure the directory for the new library product is correctly named and located according to the WBS definition.

New Code Development: Pipeline Application

The user should create a new Trac Ticket reflecting the development of new functionality.

If the new development will be a pipeline application, the developer should create the appropriate svn structure ( $SVN_ROOT/DMS/<application>/{trunk tags tickets branches}) for a new application.

Then the user should create a new Svn Ticket directory in which the new functionality will be developed: $SVN_ROOT/DMS/<application>/tickets/<Ticket#>/ .

The user will then be ready to develop his code in that Ticket directory.

Sample build procedure:

mkdir <temp_dir>
cd <temp dir>
mkdir <product>            # build product directory for import
mkdir <product>/trunk      # build the empty product branches
mkdir <product>/tags 
mkdir <product>/tickets
mkdir <product>/branches
mkdir <product>/tickets/<Ticket #>   # build TicketNumber branch for coding
svn import -m "New Import" <product> $SVN_ROOT/DMS/<product>/

New Code Development: Library Development

If the product is a supporting library, such as a statistics library or visualization library, the appropriate Team Lead should determine if an appropriate framework directory already exists which should host the new library. If so, the library should be added to the selected framework directory. If a new framework directory needs to be made, please contact the Configuration Management Lead to ensure the directory for the new library product is correctly named and located according to the WBS definition.

Moving Directories within the svn Tree

Due to the integrated nature of the LSST DM Build objects and the SVN source structure, moving a directory into a new location must be discussed with the Build Manager and the Configuration Management lead. Probably, the discussion will be expanded to the relevant development teams.

Any Questions, See …

If you have any questions on where or how to create SVN source directories, please talk to either the DM Build Manager or the DM Configuration Management lead.