<?xml version="1.0" encoding="utf-8"?>

<rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:cc="http://web.resource.org/cc/"
  xmlns:admin="http://webns.net/mvcb/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
> 

  <channel rdf:about="http://justatheory.com">
    <title>Just a Theory</title>
    <link>http://justatheory.com</link>
    <description>Theory waxes practical. By David Wheeler.</description>
    <language>en-us</language>
    <dc:creator>David Wheeler (david@justatheory.com)</dc:creator>
    <dc:rights>Copyright David Wheeler</dc:rights>
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <admin:generatorAgent rdf:resource="http://www.raelity.org/apps/blosxom/?v=2.0" />
    <admin:errorReportsTo rdf:resource="mailto:david@justatheory.com"/>

    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify-2.70.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify-2.57.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.56.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.50.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.41.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svn_notify_2.30.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.22.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.20.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.10.html" />
        <rdf:li rdf:resource="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.0.html" />

      </rdf:Seq>
    </items>


    <image rdf:resource="http://meerkat.oreillynet.com/icons/meerkat-powered.jpg" />

  </channel>

  <image rdf:about="http://justatheory.com/logo.gif">
    <title>Just a Theory</title>
    <url>http://justatheory.com/logo.gif</url>
    <link>http://justatheory.com</link>
  </image>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify-2.70.html">
    <title>SVN::Notify 2.70: Output Filtering and Character Encoding</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify-2.70.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2008-02-29T09:36-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>I&#x2019;m very pleased to announce the release of <a href="http://search.cpan.org/dist/SVN-Notify/" title="SVN::Notify on CPAN">SVN::Notify</a> 2.70. You can see an example of its colordiff output <a href="/computers/programming/perl/modules/svnnotify-2.70_colordiff_example.html" title="Example output from SVN::Notify::HTML::ColorDiff 2.70">here</a>. This is a major release that I&#x2019;ve spent the last several weeks polishing and tweaking to get just right. There are quite a few <a href="http://search.cpan.org/src/DWHEELER/SVN-Notify-2.70/Changes" title="SVN::Notify Changes">changes</a>, but the two most important are imporoved character encoding support and output filtering.</p>

<h3>Improved Character Encoding Support</h3>

<p>I&#x2019;ve had a number of bug reports regarding issues with character encodings. Particularly for folks working in Europe and Asia, but really for <em>anyone</em> using multibyte characters in their source code and log messages (and we all do nowadays, don&#x2019;t we?), it has been difficult to find the proper incantation to get SVN::Notify to convert data from and to their proper encodings. Using a patch from Toshikazu Kinkoh as a starting-point, and with a lot of reading and experimentation, as well as regular and patient tests on Toshikazu&#x2019;s and Martin Lindhe&#x2019;s production systems, I think I&#x2019;ve finally got it nailed down.</p>

<p>Now you can use the <code>&#x002d;&#x002d;encoding</code> (formerly <code>&#x002d;&#x002d;charset</code>), <code>&#x002d;&#x002d;svn-encoding</code>, and <code>&#x002d;&#x002d;diff-encoding</code> options—as well as <code>&#x002d;&#x002d;language</code>—to get SVN::Notify to do the right thing. As long as your Subversion server&#x2019;s OS supports an appropriate locale, you should be golden (mine is old, with no UTF-8 locales :\). And if all else fails, you can still set the <code>$LANG</code> environment variable before executing <code>svnnotify</code>.</p>

<p>There is actually a fair bit to know about encodings to get it to work properly, but if you use UTF-8 throughout and your OS supports UTF-8 locales, you shouldn&#x2019;t have to do anything. You might have to set <code>&#x002d;&#x002d;language</code> in order to get it to use the proper locale. See the new <a href="http://search.cpan.org/dist/SVN-Notify/lib/SVN/Notify.pm#Character_Encoding_Support" title="Character Encoding Support in SVN::Notify">documentation of the encoding support</a> for all the details. And if you still have problems, please do <a href="https://rt.cpan.org/Ticket/Create.html?Queue=SVN-Notify" title="Open a Ticket for SVN::Notify">let me know</a>.</p>

<h3>Output Filtering</h3>

<p>Much sexier is the addition of output filtering in SVN::Notify 2.70. I got pretty tired of getting feature requests for what are essentially formatting modifications, such as <a href="https://rt.cpan.org/Ticket/Display.html?id=26944" title="SVN::Notify feature requst for KDE keywords support">this one</a> requesting support for KDE-style <a href="http://techbase.kde.org/Policies/SVN_Commit_Policy#Special_keywords_in_SVN_log_messages" title="KDE TechBase: Special keywords in SVN log messages">keyword support</a>. I myself was using <a href="http://trac.edgewall.org/wiki/WikiFormatting" title="Trac Wiki Formatting Syntax">Trac wiki syntax</a> in commit messages on a <a href="http://iwantsandy.com/" title="Sandy: Your virtual personal assistant">recent project</a> and wanted to see them converted to HTML for messages output by SVN::Notify::HTML::ColorDiff.</p>

<p>So I finally sat down and gave some though on how to implement a simple plugin architecture for SVN::Notify. When I realized that it was generally just formatting that people wanted, it became simpler: I just needed a way to allow folks to write simple output filters. The solution I came up with was to just use Perl. Output filters are simply subroutines named for the kind of output they filter. They live in perl packages. That&#x2019;s it.</p>

