Prerequisite
The ExtraView Command Line Interface must be installed on your Subversion server and configured to point to your ExtraView server in order for the Subversion integration to function properly.
Installation
Download the following integration files from ExtraView and copy them to the hooks directory of your Subversion server:
post-commit.bat
post-commit.pl
pre-commit.bat
pre-commit.pl
Note that these scripts were written for a Windows system, although porting them to Unix should be fairly easy to do. Also, the .pl files can be placed anywhere on the system, but the .bat files must be installed in the hooks directory.
Configuration
All of the integration files must be edited and their contents adjusted for your environment:
post-commit.bat
The absolute paths to the Perl interpreter and the post-commit.pl script must be valid for your server:
C:ExtraViewPerlbinperl.exe C:svnrepositoryhookspost-commit.pl %1 %2
post-commit.pl
The absolute paths to the the svnlook program, Perl interpreter, the evupload and evupdate CLI commands must be valid for your server:
= '/subversion/bin/svnlook.exe';
= '/ExtraView/Perl/bin/perl.exe';
= '/ExtraView/Perl/evapi/evupload';
= '/ExtraView/Perl/evapi/evupdate';
The the title of the status value to update the ExtraView record with, and the titles of the STATUS and COMMENTS ExtraView fields must match your ExtraView server configuration:
= 'Fixed / Pending';
= 'Status';
= 'Comments';
pre-commit.bat
The absolute paths to the Perl interpreter and the pre-commit.pl script must be valid for your server:
C:ExtraViewPerlbinperl.exe C:svnrepositoryhookspre-commit.pl %1 %2
pre-commit.pl
The absolute paths to the the svnlook program, Perl interpreter, and the evget CLI command must be valid for your server:
= '/subversion/bin/svnlook.exe';
= '/ExtraView/Perl/bin/perl.exe';
= '/ExtraView/Perl/evapi/evget';
my = 1; # 1=debug on, 0=debug off
my = "/subversion_integration.log";
Usage
To use the Subversion integration, edit one or more files in the repository and commit the changes with the svn commit command. In the log message of the commit, you must specify the ID of an ExtraView record in the following format: Bug Id: <number> (where <number> is the ExtraView record ID). The integration first validates that the record ID specified exists in ExtraView, and then the ExtraView record is updated with the following information:
- A new attachment containing the file diff of the changes made to the commited file(s); the attachment is named diffNNNN.txt (where NNNN is an arbitrary number)
- Comments field is updated with a description of the change, including the revision, author, timestamp, and log message
- Status field is set to the value configured in the EVUPDATE_STATUS variable of the post-commit.pl script
Note that if the log message of the commit either does not contain the record ID in the format specified or the record ID is not valid, then the commit exits with an appropriate error message and no updates are made.