Subversion Integration

The Subversion integration is used to link cards in Tools For Agile to code commits in subversion.

How it works

This integration is achieved by using an svn post-commit hook which uses the Tools For Agile API to update the card.

Pre-requisites

The svn integration has the following pre-requisites that need to be installed on the same machine as the subversion server:

Download

Download the svn integration here :

Video Walkthrough

The Adobe Flash Plugin is needed to display this content.

Prerequisite Installation

  • Follow the download directions to install Python 2.7
  • Note down the location where Python is installed (in Windows, it is usually c:\Python27\python.exe)
  • Download & install Distribute. To do this -
    • Download distribute_setup from here
    • Windows:
      • Open a command prompt (Start→Run→ type cmd)
      • Run C:\Python27\python.exe distribute_setup.py
    • Linux:
      • Run python2.7 distribute_setup.py from the terminal

Installing Tools For Agile Python Library

  • Unzip the toolsforagile_python.zip file
  • Ensure that your Internet connection is active, then
    • Windows:
      • Open a command prompt (Start→Run→ type cmd)
      • Run C:\Python27\python.exe setup.py install
    • Linux:
      • Run python2.7 setup.py install from the terminal
  • This will install the library as well as download and install the dependencies (BeautifulSoup & simplejson)

Installing SVN Post Commit Hook

  • Unzip the svn post commit integration package. The package contains 3 files: post-commit.bat, scm_toolsforagile.bat and svn_toolsforagile.py
  • Look inside the subversion repository directory to find a subdirectory called hooks. Copy all three files into that directory

Configuration

  • Open the svn_toolsforagile.py file in a text editor
  • There are five configuration parameters
    • SVNLOOK: Set this to the location of the svnlook.exe file
    • COMMIT_VIEW_URL: If you can view your repository using a web interface, then put that URL here, using %s where the commit revision number should be replaced. If you don't use a web interface, then leave it blank
      • Example: If you set the value http://myserver/svn/view?id=%s then when creating the link, the integration will replace %s with the revision number and save the link. Then you can click the commit in the Card details page and go directly to view the URL
    • TOOLSFORAGILE_API_KEY: Put the API key for your workspace
    • TOOLSFORAGILE_BASE: Put the base URL of your workspace, example: http://xxxx.toolsforagile.com
    • TOOLSFORAGILE_BOARD_NAME: Put the name of the board which is linked to this repository

Test

  • Make a change to a file. Find the feature card #id of the card you want to link to (example: #1112)
  • Commit the change with the log message ”[#1112] some message”
  • The commit should occur successfully
  • Visit the Card details page in Tools For Agile to view the commit log

Troubleshooting

  • A log file called post-commit.log is created in the hooks directory. This file will have details of successful links as well as errors in case anything goes wrong. Please contact support@toolsforagile.com with the contents of this file