Page 1 of 2
Integrating Mantis with a remote SVN host
Posted: 14 May 2008, 21:45
by thesoldoutactivist
This is a simple PHP script that allows you to integrate Mantis with a third party remote SVN host, such as Beanstalk, which doesn't give you the option of adding scripted hooks on your repository.
This script replaces the program svn (which is to be renamed) and allows me to still call `svn` from the command line without changing my routine (as the hooks intended all along) with the now added bonus of updating both my local mantis and the remote repository. For the timid, you can just name the script whatever and not rename svn.
The script is on my blog:
http://www.soldoutactivist.com/how-to-i ... ng-service
Re: Integrating Mantis with a remote SVN host
Posted: 28 May 2008, 06:31
by vboctor
Thanks for your contribution. Added your link to the following issue:
http://www.mantisbt.org/bugs/view.php?id=8847
Re: Integrating Mantis with a remote SVN host
Posted: 15 Oct 2008, 15:16
by jacmoe
Oops - looks like the blog is gone ..
If someone has a copy of that script (or a copy of the blog post), I'd be a very happy camper if it could be posted here - or (even better) @ the Mantis Wiki.
I want to run Mantis on my web host and connect to my SVN repository @ Sourceforge.

Re: Integrating Mantis with a remote SVN host
Posted: 16 Oct 2008, 05:17
by vboctor
You will need to use Mantis 1.2.x (latest SVN code) and the following plugin:
http://git.mantisforge.org/?p=source-in ... ;a=summary
Re: Integrating Mantis with a remote SVN host
Posted: 18 Nov 2008, 16:24
by allan
Victor, this plugin doesn't works with the stable branch 1.1.x?
I'm using version 1.1.1.
There is anyone using this plugin with sucess?
It's better and easier to get up and running than SCMBug?
Re: Integrating Mantis with a remote SVN host
Posted: 29 Nov 2008, 00:48
by vboctor
The plugins are only supported on 1.2.x releases. The good news is that the plugin supports importing history, so once you upgrade to 1.2.x, you will get all the old / new checkins linked to your bug tracker.
Re: Integrating Mantis with a remote SVN host
Posted: 25 Feb 2009, 13:33
by lvalics
Anyone can review also post
http://www.mantisbt.org/bugs/view.php?id=10160
We have added a way to submit also Tim Tracking via SVN, programmers need to report also hours spent on a task.