<p>For example, say that your developers write their commit log messages in <a href="http://www.textism.com/tools/textile/" title="Textile">Textile</a>, and rather than receive them stuck inside <code>&lt;pre&gt;</code> tags, you&#x2019;d like them converted to HTML. It&#x2019;s simple. Just put this code in a Perl module file:</p>

<pre>
package SVN::Notify::Filter::Textile;
use Text::Textile ();

sub log_message {
    my ($notifier, $lines) = @_;
    return $lines unless $notify->content_type eq &#x0027;text/html&#x0027;;
    return [ Text::Textile->new->process( join $/, @$lines ) ];
}
</pre>

<p>Put the file, <em>SVN/Notify/Filter/Textile.pm</em> somewhere in a Perl library directory. Then use the new <code>&#x002d;&#x002d;filter</code> option to <code>svnnotify</code> to put it to work:</p>

<pre>
svnnotify -p "$1" -r "$2" &#x002d;&#x002d;handler HTML::ColorDiff &#x002d;&#x002d;filter Textile
</pre>

<p>Yep, that&#x2019;s it! SVN::Notify will find the filter module, load it, register its filtering subroutine, and then call it at the appropriate time. Of course, there are a lot of things you can filter; consult the  <a href="http://search.cpan.org/dist/SVN-Notify/lib/SVN/Notify/Filter.pm" title="SVN::Notify Output Filtering Documentation">complete documentation</a> for all of the details. But hopefully this gives you a flavor for how easy it is to write new filters for SVN::Notify. I&#x2019;m hoping that all those folks who want featurs can now stop bugging me and writing their own filters to do the job, and uploading them to CPAN for all to share!</p>

<p>To get things started, I scratched my own itch, writing a <a href="http://search.cpan.org/dist/SVN-Notify/lib/SVN/Notify/Filter/Trac.pm" title="SVN::Notify::Filter::Trac Documentation">Trac filter</a> myself. The filter is almost as simple as the Textile example above, but I also spent quite a bit of time tweaking the CSS so that most of the Trac-generated HTML looks good. You can see an example <a href="/computers/programming/perl/modules/svnnotify-2.70_trac_example.html" title="Example output from SVN::Notify 2.70 and modified by the Trac filter">right here</a>. Thanks to a number of bug fixes in  <a href="http://search.cpan.org/dist/Text-Trac/">Text::Trac</a>, as well as Trac-specific CSS added via a filter on CSS output, it works beautifully. If I&#x2019;m feeling motivated in the next week or so, I&#x2019;ll create a separate CPAN distribution with just a Markdown filter and upload it. That will create a nice distriution example for folks to copy to creat their own. Or maybe someone on the Lazy Web Will do it for me! Maybe <em>you?</em></p>

<p>I wish I&#x2019;d thought to do this from the beginning; it would have saved me from having to add so many features/cruft to SVN::Notify over the years. Here&#x2019;s a quick list of the features that likely could have been implemented via filters instead of added to the core:</p>

<ul>
  <li><code>&#x002d;&#x002d;user-domain</code>: Combine the SVN username with a domain for the <q>From</q> header.</li>
  <li><code>&#x002d;&#x002d;add-header</code>: Add a header to the message.</li>
  <li><code>&#x002d;&#x002d;reply-to</code>: Add a specific header to the message.</li>
  <li>SVN::Notify::HTML::ColorDiff: Frankly, looking back on it, I don&#x2019;t know why I didn&#x2019;t just put this support right into SVN::Notify::HTML. But even if I hadn&#x2019;t, it could have been implemented via filters.</li>
  <li><code>&#x002d;&#x002d;subject-prefix:</code>: Modify the message subject.</li>
  <li><code>&#x002d;&#x002d;subject-cx</code>: Add the commit context to the subject.</li>
  <li><code>&#x002d;&#x002d;strip-cx-regex</code>: More subject context modification.</li>
  <li><code>&#x002d;&#x002d;no-first-line</code>: Another subject filter.</li>
  <li><code>&#x002d;&#x002d;max-sub-length</code>: Yet another!</li>
  <li><code>&#x002d;&#x002d;max-diff-length</code>: A filter could truncate the diff, although this might be tricky with the HTML formatting.</li>
  <li><code>&#x002d;&#x002d;author-url</code>: Modify the metadata section to add a link to the author URL.</li>
  <li><code>&#x002d;&#x002d;revision-url</code>: Ditto for the revision URL.</li>
  <li><code>&#x002d;&#x002d;ticket-map</code>: Filter the log message for various ticketing system strings to convert to URLs. This also encompasses the old <code>&#x002d;&#x002d;rt-url</code>, <code>&#x002d;&#x002d;bugzilla-url</code>, <code>&#x002d;&#x002d;gnats-url</code>, and <code>&#x002d;&#x002d;jira-url</code> options.</li>
  <li><code>&#x002d;&#x002d;header</code>: Filter the beginning of the message.</li>
  <li><code>&#x002d;&#x002d;footer</code>: Filter the end of the message.</li>
  <li><code>&#x002d;&#x002d;linkize</code>: Filter the log message to convert URLs to links for HTML messages.</li>
  <li><code>&#x002d;&#x002d;css-url</code>: Filter the CSS to modify it, or filter the start of the HTML to add a link to an external CSS URL.</li>
  <li><code>&#x002d;&#x002d;wrap-log</code>: Reformat the log message for HTML.</li>
