Introduction
This sections lists several typical tasks that users and developers will perform frequently. It implies that the SIT environment has already been setup as explained in Environment setup.
To use commands listed below it is recommended to use the psdev
gateway
ssh psdev;
check from psdev
that ssh yakut
works for you (come back to psdev
);
kindly ask Andy to add you account to our AFS group;
use correct sequence of SVN
commands.
Tasks
Switching to a different release or build options
To switch to "newest" release:
sit_setup newest
To switch to a numbered release and use debug build:
sit_setup 1.2.3 dbg
To use debug build
sit_setup dbg
Creating test release based on some numbered release
All available releases can be found in the directory SIT_RELDIR
cd <test-area>
newrel 1.2.3 test-1.2.3
cd test-1.2.3
sit_setup
Check out package from repository
To check out package HEAD
addpkg MyPackage HEAD
To check out the same tag as in the release
addpkg MyPackage
To check out specific tag
addpkg MyPackage V00-00-00
Create completely new package
This will create basic structure for a regular package - package directory, SConscript
file, doc/README
, and doc/ChangeLog
.
newpkg MyNewPackage
Create new package in Subversion
psvn newpkg MyNewPackage
and check it out
addpkg MyNewPackage
Delete package from Subversion
delpkg <package>
Check for the difference
svn diff <package>
svn diff <module>
svn diff -r HEAD
svn diff -r <tag1> -r <tag2>
svn diff -D <date>
Building the release
scons
or
scons TRACE=1
Use higher TRACE numbers for verbose output.
To run all unit tests in the release
scons test
Add / Remove modules
svn add <filename>
svn rm <filename>
Committing changes to a package
cd <package>
svn commit -m "Log message for this commit"
List existing tags for a package
cd <package>
psvn tags
or
psvn tags <package>
Creating new tag for a package
Before you create new tag run 'svn update' command:
cd <package>
svn update
psvn tag V01-02-03
or
svn update <package>
psvn -p <package> tag V01-02-03
Examples
Create a new package
This example shows how to (1) create a new release, (2) to create new package, (3) add directories and modules, (4) commit to svn, and (5) set a tag.
ssh psdev cd <directory-with-your-favorite-releases> newrel ana-current <your-release-directory> cd <your-release-directory> sit_setup psvn newpkg <new-package> addpkg <new-package> mkdir <new-package>/src codegen -l pyana-module -o <new-package>/src <new-package> <module1> or cd <new-package> mkdir <new-directory> cp <path>/<module2> <new-directory>/<module2> ... edit <module1> <module2> ... svn add <new-directory> or svn add <new-directory>/<module1> svn add <new-directory>/<module2> svn commit -m "Log message for this commit" psvn tag V01-00-01
Edit existing package
ssh psdev cd <directory-with-your-favorite-releases> newrel ana-current <your-release-directory> # or use already existing release directory cd <your-release-directory> sit_setup # To use the same release or sit_setup newest # To switch to "newest" release or sit_setup 1.2.3 dbg # To switch to a numbered release and use debug build addpkg <existing-package> # To check out the same tag as in the release or addpkg <existing-package> HEAD # To check out package HEAD (latest version) or addpkg <existing-package> V00-00-05 # To check out specific tag cd <existing-package> svn update [Edit, add remove modules and directories, build ({{scons}}), and test applications, etc...] svn commit -m "Log message for this commit" svn update # To account for possible modifications from other developers psvn tag V00-00-06 # Incremented package version tag