[prev in list] [next in list] [prev in thread] [next in thread]
List: trac
Subject: [Trac] post-commit hook adding to ticket, but not sending e-mail
From: David Deller <david () terrybicycles ! com>
Date: 2008-05-30 18:43:54
Message-ID: E13F455B-7E5E-4A54-ABD9-4E3EC7E762FF () terrybicycles ! com
[Download RAW message or body]
Hi there,
I'm trying to get post-commit hook working. It adds the SVN comment to
the ticket, but it doesn't send the e-mail automatically. The puzzling
part of this is:
1. Trac e-mails work fine when creating tickets, adding comments, etc.
2. The post-commit script works (both adding comment and sending e-
mail) when I run it manually from the command line
Here's the relevant part of my post-commit shell script:
> REPOS="$1"
> REV="$2"
> LOG=`/usr/local/bin/svnlook log -r $REV $REPOS`
> AUTHOR=`/usr/local/bin/svnlook author -r $REV $REPOS`
> TRAC_URL="http://trac.local/"
> TRAC_ENV="/usr/local/www/trac_main"
>
> /usr/local/bin/python /usr/local/www/svnroot/project_lance/hooks/
> trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" -u "$AUTHOR" -m
> "$LOG" -s "$TRAC_URL"
>
> #debugging trac e-mails
> echo "/usr/local/bin/python /usr/local/www/svnroot/project_lance/
> hooks/trac-post-commit-hook -p \"$TRAC_ENV\" -r \"$REV\" -u \"$AUTHOR
> \" -m \"$LOG\" -s \"$TRAC_URL\"" >> /home/david/trac_pc_debug.txt
As you can see, I'm echoing the whole thing to a file so I can test it
later. Here's an example of what I copied out of that file and ran
from the shell to test it:
> env - /usr/local/bin/python /usr/local/www/svnroot/project_lance/
> hooks/trac-post-commit-hook -p "/usr/local/www/trac_main" -r "1060" -
> u "david" -m "Added display of shipping address when requesting
> county correction. Fixes #399." -s "http://trac.local/"
I added the 'env -' part to the beginning, thinking maybe it was a
difference in the environment. But it appears not, because running
this command from the shell results in the e-mail being sent, but the
actual post-commit hook never does.
If it helps, this is running on FreeBSD 6.2, with Trac installed from
ports (0.10.4).
Any thoughts or info would be greatly appreciated.
David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic