Versions Compared

Key

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

...

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;

Our standard development machine is psdev, all commands below are expected to work from this machine. Analysis farm machines should not be used for development.

Currently our repository is setup on AFS, to access it we use ssh tunnel to yakut machines. Before running SVN commands make sure that you can connect from psdev to yakut with ssh – try to run ssh yakut. To avoid password prompts from svn commands you may need to run kinit on psdev to obtain AFS token. SVN repository is accessible to accounts in a special AFS group (g-lusi), if you are not a member of this group ask Andy or Igor 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 commandsthis group.

Tasks

Switching to a different release or build options

...

addpkg MyPackage V00-00-00

Check the status of the files in package

Run this command often to see if you forgot to add any local files to repository

svn status MyPackage

Create completely new package

This will create basic structure for a regular package - package directory, SConscript file, doc/README, and doc/ChangeLog.

newpkg MyNewPackage

This command does not change anything in the repository, it only creates local directory and files.

Create new package in Subversion

...

and check it out

addpkg MyNewPackage

Delete package from Subversion

delpkg <package>

...

Add files to repository

svn add <file-or-dir> ...

If the argument is a directory then all files in that directory will be added too.

Display modifications to a package

Display all local modification in a working copy

svn diff <package>

Display all local modification to a particular file

svn diff <module>svn diff -r HEAD<package>/<file>

Display diffs between local copy and the HEAD of the package in repository

svn diff -r <tag1> -r <tag2>svn diff -D <date>HEAD <package>

For more complex cases consult SVN documentation.

Building the release

scons

...

To run all unit tests in the release

scons test

...

Remove

...

or rename files

svn add rm <filename>

svn rm mv <filename> <new-filename>

Committing changes to a package

cd svn status <package>
svn commit -m "Log message for this commit" <package>

List existing tags for a package

...

Code Block
ssh psdev
cd <directory-with-your-favorite-releases>
newrel ana-current <your-release-directory>
cd <your-release-directory>
sit_setup

psvn# create newpkglocal <new-package>package
addpkgnewpkg <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>
...

# create package in SVN and check it out
psvn newpkg <new-package>
addpkg <new-package>

# add files to repository
svn add <new-directory>
   or
svn add <new-directory>/<module1>
svn add <new-directory>/<module2>

svn commit -m "Log message for this commit" <new-package>
psvn -p <new-package> tag V01-00-01

Edit existing package

Code Block
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