</ul>

<p>Yes, <em>really!</em> That&#x2019;s about half the functionality right there. I&#x2019;m glad that I won&#x2019;t have to add any more like that; filters are a <em>much</em> better way to go.</p>

<p>So download it, install it, write some filters, get your multibyte characters output properly, and enjoy! And as usual, send me your <a href="https://rt.cpan.org/Ticket/Create.html?Queue=SVN-Notify" title="Open a Ticket for SVN::Notify">bug reports</a>, but implement your own improvements using filters!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify-2.57.html">
    <title>SVN::Notify 2.57 Supports Windows</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify-2.57.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2006-04-06T23:08-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>So I finally got &#x2018;round to porting <a href="http://search.cpan.org/dist/SVN-Notify/" title="SVN::Notify on CPAN">SVN::Notify</a> to Windows. Version 2.57 is making is way to CPAN right now. The solution turned out to be dead simple: I just had to use a different form of piping <code>open()</code> on Windows, i.e., <code>open FH, &quot;$cmd|&quot;</code> instead of <code>open FH, &quot;-|&quot;; exec($cmd);</code>. It&#x2019;s silly, really, but it works. It really makes me wonder why <code>-|</code> and <code>|-</code> haven&#x2019;t been emulated on Windows. Whatever.</p>

<p>&#x2019;Course the other thing I realized, after I made this change and all the tests pass, was that there is no equivalent of <em>sendmail</em> on Windows. So I added the <code>&#x2014;smtp</code> option, so that now email can be sent to an SMTP server rather than to a local <em>sendmail</em>. I tested it out, and it seems to work, but I&#x2019;d be especially interested to hear from folks using wide characters in their repositories: do they get printed properly to Net::SMTP&#x2019;s connection?</p>

<p>The whole list of changes in 2.57 (the output remains the same as in <a href="http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.56_colordiff_example.html" title="Example output from SVN::Notify 2.56">2.56</a>):</p>

<ul>
      <li>Finally ported to Win32. It was actually a simple matter of changing
        how command pipes are created.</li>
      <li>Added <code>&#x2014;smtp</code> option to enable sending messages to an SMTP server
        rather than to the local <em>sendmail</em> application. This is essential for
        Windows support.</li>
      <li>Added <code>&#x2014;io-layer</code> to the usage statement in <em>svnnotify</em>.</li>
      <li>Fixed single-dash arguments in documentation so that they&#x2019;re all
        documented with a single dash in SVN::Notify.</li>
</ul>

<p>Enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.56.html">
    <title>SVN::Notify 2.56 Adds Alternative Formats</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.56.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2006-04-05T00:14-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>I&#x2019;ve just uploaded <a href="http://search.cpan.org/dist/SVN-Notify/" title="SVN::Notify on CPAN">SVN::Notify</a> 2.56 to CPAN. Check a mirror near you! There have been a lot of changes since I last posted about SVN::Notify (for the <a href="/computers/programming/perl/modules/svnnotify_2.50.html" title="SVN::Notify 2.50 Announcement">2.50 release</a>), not least of which is that SourceForge has <a href="http://sourceforge.net/docs/E09#svn_notify" title="SourceForge: Commit Notifications via Email (SVN::Notify)">standardized on it</a> for their Subversion roll out. W00t! The result was a couple of patches from SourceForge&#x2019;s David Burley to add headers and footers and to truncate diffs over a certain size. See the <a href="http://www.justatheory.com/computers/programming/perl/modules/svnnotify-2.56_colordiff_example.html" title="Example output from SVN::Notify 2.56">sample output</a> for how it looks. Thanks, David!</p>

<p>The change I&#x2019;m most pleased with in 2.56 is the addition of SVN::Notify::Alternative, based on a submission from Jukka Zitting. This new subclass allows you to actually combine a number of other subclasses into a single activity notification message. Why? Well, mainly because, though you might like to get HTML messages with colorized diffs, some mail clients might not care for the HTML. They would much prefer the plain text version.</p>

<p>SVN::Notify::Alternative allows you to have your cake and eat it too: send a single message with <code>multipart/alternative</code> sections for both HTML output and plain text. Plain text will always be used; to use HTML::ColorDiff with it, just do this:</p>

<pre>
svnnotify &#x2014;repos-path &quot;$1&quot; &#x2014;revision &quot;$2&quot; \
  &#x2014;to developers@example.com &#x2014;handler Alternative \
  &#x2014;alternative HTML::ColorDiff &#x2014;with-diff
</pre>

<p>This incantation will send an email with both the plain text and HTML::ColorDiff formats. If you look at it in Mail.app, you&#x2019;ll see the nice colorized format, and if you look at it in <code>pine</code>, you&#x2019;ll see the plain text.</p>

<p>For the curious, here are all of the changes since 2.50:</p>

