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



Reply via email to