Skip to main content

 

 
Go Search
Home
Getting Started
Knowledge Base
Training
Discussions
Downloads
Platform SDK
  

 
 
VersionOne Community > Downloads > Integration Documentation > Subversion

 
VersionOne Subversion Integration

VersionOne Subversion Integration


Description

The VersionOne Subversion Integration (V1Svn) creates a record of Subversion changesets in VersionOne, so the development team can quickly view all of the code changes for a story or defect. This visibility can be useful when tracking down defects or performing code reviews.

Once V1Svn has been installed, development team members include a story or defect ID, such as “S-01454” in their Subversion commit messages. V1Svn checks each commit message for IDs and creates a changeset within VersionOne for each story or defect matching the entered IDs. A changeset is the collection of changes for a single revision in Subversion. The changesets for each story or defect are viewable on the details page of that item in VersionOne. Additionally, V1Svn has the capability to create link on the changeset in VersionOne that navigates to the changeset in a Subversion repository viewer.

System Requirements

VersionOne: 7.1 or above

Integration Server:

  • Operating System—Windows 2000, 2003

  • Framework—Microsoft .Net 2.0

Subversion Server:

  • Tested with Subversion 4.2

  • Protocol—svn

  • Basic SVN authentication or Anonymous

Downloads

The latest version of V1Svn is available at V1: Integration Downloads.

Installation

These installation instructions assume that Subversion is already installed, configured, and working properly.

1. Determine Install Location

V1Svn can be installed on any server with access network access to both your VersionOne installation and your Subversion repository. Exact placement should be determined by your internal software management requirements. The integation server must meet the System Requirements stated above.

2. Extract Files

Download V1Svn using the link above and extract it into a folder of your choice.

3. Configure

Open the file VersionOne.ServiceHost.exe.config in a text editor, change the configuration parameters listed below, and save your changes. For a complete description of each configuration parameters, see Hosted Service Details.

Table 1. V1Svn Configuration Parameters

ParameterDescription
RepositoryPathSubversion repository URL
UserNameSubversion user name. If omitted or empty, anonymous access will be used.
PasswordSubversion password (can be empty). If omitted, anonymous access will be used.
ApplicationUrlVersionOne installation URL
UsernameUser that will access VersionOne
PasswordPassword for the username above
IntegratedAuth*VersionOne security setting
URL**URL for your repository viewer


* When using the integrated authentication security setting, V1Svn will login to VersionOne using the Windows domain user under which the executable is running if both the username and password parameters are blank. If the username and password is entered, you must specify the windows domain account in the form "User@FullyQualifiedDomainName". If you are unsure what the fully qualified domain name is, see the Domain name shown on the 'Computer Name' tab in the My Computer...Properties dialog.

** V1Svn replaces "{0}" with the revision number. If you do not have a repository viewer delete the whole link section.

4. Start up

Open up the command prompt, navigate to your installation folder, and run the following command:

VersionOne.ServiceHost.exe

If you have configured your system properly, you should see several [Info] messages followed by a [Startup] message.

5. Test the Service

Commit a change to your Subversion repository with a message of “test”. You should see the following output:

[Info] Publishing ChangeSet: #, "test"; No References found.
[Info] No Change Set References. Ignoring Change Set: #

Commit a change to your cvs repository with a message of “S-01001”. You should see the following output:

[Info] Publishing ChangeSet: #, "S-01001"; references: S-01001

Shut down the service host by pressing “Q” in the console window.

6. Install as a Windows Service

Run the following command from the console window:

VersionOne.ServiceHost.exe --install

This command installs the service so it will will run under the account NT AUTHORITY\Local Service. Local Service must be given access privileges to the directory where the V1Svn was installed so it can store its state and write to log files. Follow the steps below to change the security on the installation directory:

  1. Right click the installation folder from Windows Explorer.

  2. Select "properties".

  3. Select the "Security" tab.

  4. Click the "Add" button.

  5. Enter "Local Service" and click "OK".

  6. Click the "Allow" checkbox for the "Full Control" row .

  7. Click "OK" to save the changes.

For more information on how the Windows Service is configured see Service Host Configuration.

Hosted Service Details

V1Svn utilizes three hosted services within the V1 Service Host framework in order to perform the integration. Each service performs a specific function and is configured by changing values in VersionOne.ServiceHost.exe.config.

