[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion and MantisBT integration on Win32

From: Sean Laurent <sean_at_neuronfarm.com>
Date: 2005-02-03 20:31:59 CET

On Thursday 03 February 2005 01:15 pm, Eric Seppanen wrote:
> On Fri, Jan 28, 2005 at 10:03:35AM -0600, Sean Laurent wrote:
> > I wrote a post-commit hook that extracts the Subversion log message,
> > builds the text of the bugnote (including a reference to the revision via
> > ViewCVS) and calls the checkin.php script.
> >
> > If this interests you, I would be more than willing to share the
> > post-commit script.
>
> I would like to see a copy, if you don't mind. I'm interested in trying
> this as well.

First off, I'm using the stock checkin.php that came with the Mantis 19.2
distribution. You can find in the 'core' subdirectory of the Mantis
installation.

The hook script follows below. You will most likely want to change the
variables. Hope this helps.

-Sean

-----snip-----
#!/bin/sh
REPOS="$1"
REV="$2"

#####
# Run commit message through Mantis to update bugtracking database
######
#
# URL of the ViewCVS cgi
VIEWCVS=http://dev/viewsvn

# Full pathname for svnlook
SVNLOOK_BIN=/usr/local/bin/svnlook

# Full pathname for php
PHP_BIN=/usr/local/bin/php

# The Mantis checkin script
MANTIS_CHECKIN=/home/http/mantis/core/checkin.php

# Retrieve the commit message from Subversion
COMMIT_MSG=`$SVNLOOK_BIN log -r $REV $REPOS`

#--------Begin here document-----------#
$PHP_BIN -f "$MANTIS_CHECKIN" <<zzzMantisBugNotezzz
Revision $REV: $COMMIT_MSG

$VIEWCVS?view=rev&rev=$REV
zzzMantisBugNotezzz
#----------End here document-----------#
-----snip-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 3 20:34:38 2005

This is an archived mail posted to the Subversion Users mailing list.