Subversion Repository Hook : commit-email
Description:
This Post-Commit hook can be used to send a notification email describing either a commit or a revprop-change action on a Subversion repository.
Installation:
These instructions assume that you are using the subversion command line interface on a Unix system. Your process may be slightly different depending on client and operating system.
- Check out your /rice-config repository folder
svn co https://svn.rice.edu/r/REPONAME/rice_config
- Change to the rice_config folder
cd rice_config/
- Create a folder called hooks
mkdir hooks/
- Change into the hooks folder
cd hooks/
- Create a file called commit-email
vi commit-email
Configuration
The commit-email hook requires some configuration. Within the commit-email file you need to put arguments that tell the script what you want to notify on and who to notify. It will look similar to this:
no_diff_deleted=0 no_diff_added=0 notify.0.email_addresses = user1@rice.edu notify.0.from_address= fromuser1@rice.edu notify.0.reply_to = user1@pobox.com notify.0.subject_prefix = Any PROJECT COMMIT: notify.0.show_diff = 1 notify.1.email_addresses= user1@rice.edu, user2@rice.edu,user3@pobox.com notify.1.from_address= user4@pobox.com notify.1.match_regex= project1/ notify.1.reply_to = user4@pobox.com notify.1.subject_prefix = PROJECT1 COMMIT: notify.1.show_diff = 0
Argument Descriptions
- no_diff_deleted -
By default, when a file is deleted from the repository, svnlook diff
prints the entire contents of the file. If you want to save space
in the log and email messages by not printing the file, then set
no_diff_deleted to 1.