Ruby Script for SVN commit notification with log message, list of updated files and readable colored SVN Diff
Some days ago I wrote a post about “SVN commit notification” which uses a perl script for sending commit notification with svn diff by mail. In this mail you can find svn diff from the last committed revision. I used to love this mail, soon I realized that it is a bit ugly and difficult to read. Also there were some important information missing. Like the name of user committing the code, the log message etc…
And then I started writing my own ruby script for same purpose but with some addition and modification. Commit notification script is that script, you can download and configure it with your SVN post commit hook as follows.
Add following line at the bottom of your post-commit file:
* Please remember to change the path of you commit-email ruby script.
Now open commit-email ruby file and modify the following section according to your requirement:
# Subject prefix
sub = “[test_project@vinsol]” # A project ‘test_project’ is maitained at vinsol
#list of users who will recieve commit notification
recipients = ["bansalakhil30.10@gmail.com", "akhil@vinsol.com"]
# email which will appear in from email field
from_user = “svn-notify@somedomain.com”
# your smtp settings here
ActionMailer::Base.smtp_settings = { :address => ‘localhost’, :port => 25, :domain => ‘domain.com’}
# Do not edit below this line
You are done with that, now onwards whenever someone commits the code, you’ll get the commit notification mail like:
Related posts:
- Jquery Full Calendar with Ruby on Rails Contrary to popular belief, working on a client project gives...
- SSL checklist for Ruby on Rails Applications Cross posted from darthsid The purpose of SSL is to...
Related posts brought to you by Yet Another Related Posts Plugin.
-
John Philip Green



Working with Vinsol has been one of the most rewarding and productive collaborations I've ever had in the technology industry. Manik is an intelligent and honest engineer with a great faculty for open and clear communication, and his team include some of the swiftest and keenest developers I've ever had the pleasure to work with. They're great value for money, excellent people who are a joy to know and interact with, and above all they really know their stuff