<dl>
  <dt>2.56  2006-04-04T23:16:37</dt>
  <dd>
    <ul>
      <li>Abstracted creation of the diff file handle into the new <code>diff_handle()</code>
        method.</li>
      <li>Documented use of <code>diff_handle()</code> in the output() method.</li>
      <li>Added optional second argument to <code>output()</code> to optionally suppress the
        output of the email headers. This argument is used by the new
        Alternative subclass.</li>
      <li>Added SVN::Notify::Alternative, which allows multiple versions of a
        commit email to be sent, such as text/plain plus HTML. The multiple
        versions are assembled into a single email message using the
        multipart/alternative media type. For those who want HTML messages but
        must support users that can only read plain text or rely on archives
        that ignore HTML messages, this can be very useful. Based on an
        implementation by Jukka Zitting.</li>
      <li>Fixed <code>use_ok()</code> tests that weren&#x2019;t running at all.</li>
      <li>Added an extra newline to separate the file list from an inline diff
        in the plain text format where <code>&#x2014;with-diff</code> has been specified.</li>
      <li>Moved the <code>multipart/mixed</code> content-type header generation from
        <code>output_headers()</code> to <code>output_content_type()</code>, not only because this makes
        more sense, but also because it makes attachments behave better when
        using SVN::Notify::Alternative.</li>
      <li>Documented accessors in SVN::Notify::HTML.</li>
    </ul>
  </dd>

  <dt>2.55  2006-04-03T23:11:11</dt>
  <dd>
    <ul>
      <li>Added the <code>io-layer</code> option to specify an alternate IO layer. Will be
        most useful for those with repositories containing text in multiple
        encodings, where it should be set to <q>raw</q>.</li>
      <li>Fixed the context output in the subject for the <code>&#x2014;subject-cx</code> option
        so that it&#x2019;s smarter about determining the longest common path.
        Reported by Max Horn.</li>
      <li>No longer modifying the values of the <code>to_regex_map</code> hash, so as not
        to mess with folks who might be passing it as a hash to more than one
        call to <code>new()</code>. Reported by Darby Felton.</li>
      <li>Added a <code>meta http-equiv=&quot;content-type&quot;</code> tag to HTML output that
        includes the character set to help some clients in the proper display
        of the characters in an HTML email. I&#x2019;m not sure if any clients
        actually need this help, but it certainly can&#x2019;t hurt!</li>
      <li>Added the <code>&#x2014;css-url</code> option to specify an alternate style sheet for
        HTML emails. SVN::Notify::HTML&#x2019;s own CSS is left in the email, as
        well, so the specified style sheet can just override the default,
        rather than have to style everything itself. Yes, it takes advantage
        of the <q>cascading</q> feature of cascading style sheets! Based on a
        suggestion by Steve James.</li>
    </ul>
  </dd>

  <dt>2.54  2006-03-06T00:33:42</dt>
  <dd>
    <ul>
      <li>Added <em>/usr/bin</em> to the list of paths searched for executables.
        Suggested by Nacho Barrientos.</li>
      <li>Added <code>&#x2014;max-diff-length</code> option. Patch from David Burley/SourceForge.</li>
    </ul>
  </dd>

  <dt>2.53  2006-02-24T21:30:48</dt>
  <dd>
    <ul>
      <li>Added <code>header</code> and <code>footer</code> attributes and command-line options to
        specify text to be put at the head and foot of each message. For HTML
        messages, the text will be escaped, unless it starts with <q>&lt;</q>, in
        which case it will be assumed to be valid HTML and will therefore not
        be escaped. Either way, it will be output between <code>&lt;div&gt;</code> tags with the
        IDs <q>header</q> or <q>footer</q> as appropriate. Based on a patch from David
        Burley/SourceForge.</li>
      <li>Fixed the executable-searching algorithm added in 2.52 to add <q>.exe</q>
        to the name of the executable being searched for if <code>$^O eq &#x0027;MSWin32&#x0027;</code>.</li>
      <li>Fixed encoding issues so that, under Perl 5.8 and later, the IO layer
        is set on file handles so as to encode input and decode output in the
        character set specified by the <code>charset</code> attribute. CPAN # 16050,
        reported by Michael Zehrer.</li>
      <li>Added a second argument to all calls to <code>encode_entities()</code> in
        SVN::Notify::HTML and SVN::Notify::HTML::ColorDiff so that only &#x0027;&gt;&#x0027;.
        &#x0027;&lt;&#x0027;, &#x0027;&amp;&#x0027;, and &#x0027;&quot;&#x0027; are escaped.</li>
      <li>Fixed a bug in the <code>_find_exe()</code> function that was attempting to modify
        a constant variable. Patch from John Peacock.</li>
      <li>Turned the <code>_find_exe()</code> function into the <code>find_exe()</code> class method,
        since subclasses (such as SVN::Notify::Mirror) might want to use it.</li>
    </ul>
  </dd>

  <dt>2.52  2006-02-19T18:50:24</dt>
  <dd>
    <ul>
      <li>Now uses <code>File::Spec-&gt;path</code> to search for a validate <em>sendmail</em> or <em>svnlook</em>
        when they&#x2019;re not specified via their respective command-line options or
        environment variables. Suggested by Andreas Koenig. Not that they
        should probably be explicitly set anyway, as the <code>$PATH</code> environment
        variable tends to be non-existent when running under Apache.</li>
    </ul>
  </dd>

  <dt>2.51  2006-01-02T23:28:11</dt>
  <dd>
    <ul>
      <li>Fixed ColorDiff HTML to once again be valid XHTML 1.1.</li>
    </ul>
  </dd>
