hooks

You are currently browsing articles tagged hooks.

I’m using the post-commit hook to send out E-mail notifications when changes are committed to Subversion repositories.

If you search the web you’ll find a ton of scripts in various languages for this purpose. They all do more or less the same thing: create an E-mail message for the commit, including such details as the revision author, number, timestamp, a list of the paths that were changed, and a diff of the changes.

For one particular project I wanted the diff as an attachment, though, rather than inline in the message text. So I ended up writing my own script. It’s a Shell script that should work on most Unix/Linux based systems.

Click here to view the source code and installation instructions