SvnReaderService

The SvnReaderService watches the subversion repository for new changesets and publishes changesets that contain messages matching the specificied regular expression to the ChangeSetWriterService.

Table 2. SvnReaderService Configuration Parameters

ParameterDescription
RepositoryPathThe svn protocol path to the Subversion Repository. The repository must have anonymous read access.
ReferenceExpressionA regular expression which the service will attempt to match in the commit message.

Example 1. 

<SvnReaderService class="VersionOne.ServiceHost.SourceServices.Subversion.SvnReaderHostedService, VersionOne.ServiceHost.SourceServices" >
	<RepositoryPath>svn://MySourceControlServer/MyRepo</RepositoryPath>
	<UserName>(optional)</UserName>
	<Password>(optional)</Password>
	<ReferenceExpression>[A-Z]{1,2}-[0-9]+]</ReferenceExpression>
</SvnReaderService>

SvnReaderServiceTimer

The SvnReaderServiceTimer triggers the SvnReaderService every N milliseconds.

Table 3. SvnReaderServiceTimer Configuration Parameters

ParameterDescription
IntervalThe interval, in milliseconds, between events raised (via publishing the IntervalSync)
PublishClassContains the class and its' assembly that that the TimePublisherService will publish at every interval. For Subversion integration using SvnReaderService, it must be set as in the example below.

Example 2. 

<SvnReaderServiceTimer class="VersionOne.ServiceHost.Core.Services.TimePublisherService, VersionOne.ServiceHost.Core">
	<Interval>60000</Interval>
	<PublishClass>VersionOne.ServiceHost.SourceServices.Subversion.SvnReaderHostedService+SvnReaderIntervalSync, VersionOne.ServiceHost.SourceServices</PublishClass>
</SvnReaderServiceTimer>

ChangeSetWriterService

The ChangeSetWriterService listens for changesets published by the SubversionReaderService and updates VersionOne with the results. If a ChangeSet exists with a matching reference, it is updated to reflect the Log message from the source change, and any relationships to Workitems.

Table 4. ChangeSetWriterService Configuration Parameters

ParameterDescription
ApplicationUrlThe URL for your VersionOne application
UsernameThe VersionOne account username, if using native VersionOne security. If using Windows Integrated Security, leave empty.
PasswordThe VersionOne account password, if using native VersionOne security. If using Windows Integrated Security, leave empty.
APIVersionThe minimum application version required for this hosted service.
IntegratedAuth*False if using VersionOne native security, true is using Windows Integrated Security. If VersionOne is configured to use Windows Integrated Security, the account the service is running as must be a configured VersionOne user with a project role of Team Member or higher. Also, Username and Password should be empty if IntegratedAuth is true.
ReferenceAttributeThe VersionOne attribute that will be used as a reference for the story or defect. In most cases it should be set to Number (ID).
ChangeCommentThe change comment put into history for any modifications the service makes in VersionOne
NameThe name for the changeset link within VersionOne. {0} is replaced with the changeset id.
URLThe URL for the changeset link within VersionOne. {0} is replaced with the changeset id.
OnMenuSets the "Add to Menu" checkbox for the changeset.
AlwaysCreateFalse to only create a ChangeSet Asset if there are related workitems. True to always create ChangeSets.

Example 3. 

<ChangeSetWriterService class="VersionOne.ServiceHost.SourceServices.ChangeSetWriterService, VersionOne.ServiceHost.SourceServices">
	<Settings>
		<ApplicationUrl>http://localhost/VersionOne/</ApplicationUrl>
		<Username>admin</Username>
		<Password>admin</Password>
		<APIVersion>7.1.0.0</APIVersion>
		<IntegratedAuth>false</IntegratedAuth>
	</Settings>
	<ReferenceAttribute>Number</ReferenceAttribute>
	<ChangeComment>Updated by VersionOne.ServiceHost</ChangeComment>
	<Link>
		<Name>ChangeSet: {0}</Name>
		<URL>http://MySourceControlServer/subversion/viewvc.cgi?view=rev&amp;revision={0}</URL>
		<OnMenu>True</OnMenu>
	</Link>
	<AlwaysCreate>false</AlwaysCreate>
</ChangeSetWriterService>

Copyright © 2008, VersionOne, Inc. All rights reserved. This document was generated 2008-04-23 15:45:13.