</dl>

<p>Enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.50.html">
    <title>SVN::Notify 2.50</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.50.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2005-11-11T00:23-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>Here are all of the changes since the last version:</p>

<dl>

  <dt>2.50  2005-11-10T23:27:22</dt>
  <dd>
    <ul>
      <li>Added <code>&#x2014;ticket-url</code> and <code>&#x2014;ticket-regex</code>
        options to be used by those who want to match ticket identifers for
        systems other than RT, Bugzilla, GNATS, and JIRA. Based on a patch
        from Andrew O&#x2019;Brien.</li>
      <li>Removed bogus <code>use lib</code> line put
        into <em>Makefile.PL</em> by a prerelease version of Module::Build.</li>
      <li>Fixed HTML tests to match either <q>&#x0027;</q>
        or <q>&amp;#39;</q>, since HTML::Entities can be configured
        differently on different systems.</li>
    </ul>
  </dd>

  <dt>2.49  2005-09-29T17:26:14</dt>
  <dd>
    <ul>
      <li>Now require Getopt::Long 2.34 so that
        the <code>&#x2014;to-regex-map</code> option works correctly when it is used
        only once on the command-line.</li>
    </ul>
  </dd>

  <dt>2.48  2005-09-06T19:14:35</dt>
  <dd>
    <ul>
      <li>Swiched from <code>&lt;span class=&quot;add&quot;&gt;</code> and
        <code>&lt;span class=&quot;rem&quot;&gt;</code>
        to <code>&lt;ins&gt;</code> and <code>&lt;del&gt;</code> elements in
        SVN::Notify::HTML::ColorDiff in order to make the markup more
        semantic.</li>
    </ul>
  </dd>

  <dt>2.47  2005-09-03T18:54:43</dt>
  <dd>
    <ul>
      <li>Fixed options tests to work correctly with older versions of
        Getopt::Long. Reported by Craig McElroy.</li>
      <li>Slick new CSS treatment used for the HTML and HTML::ColorDiff emails.
        Based on a patch from Bill Lynch.</li>
      <li>Added <code>&#x2014;svnweb-url</code> option. Based on a patch from
      Ricardo Signes.</li>
    </ul>
  </dd>

  <dt>2.46  2005-05-05T05:22:54</dt>
  <dd>
    <ul>
      <li>Added support for <q>Copied</q> files to HTML::ColorDiff so that
        they display properly.</li>
    </ul>
  </dd>

  <dt>2.45  2005-05-04T20:38:18</dt>
  <dd>
    <ul>
      <li>Added support for links to
        the <a href="http://www.gnu.org/software/gnats/" title="GNATS: The GNU
        Bug Tracking System">GNATS</a> bug tracking system. Patch from Nathan
        Walp.</li>
    </ul>
  </dd>

  <dt>2.44  2005-03-18T06:10:01</dt>
  <dd>
    <ul>
      <li>Fixed Name in POD so that SVN::Notify&#x2019;s POD gets indexed by
        <a href="http://search.cpan.org/" title="CPAN
        Search">search.cpan.org</a>. Reported by Ricardo Signes.</li>
    </ul>
  </dd>

  <dt>2.43  2004-11-24T18:49:40</dt>
  <dd>
    <ul>
      <li>Added <code>&#x2014;strip-cx-regex</code> option to strip out parts of the
        context from the subject. Useful for removing parts of the file names
        you might not be interested in seeing in every commit message.</li>
      <li>Added <code>&#x2014;no-first-line</code> option to omit the first sentence
        or line of the log message from the subject. Useful in combination
        with the <code>&#x2014;subject-cx</code> option.</li>
    </ul>
  </dd>

  <dt>2.42  2004-11-19T18:47:20</dt>
  <dd>
    <ul>
      <li>Changed <q>Files</q> to <q>Paths</q> in hash returned by
        <code>file_label_map()</code> since directories can be listed as well
        as files.</li>
      <li>Fixed SVN::Notify::HTML so that directories listed among the
        changed paths are not links.</li>
      <li>Requiring Module::Build 0.26 to make sure that the installation
        works properly. Reported by Robert Spier.</li>
    </ul>
  </dd>
</dl>

<p>Enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.41.html">
    <title>SVN::Notify 2.41 Adds Plain Text Issue Tracking Links</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.41.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-21T20:52-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>First, I&#x2019;ve added a new, <a href="/computers/programming/perl/modules/svnnotify-2.40_colordiff_example.html" title="SVN::Notify 2.41 sample ColorDiff output">complex example</a> of the SVN::Notify::HTML::ColorDiff output that I will keep up-to-date with all future changes. This will allow people to get a better idea of what it&#x2019;s capable of than my previous contrived examples allowed.</p>

<p>The biggest change is that I&#x2019;ve moved the <a href="http://www.bestpractical.com/rt/" title="RT at Best Practical">Request Tracker</a>, <a href="http://bugzilla.mozilla.org/" title="Bugzilla home page">Bugzilla</a>, and <a href="http://www.atlassian.com/software/jira/" title="JIRA Website">JIRA</a> support from SVN::Notify::HTML to SVN::Notify. I realized, after the release of 2.30, that it might be cool to add links to the text-only email message generated by SVN::Notify, too. So I&#x2019;ve done that, including for ViewCVS links. Unlike in SVN::Notify::HTML, the links won&#x2019;t be inline in the message (that doesn&#x2019;t work too well in plain text, IMO), but will come in their own sections after the message. So you&#x2019;ll get something like this (extreme example):</p>

<pre>Log Message:
&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;
Let&#x2019;s try a few links to other applications. First, we have
A Bugzilla Bug # 709. Then we have a JIRA key, TST-1608. And
finally, we have an RT link to Ticket # 4321.

Hey, we could add one to ViewCVS for a Subversion Revision
#606, too!

ViewCVS Links:
&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;
    http://viewsvn.bricolage.cc/?rev=606&amp;view=rev

Bugzilla Links:
&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;
    http://bugzilla.mozilla.org/show_bug.cgi?id=709

RT Links:
&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;
    http://rt.cpan.org/NoAuth/Bugs.html?id=4321

JIRA Links:
&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;&#x002d;
    http://jira.atlassian.com/secure/ViewIssue.jspa?key=TST-1608
</pre>

<p>The nice thing is that, for many mail clients, these will be turned into clickable links. You&#x2019;ll also notice that the text that creates the ViewCVS link is split over two lines. This is new in this release, and works for SVN::Notify::HTML, too. I made a few other tweaks to the regular expressions, as well. Here&#x2019;s a complete list of changes:</p>

<ul>
  <li>Fixed accessor generation so that accessors created for the
        attributes passed to <code>register_attributes()</code> but a subclass are
        created in the subclass&#x2019; package instead of in SVN::Notify.</li>
  <li>Changed parsing for JIRA keys to use any set of capital letters
        followed by a dash and then a number, rather than the literal
        string <q>JIRA-</q> followed by a number. Reported by Garrett Rooney.</li>
  <li>Modified the regular expression patterns for the RT, Bugzilla,
        RT, and ViewCVS links to properly match on word boundaries, so
        that strings like <q>humbug 12</q> don&#x2019;t match.</li>
  <li>Modified the ViewCVS link regular expression pattern so that it
        matches strings like <q>rev 12</q> as well as <q>revision 12</q>.</li>
  <li>Modified the RT link regular expression pattern so that it
        matches strings like <q>RT-Ticket: 23</q> as well as <q>Ticket 1234</q>.
        Suggested by Jesse Vincent.</li>
  <li>Added complicated example to try to show off all of the major
        features. I will keep this up-to-date going forward in order to
        post sample output on the Web.</li>
  <li>Fixed the parsing of log messages so that empty lines are no
        longer eliminated.</li>
  <li>HTML::ColorDiff now properly handles the listing of binary files
        in the diff, marking them with a new class, <q>binary</q>, and using
        the same CSS as is used for the <q>propset</q> class.</li>
  <li>In HTML::ColorDiff, Fixed CSS for the <q>delfile</q> class to properly
        wrap it in a border like the other files in the diff.</li>
  <li>Added labels to the HTML::ColorDiff diff file sections to indicate
        the type of change (<q>Modified</q>, <q>Added</q>, <q>Deleted</q>, or <q>Property
        changes</q>).</li>
  <li>Moved the <code>rt_url</code>, <code>bugzilla_url</code>, and <code>jira_url</code> parameters from
        SVN::Notify::HTML to SVN::Notify, where they are used to add URLs
        to the text version of log messages.</li>
</ul>

<p>Enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svn_notify_2.30.html">
    <title>SVN::Notify 2.30 Adds Issue Tracking Links</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svn_notify_2.30.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-19T23:40-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>First, and most obviously from the point of view of users of the HTML subclass, I&#x2019;ve added new options for specifying <a href="http://www.bestpractical.com/rt/" title="RT at Best Practical">Request Tracker</a>, <a href="http://bugzilla.mozilla.org/" title="Bugzilla home page">Bugzilla</a>, and <a href="http://www.atlassian.com/software/jira/" title="JIRA Website">JIRA</a> URLs. The <code>&#x2014;rt-url</code>, <code>&#x2014;bugzilla-url</code>, and <code>&#x2014;jira-url</code> options have an effect much like the parallel feature in <a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="CVSspam Home Page">CVSspam</a>: pass in a string with the spot for the ID represented by <code>%s</code>, such as <code>http://rt.cpan.org/NoAuth/Bugs.html?id=%s</code> for RT or <code>http://bugzilla.mozilla.org/show_bug.cgi?id=%s</code> for Bugzilla. SVN::Notify::HTML will then look for the appropriate strings (such as <q>Ticket # 1234</q> for RT or <q>Bug # 4321</q> for Bugzilla) and turn them into URLs.</p>

<p>This functionality has been extended to the old <code>&#x2014;viewcvs-url</code> option, to. For the sake of consistency, it now also requires a URL of the same form (although if SVN::Notify doesn&#x2019;t see <code>%s</code> in the string, it will append a default and emit a warning), and will be used to create links for strings like <q>Revision 654</q> in the log message.</p>

