Monday, February 4, 2008

automated emails for specific SVN commits

I have two scripts that I plug in to SVN to notify me when changes are made to certain files. The first script should be referenced in the SVN repository's "hooks/post-commit" file, and it will call the second.

svn-diff-hist1.sh and svn-diff-hist2.sh

Usage:
svn-log-diff1.sh {REPO} {REV} {FILE_SUBSTR_REGEXP} {EMAIL}

For example:
svn-log-diff1.sh $1 $2 "trunk.*greenzone" trent.larson@icentris.com
... will email me whenever any file is checked in that has "trunk" followed by "greenzone" in it's path.

No comments: