<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebOnRails &#187; commit</title>
	<atom:link href="http://webonrails.com/category/commit/feed/" rel="self" type="application/rss+xml" />
	<link>http://webonrails.com</link>
	<description>Its all about Ruby On Rails</description>
	<lastBuildDate>Mon, 05 Jul 2010 16:37:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Ruby Script for SVN commit notification with log message, list of updated files and readable colored SVN Diff</title>
		<link>http://webonrails.com/2008/01/14/ruby-script-for-svn-commit-notification-with-log-message-list-of-updated-files-and-readable-colored-svn-diff/</link>
		<comments>http://webonrails.com/2008/01/14/ruby-script-for-svn-commit-notification-with-log-message-list-of-updated-files-and-readable-colored-svn-diff/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 14:17:16 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby-script]]></category>

		<guid isPermaLink="false">http://webonrails.com/2008/01/14/ruby-script-for-svn-commit-notification-with-log-message-list-of-updated-files-and-readable-colored-svn-diff/</guid>
		<description><![CDATA[Some days ago I wrote a post about &#8220;SVN commit notification&#8221; 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]]></description>
			<content:encoded><![CDATA[<p>Some days ago I wrote a post about &#8220;<a href="http://webonrails.com/2007/07/12/get-svn-commit-notification-right-into-your-inbox-by-using-svn-hook-post-commit/">SVN commit notification</a>&#8221; 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&#8230;</p>
<p>And then I started writing my own ruby script for same purpose but with some addition and modification. <a class="downloadlink" href="http://webonrails.com/wp-content/plugins/download-monitor/download.php?id=5" title="Version 1.0 downloaded 783 times" >Commit Notification Script</a> is that script, you can download and configure it with your SVN post commit hook as follows.</p>
<p>Add following line at the bottom of your post-commit file:</p>
<pre class="brush: ruby;">
/usr/bin/ruby /var/www/repositories/project/hooks/commit-email.rb &quot;$1&quot;  &quot;$2&quot;
</pre>
<p>* Please remember to change the path of you commit-email ruby script.</p>
<p>Now open commit-email ruby file and modify the following section according to your requirement:</p>
<pre class="brush: ruby;">
# You can edit below

# Subject prefix
sub = &quot;[test_project@vinsol]&quot;  # A project 'test_project' is maitained at vinsol

#list of users who will recieve commit notification
recipients = [&quot;bansalakhil30.10@gmail.com&quot;, &quot;akhil@vinsol.com&quot;]

# email which will appear in from email field
from_user = &quot;svn-notify@somedomain.com&quot;

# your smtp settings here
ActionMailer::Base.smtp_settings = { :address =&gt; 'localhost', :port =&gt; 25, :domain =&gt; 'domain.com'}

# Do not edit below this line
</pre>
<p>You are done with that, now onwards whenever someone commits the code, you&#8217;ll get the commit notification mail like:</p>
<p><a class="imagelink" href="http://webonrails.com/wp-content/uploads/2008/09/emailscreenshot.png" title="Commit Email Preview"><img id="image128" src="http://webonrails.com/wp-content/uploads/2008/09/emailscreenshot.png" alt="Commit Email Preview"  width=55%/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://webonrails.com/2008/01/14/ruby-script-for-svn-commit-notification-with-log-message-list-of-updated-files-and-readable-colored-svn-diff/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Get svn commit notification right into your inbox by using svn hook post-commit</title>
		<link>http://webonrails.com/2007/07/12/get-svn-commit-notification-right-into-your-inbox-by-using-svn-hook-post-commit/</link>
		<comments>http://webonrails.com/2007/07/12/get-svn-commit-notification-right-into-your-inbox-by-using-svn-hook-post-commit/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 19:42:21 +0000</pubDate>
		<dc:creator>Akhil Bansal</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[commit]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://webonrails.com/2007/07/12/get-svn-commit-notification-right-into-your-inbox-by-using-svn-hook-post-commit/</guid>
		<description><![CDATA[If you wish you can get notification right into your inbox when a team member commits the code. This mail will contain list of files added/deleted along with the svn diff of files that are modified. This needs some extra efforts to setup, but once it is setup it is very helpful. This can be]]></description>
			<content:encoded><![CDATA[<p>If you wish you can get notification right into your inbox when a team member commits the code. This mail will contain list of files added/deleted along with the svn diff of files that are modified. This needs some extra efforts to setup, but once it is setup it is very helpful.</p>
<p>This can be done by using svn hooks. Yes, svn has inbuilt hook functionality like pre-commit, post-commit, post-lock, post-unlock, pre-lock, pre-unlock, start-commit. We&#8217;ll use post-commit hook to get notifications.</p>
<p>First of all get a perl script from here <a href="http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/commit-email.pl.in"><strong>http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/commit-email.pl.in</strong></a> and copy it to hooks directory inside your repository directory, lets say /var/www/repos/repository_name/hooks.<br />
Make sure to rename it as commit-email.pl, ofcourse you need perl installed on your server. Now cd to hooks directory inside you repository directory. <strong>Rename post-commit.tmpl to post-commit, and chmod 755 to post-commit and commit-email.pl</strong> . Now open post-commit in you favorite editor, and put &#8220;<strong>/usr/bin/perl /var/www/repos/commit-email.pl &#8211;from svn-notify@example.com  -s &#8216;SVN commit notification&#8217;  &#8216;$REPOS&#8217; &#8216;$REV&#8217; user_whom_to_notify@example.com, another_user_to_notify@example.com</strong>&#8221; at the bottom of that file. Now open commit-email.pl and make changes in configuration section according to your requirement and server, specially svnlook path.</p>
<p>Congrats!, You are done <img src='http://webonrails.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  .</p>
<p>Now your server will send email notification to user_whom_to_notify@example.com, another_user_to_notify@example.com whenever someone commits.</p>
<p><em><strong><br />
**For security reasons, the Subversion repository executes hook scripts with an empty environment that is, no environment variables are set at all, not even $PATH or %PATH%. Because of this, a lot of administrators are baffled when their hook script runs fine by hand,but doesn&#8217;t work when run by Subversion. Be sure to explicitly set environment variables in your hook and/or use absolute paths to programs.</strong></em></p>
<p>It worked for me, Please let me know if it works for you too.</p>
]]></content:encoded>
			<wfw:commentRss>http://webonrails.com/2007/07/12/get-svn-commit-notification-right-into-your-inbox-by-using-svn-hook-post-commit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
