Intagrate Subversion into Mantis

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
cok
Posts: 1
Joined: 05 Dec 2007, 14:58

Intagrate Subversion into Mantis

Post by cok »

Hi,

I'm trying to integrate subversion into Mantis. i have read alot about it from different sources. For example:

http://alt-tag.com/blog/archives/2006/1 ... ubversion/

I'm stuck at a realy early stage...

Mantis 1.0.8 php 5.2.5, win server

When i'm trying to test the checkin.php with following ( I have an open issue in mantis (0000050):

cmd: path to "php.exe" "path to checkin.php" "issue #50".

All that happens is the console is waiting for input, I'm not that fammiliar with php but I have understod that checkin.php is waiting for stdin. So if I submits "issue #50" and hits enter it all goes well.

But shouldn't the argument I have submited in the first place be enough (i.e. i have understod it as SVN will send the argument as http request)?

config_inc.php:

Code: Select all

$g_source_control_notes_view_status = VS_PUBLIC;
$g_source_control_account = 'svn';
$g_source_control_set_status_to = RESOLVED;
$g_source_control_regexp = "/\bissue [#]{0,1}(\d+)\b/i";
In SVN I have created a post-commit.bat in my repository:

Code: Select all

REM Post-commit hook for MantisBT integration
SET REPOS=%1
SET REV=%2
SET DETAILS_FILE=C:\ToMantisFiles\svnfile_%REV%
SET LOG_FILE=C:\ToMantisFiles\svnfile_%REV%_Log
 
echo ****** Source code change ******>>%DETAILS_FILE%
svnlook log -r %REV% %REPOS%>>%DETAILS_FILE%
echo SVN Revision:%REV%>>%DETAILS_FILE%
svnlook diff -r %REV% %REPOS%>>%DETAILS_FILE%

Y:\php.exe Z:\core\checkin.php <%DETAILS_FILE% >%LOG_FILE%
DEL %DETAILS_FILE%
DEL %LOG_FILE%
When I try to commit files to my repository, nothing happens in Mantis.

Please can someone point me in a direction. I have tried a lot of solutions.

Best regards

Carl-Otto
HUN73R
Posts: 21
Joined: 26 Feb 2008, 16:27
Location: Campinas, SP - Brazil

Re: Intagrate Subversion into Mantis

Post by HUN73R »

Hi,

I have the same problem!

The svn and mantis server aren´t the same..so I´m simulating the execution using the windows cmd.

cmd =>
"path to php.exe" "path to checkin.php" issue #36 (example)

when I hit enter, nothing happens..the php seems to do nothing and Mantis doesn´t changes the issue =/

the config_inc.php contains:
$g_source_control_account = 'svn'; #as DEVELOPER
$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';

help me xD

.Mantis 1.1.1
.WinXP Pro SP2
.MySQL 5
.PHP 5.2.5

thank you!
HUN73R
Post Reply