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

Getting post-commit.tmpl to work with commit-mail.pl

From: Patrick Ben Koetter <p_at_state-of-mind.de>
Date: 2004-09-17 18:45:19 CEST

I am trying to have post-commit.tmpl trigger commit-mail.pl to send
commit messages, but it won't work.

My setup:
+ The repository is accessed through svnserve
+ svnserve is called by xinetd

# cat /etc/xinetd.d/svnserve

service svnserve
{
        port = 3690
        socket_type = stream
        protocol = tcp
        wait = no
        user = root
        disable = no
        server = /usr/bin/svnserve
        server_args = -i -r /usr/local/svn
}

Repositories:
I have choosen to run separate repositories for my projects. All of them
are located under /usr/local/svn.

Testproject:
My testproject "project1":
Everything seems to work except for the hooks (or what they trigger).

Hooks:
In /usr/local/svn/project1/hooks/post-commit.tmpl I have:

------
REPOS="$1"
REV="$2"

/usr/bin/commit-email.pl "$REPOS" "$REV" p@state-of-mind.de
# log-commit.py --repository "$REPOS" --revision "$REV"
------

Permissions:
post-commit.tmpl has the following permissions:
-rwxrw-r-- 1 svnadmin svn 1530 Sep 17 18:30 post-commit.tmpl

commit-email.pl has the following permissions:
$ ls /usr/bin/commit-email.pl
-rwxr-xr-x 1 root root 17443 Sep 15 02:17 /usr/bin/commit-email.pl

Testing:
post-commit.tmpl:
I can call ./post-commit.tmpl and it finds /usr/bin/commit-email.pl,
which will complain about "revision number `' must be an integer > 0."

This seems correct to me - I don't pass any "$REPOS" or "$REV, when I
call ./post-commit.tmpl.

/usr/bin/commit-email.pl:
If I call /usr/bin/commit-email.pl and give it all the information it
wants it works perfectly.

This is where I've got stuck. I tried different paths, because I thought
svnserve called with "-r /usr/local/svn" might cause it to be unable to
find any other paths before /usr/local/svn, but that didn't work.

Before I start fooling around I'd like to ask you on the list if there's
something obvious I am missing. Of course, I've read the Book, the FAQ
and searched the ML archives. Search engines didn't turn up anything
valuable either...

TIA

p@rick

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 17 18:46:00 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.