<p>SVN::Notify::HTML has an additional new option, <code>&#x2014;linkize</code>, that will force any email addresses or URLs it finds in the log message to be turned into links. Again, this works like it does for CVSspam; I&#x2019;m grateful to Jeffrey Friedl&#x2019;s <cite><a href="http://www.amazon.com/exec/obidos/ASIN/0596002890/justatheory-20" title="Buy &#x201c;Mastering Regular Expressions, Second Edition&#x201d; on Amazon.com">Mastering Regular Expressions, Second Edition</a></cite> for the excellent regular expressions for matching URLs and email addresses.</p>

<p>All of this was made possible by moving the processing of options from <em>svnnotify</em> to <code>SVN::Notify->get_options</code> and adding a new class method, <code>SVN::Notify->register_attributes</code>. This second method allows Bricolage subclasses to easily add new attributes; <code>register_attributes()</code> will create accessor methods and add command-line option processing for each new attribute required by a subclass. Then, when you execute <code>svnnotify &#x2014;handler HTML</code>, <code>SVN::Notify->get_options</code> processes the default options, loads the SVN::Notify::Handler subclass, and then processes any options specified by the subclass. The short story is that all of this is the detail-oriented way of saying that it is easier to subclass SVN::Notify and be able to automatically load the necessary options and attributes via the same executable, <em>svnnotify</em>.</p>

<p>This change was motivated not only by my desire to add the new features to SVN::Notify::HTML, but also by Autrijus&#x2019; new modules, <a href="http://search.cpan.org/dist/SVN-Notify-Snapshot/" title="SVN::Notify::Snapshot on CPAN">SVN::Notify::Snapshot</a> and <a href="http://search.cpan.org/dist/SVN-Notify-Config/" title="SVN::Notify::Config on CPAN">SVN::Notify::Config</a>. Thanks Autrijus!</p>

<p>I&#x2019;ll try to get a nice example of all this functionality up in the next few days; if anyone else creates one first, send it to me! But in the meantime, enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.22.html">
    <title>SVN::Notify 2.22 Improves Diff Parsing</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.22.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-15T23:28-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>SVN::Notify::HTML::ColorDiff had similar updates. It now properly outputs added and deleted files in the diff in separate sections, instead of grouping them under the last modified file listed. It also creates separate sections for files that have only had their properties changed. I&#x2019;ve put an example <a href="/computers/programming/perl/modules/svnnotify-2.22_colordiff_example.html" title="SVN::Notify 2.22 sample ColorDiff output">here</a>.</p>

<p>Grab the new version from <a href="http://search.cpan.org/dist/SVN-Notify/" title="SVN::Notify on CPAN">CPAN</a> now</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.20.html">
    <title>SVN::Notify 2.20 Adds Colorized Diffs</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.20.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-09T22:54-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>Enjoy!</p>

<p><strong>Update:</strong> And now I&#x2019;ve released SVN::Notify 2.21 with a few minor fixes, including XHTML 1.1 compliance.</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.10.html">
    <title>SVN::Notify 2.10 Generalizes Behavior</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.10.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-07T23:04-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<p>As I <a href="/computers/programming/perl/modules/svnnotify_2.0.html" title="SVN::Notify 2.0 Hitting CPAN">mentioned</a> last week when I released SVN::Notify 2.0, Autrijus has suggested using SVN::Notify as the base class for modules that do other things, such as send instant messages or update a checkout for backup purposes. Instantly seeing the value in this, I further realized that I could greatly simplify the support for HTML notification emails by moving the HTML-specific code to a subclass and then just let polymorphism do the work.</p>

<p>The result <a href="http://search.cpan.org/dist/SVN-Notify/" title="SVN::Notify on CPAN">SVN::Notify</a> 2.10. To simplify the move to a subclass for the HTML notifications, I broke up the old <code>send()</code> method into a large number of other methods that affect various parts of the composition of the email, such as headers, starting the message, outputting the log message, the file list, and outputting or attaching the diff. Then I just overrode the few methods that need different behavior in the subclass, and it all worked!</p>

<p>I realized, as I worked on it, I also realized that I was following the same principals that <a href="http://use.perl.org/~Ovid/" title="Ovid&#x2019;s Journal">Ovid</a> has <a href="http://www.perlmonks.org/index.pl?node_id=392248" title="&#x201c;if&#x201d; Considered Harmful in OO programming">written about</a> with regard to the use of <code>if</code>. I was able to remove quite a few of them by moving HTML to a subclass. Of course, there are still some to enable diffs to be either included in an email or attached, but I didn&#x2019;t want to split things up too much, or I&#x2019;d have a geometric explosion of subclasses!</p>

<p>The <em>svnnotify</em> script, in the meantime, remains largely unmodified. The only change is the deprecation of the <code>&#x2014;format</code> option in favor of a new option, <code>&#x2014;handler</code>. Use this option to specify what subclass of SVN::Notify should handle the notification. So far, there&#x2019;s just one, <code>&#x2014;format HTML</code>, but I&#x2019;m sure that Autrijus will soon add <code>&#x2014;format Jabber</code>, and I&#x2019;d like to add <code>&#x2014;format HTML::ColorDiff</code>, myself. I might have to move the processing of command-line arguments out of <em>svnnotify</em> and into SVN::Notify, instead, so that subclasses can add new options. We&#x2019;ll see what comes up.</p>

<p>Other changes to SVN::Notify include:</p>

