TrackStudio 3.0 Documentation
Subversion Integration

This topic describes how to integrate TrackStudio with Subversion

 

TrackStudio can be integrated with Subversion version control system through our SOAP API. Subversion check-in messages which are automatically appended to tasks. They can also be bounced by e-mail to the development team. This ensures all changes are logged. 

To implement Subversion integration: 

 

  1. Enable TrackStudio SOAP API
  2. Configure your Subversion so that the post-commit hook will call link.jar to add messages.

 

link.jar is a small utility, which enables you to add messages to the tasks specified in the message body. 

 

Usage:

 

java -jar link.jar --url <URL> --login <LOGIN> --password <PASSWORD>
  • <URL> TrackStudio server URL. The URL must be specified in full. For example, http://mycompany.com:8888/TrackStudio
  • <LOGIN> TrackStudio user Login
  • <PASSWORD> TrackStudio user Password

 

Message to be imported to TrackStudio are taken from standard input (stdin). Message will be added to the tasks specified in the message body like this: #TASK_NUMBER. E.g., message I have done #1 #2 #19 tasks which means, that this message will be added to the tasks with numbers 1, 2 and 19. 

The message, added through the link.jar utility, will have the following properties: 

 

  • submitter –- the user that has specified login.
  • message type, priority, resolution, handler -– values by default
  • deadline, budget, hours –- empty values.

 

 

To use the link.jar utility you need to add all the necessary instructions to the post-commit hook. A hook is a program triggered by some repository event, such as the creation of a new revision. Note that post-commit must be executable by the user(s) who will invoke it (typically the user httpd runs as), and that user must have filesystem-level permission to access the repository.

#!/bin/sh
REPOS="$1"
REV="$2"
SVNLOOK=/usr/local/subversion/bin/svnlook
$SVNLOOK log "$REPOS" | /usr/local/jdk/bin/java -jar /tmp/link.jar
--url http://localhost:8888/TrackStudio
--login svnLogin --password svnPassword

On a Windows system, you should name the hook program post-commit.bat

@echo off
svnlook log %1 | java -jar c:/tmp/link.jar
--url http://localhost:8888/TrackStudio
--login svnLogin --password svnPassword

• svnlook -- svnlook is a tool provided by Subversion for examining the various revisions and transactions in a repository. You should use absolute path here. 

/usr/local/jdk/bin/java -- JVM absolute path 

/tmp/link.jar -- the link.jar utility absolute path 

svnLogin -- TrackStudio user login. We recommend you add a new user in TrackStudio to work with Subversion. The user must have access to the required tasks and projects. 

svnPassword -- TrackStudio user password 

Now you can test it:

$ svn commit -m "This message should be added to the task #1 and #2."

After this check TrackStudio for new messages created via link.jar.

Copyright (c) 2002-2004. TrackStudio, Ltd. All rights reserved.