Maybe I found the problem.
It seems there is a problem in line 1030 in Noitify.pm
my $i = index substr($self->{message}[0], 10), '. ';
What happens if the comment I insert when I commit something is less then 10 characters and doesn't contain a period?
Thanks
Regards
Mauro
________________________________
From: Mauro Gatti <mauro.list_at_yahoo.com>
To: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Cc: users_at_subversion.apache.org
Sent: Thu, June 3, 2010 5:47:41 PM
Subject: Re: post-commit script sends a void message
Hi Ryan,
I added two flags to svnnotify:
--svnlook
--sendmail
and now i got only these two errors:
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.
Anyway now I can see a well formatted message.
Do you know why this still happens?
Thank You
Regards
Mauro
________________________________
From: Mauro Gatti <mauro.list_at_yahoo.com>
To: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Cc: users_at_subversion.apache.org
Sent: Thu, June 3, 2010 4:57:31 PM
Subject: Re: post-commit script sends a void message
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-04 08:39:50 CEST