<?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>Mariano Peterson &#187; svn</title>
	<atom:link href="http://petersonpages.com/mariano/blog/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://petersonpages.com/mariano/blog</link>
	<description>Software engineer. Cycling fanatic. Snowboarder. Surfer. And very proud father of two boys.</description>
	<lastBuildDate>Thu, 08 Oct 2009 05:42:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SVN notifications</title>
		<link>http://petersonpages.com/mariano/blog/2008/07/09/svn-notifications/</link>
		<comments>http://petersonpages.com/mariano/blog/2008/07/09/svn-notifications/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 03:49:44 +0000</pubDate>
		<dc:creator>Mariano</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://petersonpages.com/mariano/blog/?p=13</guid>
		<description><![CDATA[I&#8217;ve been investigating how to send notification emails when changes are committed in a Subversion repository. Two interesting options I found are svnnotify and svnmailer. svnnotify looks reasonable (read the man page). It generates HTML email with colored diffs (not as nice as Trac&#8217;s diff engine) and is configurable via CLI options to send email [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been investigating how to send notification emails when changes are committed in a Subversion repository.  Two interesting options I found are <a href="http://search.cpan.org/dist/SVN-Notify/lib/SVN/Notify.pm">svnnotify</a> and <a href="http://opensource.perlig.de/svnmailer/">svnmailer</a>.</p>
<p><span id="more-13"></span></p>
<p><a href="http://search.cpan.org/dist/SVN-Notify/lib/SVN/Notify.pm">svnnotify</a> looks reasonable (<a href="http://pwet.fr/man/linux/commandes/p/svnnotify">read the man page</a>).  It generates HTML email with colored diffs (not as nice as <a href="http://trac.edgewall.org/wiki/WikiStart?action=diff&#038;version=111">Trac&#8217;s diff engine</a>) and is configurable via CLI options to send email to different addresses based on regular expression matches against the directories affected by the commit.</p>
<p>Example: put this in &#8220;/repo/hooks/post-commit&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">REPOS</span>=<span style="color: #ff0000;">&quot;$1&quot;</span>
<span style="color: #007800;">REV</span>=<span style="color: #ff0000;">&quot;$2&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>svnnotify \
    <span style="color: #660033;">-p</span> <span style="color: #007800;">$REPOS</span> \
    <span style="color: #660033;">-r</span> <span style="color: #007800;">$REV</span> \
    <span style="color: #660033;">-C</span> <span style="color: #660033;">-d</span> <span style="color: #660033;">-H</span> HTML::ColorDiff \
    <span style="color: #660033;">--from</span> admin<span style="color: #000000; font-weight: bold;">@</span>example.com \
    <span style="color: #660033;">--reply-to</span> somebody<span style="color: #000000; font-weight: bold;">@</span>example.com \
    <span style="color: #660033;">-x</span> foo<span style="color: #000000; font-weight: bold;">@</span>example.com=<span style="color: #ff0000;">&quot;^foo/&quot;</span> \
    <span style="color: #660033;">-x</span> <span style="color: #ff0000;">&quot;team1@example.com,team2@example.com&quot;</span>=<span style="color: #ff0000;">&quot;^big_framework/&quot;</span> \
    <span style="color: #660033;">-x</span> other<span style="color: #000000; font-weight: bold;">@</span>example.com=<span style="color: #ff0000;">&quot;^one|^two|^three&quot;</span></pre></div></div>

</p>
<p>I also looked at <a href="http://opensource.perlig.de/svnmailer/">svnmailer</a> but it uses <a href="http://www.gnu.org/software/diffutils/manual/html_node/Example-Unified.html#Example%20Unified">unified diff format</a> by default which doesn&#8217;t look so nice.  You can specify your own diff script via the CLI, but I don&#8217;t know of any good ones off hand. </p>
<p>Can anyone suggest a good diff script?<br />
Anybody know offhand if <a href="http://trac.edgewall.org/">Trac</a> uses a standalone diff engine that I could hook up to svnmailer?</p>
]]></content:encoded>
			<wfw:commentRss>http://petersonpages.com/mariano/blog/2008/07/09/svn-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

