subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Gatti <mauro.l...@yahoo.com>
Subject Re: post-commit script sends a void message
Date Tue, 01 Jun 2010 11:52:55 GMT
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.

Regards
Mauro


________________________________
From: Ryan Schmidt <subversion-2010b@ryandesign.com>
To: Mauro Gatti <mauro.list@yahoo.com>
Cc: users@subversion.apache.org
Sent: Tue, June 1, 2010 12:40:00 PM
Subject: Re: post-commit script sends a void message


On Jun 1, 2010, at 05:31, Mauro Gatti wrote:

> I'm trying to implement a post commit script based on svnnotify which should send an
email with some information after a commit.
> Unluckily I receive a mail with a void body.
> If I run this script manually the email message is ok but I got anyway this error:
> 
> 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.
> 
> This is my post-commit script:
> 
> 
> #!/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


      
Mime
View raw message