<ul>
  <li>Added code to Build.PL to set the shebang line in the test
        scripts. Reported by Robert Spier.</li>
  <li>Changed name of attached diff file to be named for the revision
        and the committer, rather than the committer and the date.
        Suggested by Robert Spier.</li>
  <li>Added Author, Date, and Revision information to the top of each
        message.</li>
  <li>The ViewCVS URL is no longer output for each file. A single link
        for the entire revision number is put at the top of the email,
        instead. ViewCVS Revision URL syntax pointed out by Peter
        Valdemar Morch.</li>
  <li>Changed the <code>send()</code> method to <code>execute()</code> to better reflect
        its generalized use as the method that executes actions in
        response to Subversion activity.</li>
  <li>The tests no longer require HTML::Entities to run. The HTML
        email tests will be skipped if it is not installed.</li>
  <li>Added accessor methods for the attributes of SVN::Notify.</li>
</ul>

<p>Enjoy!</p>
]]></content:encoded>
  </item>

  <item rdf:about="http://justatheory.com/computers/programming/perl/modules/svnnotify_2.0.html">
    <title>SVN::Notify 2.0 Hitting CPAN</title>
    <link>http://justatheory.com/computers/programming/perl/modules/svnnotify_2.0.html</link>
    <description></description>
    <dc:subject>/computers/programming/perl/modules</dc:subject>
    <dc:creator>David Wheeler</dc:creator>
    <dc:date>2004-10-05T00:00-08:00</dc:date>
    
    <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0" />
    <content:encoded><![CDATA[<dl>
  <dt>Modularization</dt>
  <dd>The old monolithic <em>activitymail</em> script is gone. It has been replaced with a Perl class, SVN::Notify, that does most of the work. The new script, <em>svnnotify</em>, is essentially just a wrapper around the class; all it does is process command-line arguments and then pass the results to SVN::Notify.</dd>

  <dt>Simplification</dt>
  <dd>Subversion&#x2019;s system for hooking in to commit transactions is far better thought-out than that of CVS. It&#x2019;s now easy to capture the results of an entire commit in a single transaction, without having to write out temp files to keep track of where we are and to concatenate diffs. As a result, SVN::Notify has a much simpler architecture and implementation that requires fewer third-party modules to do its work. In addition, the move to a class should make it much easier to build on SVN::Notify in the future than it was with activitymail. <a href="http://www.autrijus.org/" title="Autrijus.Home">Autrijus Tang</a> already suggested a number of ideas on IRC, including SVN::Notify::Jabber or SVN::Notify::Export. Have at it, everyone!</dd>

  <dt>Reduced Resource Usage</dt>
  <dd>I had heard some complaints that, on very large commits, <em>activitymail</em> could end up taking up a huge amount of memory. As best I could figure, this was because it was loading everything into memory, including the diff for the commit! SVN::Notify avoids this problem by using a file handle to read in a diff an print it to <em>sendmail</em> one line at a time. This should keep resource usage by SVN::Notify way below what activitymail used.</dd>

  <dt>Context-Specific Notifications</dt>
  <dd>SVN::Notify has added support for mapping email addresses to regular expressions. Whenever a regular expression matches the name of one or more of the directories affected in a single commit, the corresponding email address will be added to the list of recipients of the notification. This is a great way to get notification messages sent to particular email addressed based on what part of the Subversion tree was affected by a commit. I intend to use this to set it up so that a list of translators only get notification about a commit when it changes a directory related to localization in my projects, so that they can ignore commits to other parts of the application.</dd>
</dl>

<p>These are the major changes, but SVN::Notify also features a number of smaller improvements over its <em>activitymail</em> ancestor, including character set support, user domain support for the <q>From</q> header, explicit specification of a <q>From</q> header, properly escaped content when sending HTML-formatted notifications, and a maximum subject length configuration.</p>

<p>So what did it lose? Just a few things:</p>

<ul>
  <li><a href="http://sourceforge.net/projects/cvs-syncmail" title="syncmail Website"><em>syncmail</em></a>-like behavior. Did anyone ever use this? If so, feel free to implement SVN::Notify::Syncmail.</li>
  <li>Arguments to <em>diff</em>. SVN::Notify just uses <code>svnlook diff</code> to generate a diff. Support for other diffs could be added in a future version, if people really need it.</li>
  <li>New directories and imports can no longer be ingored, because in Subversion they&#x2019;re really no different from any other commit.</li>
  <li>Limit on the maximum size of the email. This is because SVN::Notify no longer loads the entire email into memory to measure it.</li>
  <li>Excluding certain files from the diff. Subversion handles this itself by paying attention to the media type of each file.</li>
  <li>Windows support. Actually, I&#x2019;m not sure if <em>activitymail</em> was ever used on Windows, but the new method of using pipes to communicate with other processes isn&#x2019;t supported by Windows, as near as I can tell. There are comments in the code for those who wish to do the port; it would probably be easy using Win32::Process.</li>
</ul>

<p>Not too much, eh? Let me know what you think, and send feedback!</p>
]]></content:encoded>
  </item>

  <cc:License rdf:about="http://creativecommons.org/licenses/by-nc/2.0/">
    <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
    <cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
    <cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
    <cc:requires rdf:resource="http://web.resource.org/cc/Attribution" />
    <cc:prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" />
    <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
  </cc:License>
</rdf:RDF>
