You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Koontz <dk...@mailblocks.com> on 2004/12/27 23:51:19 UTC
post-commit email hook problem with mailer.py
I have a working subversion repository that I've been using for quite
some time now and I wanted to add email notification to the post-commit
action. I copied the post-commit.tmpl file and copied the mailer.py
and mailer.conf files from the source distribution to my hooks
directory. My post-commit looks like this:
#!/bin/sh
REPOS="$1"
REV="$2"
mailer.py commit "$REPOS" "$REV" mailer.conf
In my mailer.conf I have set up my smtp host for my ISP and verified
that the diff = line is pointing to where my "diff" program is. I
tried setting the "mail_command =" line and commenting it out, no
activity either way. I have a single address for the "to_addr=" line.
I get no emails or errors in my log files. I saw the suggestion of
captureing stdout and stderr in the post-commit file with the line
mailer.py commit "$REPOS" "$REV" mailer.conf &>
/data/dev/svn/palabra/hooks/log.txt
That also did nothing so I removed the "&>
/data/dev/svn/palabra/hooks/log.txt". I am pretty stumped on why I'm
not getting any emails. I didn't think the python script was using
sendmail but I made sure it is running and able to forward an email to
the same address I have set up in mailer.conf.
TIA,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: post-commit email hook problem with mailer.py
Posted by Christopher Ness <ch...@nesser.org>.
On Mon, 2004-27-12 at 15:51 -0800, David Koontz wrote:
> I get no emails or errors in my log files. I saw the suggestion of
> captureing stdout and stderr in the post-commit file with the line
>
> mailer.py commit "$REPOS" "$REV" mailer.conf &>
> /data/dev/svn/palabra/hooks/log.txt
Try this (you need full paths, as the environment forked on a commit
doesn't know anything about path locations):
# Put header stuff here in post-commit
HOOKSDIR=/data/dev/svn/palabra/hooks
${HOOKSDIR}/mailer.py commit "$REPOS" "$REV" ${HOOKSDIR}/mailer.conf
Cheers,
Chris
--
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
19:05:16 up 6 days, 7:10, 3 users, load average: 0.22, 0.08, 0.02
http://www.fsf.org/philosophy/no-word-attachments.html
Re: post-commit email hook problem with mailer.py
Posted by John Szakmeister <jo...@szakmeister.net>.
On Monday 27 December 2004 18:51, David Koontz wrote:
> I have a working subversion repository that I've been using for quite
> some time now and I wanted to add email notification to the post-commit
> action. I copied the post-commit.tmpl file and copied the mailer.py
> and mailer.conf files from the source distribution to my hooks
> directory. My post-commit looks like this:
>
> #!/bin/sh
>
> REPOS="$1"
> REV="$2"
>
> mailer.py commit "$REPOS" "$REV" mailer.conf
Hook scripts are run in an empty environment. You need to either set
PATH, or specify the full path to mailer.py. You also need the
Subversion Python bindings installed to use mailer.py.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org