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

Re: post-commit script sends a void message

From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Tue, 1 Jun 2010 16:23:39 -0500

On Jun 1, 2010, at 06:52, Mauro Gatti wrote:

> Ryan Schmidt wrote on Tue, June 1, 2010 at 12:40:
>
>> On Jun 1, 2010, at 05:31, Mauro Gatti wrote:
>>
>> > #!/bin/sh
>> > MAIL_LIST="/opt/data/svn_repositories/email.list"
>> > PATH_TO_REPOS="/opt/data/svn_repositories/"
>> > REPOS="$1"
>> > REV="$2"
>> > while read line
>> > do
>> > /usr/bin/svnnotify -r "$REV" -C -d -H Alternative \
>> > --alt HTML::ColorDiff -p "$PATH_TO_REPOS$REPOS" -t "$line" \
>> > --from 'SVN @ Collaboration Server <no-reply@>'
>> > done<$MAIL_LIST
>> >
>> >
>> > Does anybody has any idea about what is happening?
>>
>> Inspect the value of the $REPOS variable. You should find it already contains the full path to the repository. Therefore perhaps you want:
>>
>>
>> #!/bin/sh
>> MAIL_LIST="/opt/data/svn_repositories/email.list"
>> REPOS="$1"
>> REV="$2"
>> while read line
>> do
>> /usr/bin/svnnotify -r "$REV" -C -d -H Alternative \
>> --alt HTML::ColorDiff -p "$REPOS" -t "$line" \
>> --from 'SVN @ Collaboration Server <no-reply@>'
>> done<$MAIL_LIST
>>
>
> Actually I added at the bottom of the script:
>
> echo "Repos= $REPOS" >> /tmp/post-commit.log
> echo "Rev= $REV" >> /tmp/post-commit.log
>
> and I checket the file so created.
> Both $REPOS and $REV seem well valorized. In particular $REPOS created as $PATH_TO_REPOS$REPOS seems well formed with a full path aspect.

Hmm. I wasn't aware it was possible for $1 to not contain the full absolute path to the repository. I wonder why in your case it isn't.

But ignoring that for a moment, I think we can assume *some* error is occurring, perhaps in the svnnotify script, and that maybe it is printing information to stderr which would be helpful in resolving it. You should try logging stderr to a file so you can see it, e.g.:

while read line
do
/usr/bin/svnnotify -r "$REV" -C -d -H Alternative \
--alt HTML::ColorDiff -p "$REPOS" -t "$line" \
--from 'SVN @ Collaboration Server <no-reply@>'
done<$MAIL_LIST 2>>/tmp/post-commit.log
Received on 2010-06-01 23:24:25 CEST

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.