After setting up an instance of SVN using the instructions I found here. I wanted to setup email notification for every commit on a SVN server. I was able to setup SVN::Notify using the tutorial on this page. When attempting to run perl -MCPAN -e 'install SVN::Notify', the install command complained that MakeMaker version is not new enough. So, I went to this CPAN page and download the module and install it before resume installing SVN::Notify. The install command complained again about a missing directory. I repeated the command and the installation completed successfully. πŸ™‚

The instruction statement on “replace the existing call to” wasn’t very clear to me. It didn’t say which file I should edit. I eventually figured out that I should make a copy of [SVN_REPOSITORY]/hooks/post-commit.tmpl file and name the new file [SVN_REPOSITORY]/hooks/post-commit. In the file, I commented out the following line: commit "$REPOS" "$REV" /path/to/mailer.conf

Next, I added the following line:

/usr/bin/svnnotify --repos-path "$1" --revision "$2" --to --user-domain mydomain

Please note that I replaced and mydomain with correct values for my environment. I also ran the following command to make it executable.

chmos +x post-commit

After completed all these, I was able to receive the email notification every time an user commit to the repository. πŸ™‚


One thought on “SVN::Notify

  1. Hi,
    Thanks a lot.
    This helped setting up email notifications for the commits.
    But I still donot receive any emails for commits.
    I get this error when I commit my code:
    Error: EHLO command failed: 220 We do not authorize the use of this system to transport unsolicited, at /usr/local/share/perl/5.12.4/SVN/ line 2374

    Any idea why this might be coming and how to solve it?

    Thanks in advance

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s