[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: Mauro Gatti <mauro.list_at_yahoo.com>
Date: Thu, 3 Jun 2010 07:57:31 -0700 (PDT)

Hi Ryan,
I modified the pot-commit script as you recommended.
Last two lines contain the echo of $1 and $2.
Of course there is something wrong but I can't figure out what it is.

I got these error in the log file:

 more /tmp/post-commit.log
Use of uninitialized value in exec at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Can't exec "": No such file or directory at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Cannot exec : No such file or directory
Child process exited: 512
Use of uninitialized value in exec at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Can't exec "": No such file or directory at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Cannot exec : No such file or directory
Child process exited: 512
Use of uninitialized value in exec at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Can't exec "": No such file or directory at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Cannot exec : No such file or directory
Use of uninitialized value in substitution (s///) at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1233.
Use of uninitialized value in substitution (s///) at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1234.
Child process exited: 512
Use of uninitialized value in substr at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1303.
substr outside of string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1303.
Use of uninitialized value in index at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1303.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 1304.
Use of uninitialized value in substitution (s///) at (eval 8) line 1.
Use of uninitialized value in print at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify/HTML.pm line 323.
Use of uninitialized value in substitution (s///) at (eval 8) line 1.
Use of uninitialized value in print at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify/HTML.pm line 326.
Use of uninitialized value in exec at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Can't exec "": No such file or directory at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.8/SVN/Notify.pm line 2303.
Cannot exec : No such file or directory
Child process exited: 512
Repos= /opt/data/svn_repositories/unix
Rev= 12

Do you have any idea?

Thank You again

Regards

Mauro

________________________________
From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
To: Mauro Gatti <mauro.list_at_yahoo.com>
Cc: users_at_subversion.apache.org
Sent: Tue, June 1, 2010 11:23:39 PM
Subject: Re: post-commit script sends a void message

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-03 16:58:12 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.