WebSVN and post-commit hook

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
edomal
Posts: 12
Joined: Jan 31, 2012 2:58 am

WebSVN and post-commit hook

Post by edomal »

My system has the following components:

mysql 5.0.51a
PHP 5.3.5
Apache 2.2.21
mantis bt 1.2.28
SVN 1.6.17
websvn 2.3.3
plugins-source-integration 0.13.2-177

I don't succeed in viewing Diff", "file" and post-commit doesn't work.

I followed these instructions:

http://blog.crazytje.be/mantis-svn-inte ... the-1-2-x/
http://blog.crazytje.be/mantis-svn-inte ... -the-note/

My post-commit file is this:

<<
#!/bin/sh
# Copyright (c) 2010 John Reese
# Licensed under the MIT license
REPOS="$1"
REV="$2"
log=$(svnlook log -r $REV $REPOS)
URL="file:///C:/server/apache/htdocs/mantis/plugin.php?page=Source/checkin"
PROJECT="bug_repo_test"
LOG_FILE=`mktemp /tmp/svn_${PROJECT}_${REV}_log.XXX`
CURL=C:/php/ext/curl
${CURL} -d "repo_name=${PROJECT}" -d "data=${REV}" ${URL} >> ${LOG_FILE}
>>


Who can help me?

best regards, Edoardo from Italy.

atrol
Site Admin
Posts: 7835
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: WebSVN and post-commit hook

Post by atrol »

Try asking at IRC mantisbt-help or write to the mailing list
http://www.mantisbt.org/support.php
The author of the plugin (jreese) and other users of the plugin are listening at these channels.
Please use Search before posting and read the Manual

edomal
Posts: 12
Joined: Jan 31, 2012 2:58 am

Re: WebSVN and post-commit hook

Post by edomal »

atrol wrote:Try asking at IRC mantisbt-help or write to the mailing list
http://www.mantisbt.org/support.php
The author of the plugin (jreese) and other users of the plugin are listening at these channels.
I can't use chat in my work place... How do I write to the mailing list?

edomal
Posts: 12
Joined: Jan 31, 2012 2:58 am

Re: WebSVN and post-commit hook

Post by edomal »

I found these features:

in repository_update_page, in field "WebSVN URL", the right code is "http://localhost/websvn".

In this way I can use diff, file and browse.

Nevrthless I'm in trouble with post-commit hook. I''m working in windows (XP sp3), so the hook script has to ba a .bat file written in a windows good code.
in Source plug-in the post-commit.tmpl is written for linux...


Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

edomal
Posts: 12
Joined: Jan 31, 2012 2:58 am

Re: WebSVN and post-commit hook

Post by edomal »

Hi.

Thank to Alain D'EURVEILHER now everythong works. The post-commit .bat file must be like this:

@ECHO OFF
SETLOCAL
set REPOS="SVNrepo"
set REV=%2
set CHECKINURL="http://localhost/mantis/plugin.php?page=Source/checkin"
C:\server\curl.exe -d "repo_name=%REPOS%" -d "data=%REV%" -d "api_key=1" %CHECKINURL%

where api_key is the same set in the repository configuration!!!

Post Reply