Re: Integrating Mantis with a remote SVN host
Posted: 05 May 2009, 19:00
by Nimitz1061
Unfortunately, the Blog article referenced in the first post has been wiped out and is no longer available.
It now appears to be next to impossible to locate a complete set of instructions on installing and configuring SVN integration on 1.1.6 and 1.1.7 installs.
My partner did chat briefly with a dev team member via IRC - and was routed to 1.2.0A3 as the solution. Question - is 1.2.0 that close to release?
I still see it as being not recommended for production use - which we need in our environment.
Currently, we're trying to setup remove SVN access using 1.1.7 but continuing to have problems. Swatted down a number of issues including configuring cURL to grab cert info for a self generated cert to use SSL access - and now each commit just drops off into never never land with no error messages found in any log, but no posting of commit data either....
Anyone have a compete instruction set available? Or just hints..
Thanks!
David
Re: Integrating Mantis with a remote SVN host
Posted: 06 May 2009, 07:25
by lvalics
Re: Integrating Mantis with a remote SVN host
Posted: 06 May 2009, 13:11
by Nimitz1061
BTW -- FWIW the post referred to here seems to be applicable to the pre-1.1.6 local only scripts. Certainly a nifty tool to have though...
David
Re: Integrating Mantis with a remote SVN host
Posted: 15 May 2009, 23:11
by Nimitz1061
Actually, no. This is intended to run on 1.2.0 -- (Currently an Alpha release) and we're sticking with 1.1.7 at the moment.
Also it uses the old checkin.php - and 1.1.6+ has a new script with a different name.
I have managed to address a number of cURL errors - and believe I've whipped that end. Now I need to figure out how to configure authorized IP addresses I think...
David
Re: Integrating Mantis with a remote SVN host
Posted: 29 May 2009, 03:05
by mryellow
http://www.mantisbt.org/bugs/view.php?id=8847
This patch to 1.1.6 doesn't appear to work.
Version 1.1.7 SVN fails.
Version 1.1.6 SVN works.
WORKS:
config-inc
Code: Select all
$g_source_control_account = 'svn';
$g_source_control_regexp = '/\b(?:bug|issue)\s*[#]{0,1}(\d+)\b/i';
$g_source_control_set_status_to = RESOLVED;
$g_source_control_set_resolution_to = FIXED;
$g_source_control_fixed_regexp = '/\bfix(?:ed|es)\s+(?:bug|issue)?\s*[#]{0,1}(\d+)\b/i';
post-commit
Code: Select all
REPOS="$1"
REV="$2"
auth=$(svnlook author -r $REV $REPOS)
dt=$(svnlook date -r $REV $REPOS)
changed=$(svnlook changed -r $REV $REPOS)
log=$(svnlook log -r $REV $REPOS)
n=$'\n'
php -q /web/path/mantis/core/checkin.php <<< "Changeset [${REV}] by $auth, $dt$n$log$n$changed"
DOESN'T WORK:
config-inc
Code: Select all
tried old commands, no documentation in ticket or elsewhere on any new variables
post-commit
Code: Select all
REPOS="$1"
REV="$2"
auth="$(svnlook author -r $REV $REPOS)"
dt="$(svnlook date -r $REV $REPOS)"
changed="$(svnlook changed -r $REV $REPOS)"
log="$(svnlook log -r $REV $REPOS)"
n=$'\n'
curl -d "user=$auth&log=Changeset [${REV}] $n$log$n$changed" http://www.example.com/mantis/core/checkincurl.php
No errors, no integration.
I've removed the htaccess deny rule which would have blocked curl from hitting checkincurl.php, however still no results.
I don't wish to use a development version 1.2 so I've gone back to 1.1.6 which works well (up to a point).
-Ben
Re: Integrating Mantis with a remote SVN host
Posted: 07 Jun 2009, 23:32
by Nimitz1061
Concur.
This feature is now non-functional and undocumented. IRC contact with team members indicates the solution is use the Alpha release instead.
Not an option in our environment, nor is reverting to 1.1.6 as we've already moved repos on basis of reports of this feature working in 1.1.7.
reconfiguring htaccess, adding source_control_server strings per project and as an array in the configuration file have been tried.
Its dead, Jim.
This is my last request for some sort of feedback before I have to go tracker shopping again.
David
Re: Integrating Mantis with a remote SVN host
Posted: 16 Jun 2009, 15:02
by Nimitz1061
Harumph.
I think I found it.
s_source_control_server needs to be an array, with all authorized servers defined. Apparently defining these in Admin on a per product basis does not work.
So, we can now get commit messages into 1.1.7.
Also necessary is a set of changes to the htaccess file in the core directory, allowing access to the curl based checkin script.
Remaining to be fixed in our case is figuring out how to enable cURL cert validation , but this is acceptable at the moment.
I'm still very happy to hear of a 1.2 release candidate in the near future.
David
Re: Integrating Mantis with a remote SVN host
Posted: 26 Jun 2009, 12:22
by crazyminsc
Hello,
we have the same problem, is there solution ? We have tried to use:
Code: Select all
$g_source_control_server = array('xx.xx.xx.xx');
but without success. In the access log is printed :
Code: Select all
[26/Jun/2009:13:58:53 +0200] "POST /mantis/core/checkincurl.php HTTP/1.1" 200 39 "-" "curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"
but those issues remain without comments

.
Thank you for the reply.
Regards