Benutzer-Werkzeuge

Webseiten-Werkzeuge


subversion:send_commit_emails

Send Commit Mails

At first search the path for the mailer.py on FreeBSD it is:

/usr/local/share/subversion/hook-scripts/mailer/mailer.py

On Debian:

/usr/share/subversion/hook-scripts/mailer/mailer.py

I will continue with configuration for FreeBSD feel free to replace the path for other systems.

Go into your repository hook path, in my case /usr/local/svn/test/hooks

mv post-commit.tmpl post-commit
chmod +x post-commit

Now edit post-commit and add the link to the commit notify program (maybe you have to delete a link to a perl script):

/usr/local/share/subversion/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV"

Now search on your disk for the file mailer.conf.example and copy it into the conf directory under your repository:

cp /usr/local/share/subversion/hook-scripts/mailer/mailer.conf.example /usr/local/svn/test/conf/mailer.conf

Edit the file, I had to change:

mail_command = /usr/sbin/sendmail
from_addr = commit@bla
to_addr = email@bla
reply_to = commit@bla

No commit something to your repository and check if it sends mails.

Send Basic Commit Mails

In your repository on your server there is a directory hooks. Copy the file post-commit.tmpl to post-commit. Now edit it and adapt the lines, I use the following:

/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" svn-commit@<host> \
        --from svn-commit@<host>

Now make it executable. At every checkin an e-mail is sent to the above mentioned email address.

subversion/send_commit_emails.txt · Zuletzt geändert: 2013/12/16 14:12 von idefix