Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  SVN::NOTIFY::ALTERNATIVE (3)

.ds Aq ’


SVN::Notify::Alternative - MIME multipart/alternative notification



Use svnnotify in post-commit:

  svnnotify --repos-path "$1" --revision "$2" \
    --to --handler Alternative [options]

For example:

  svnnotify --repos-path "$1" --revision "$2" \
    --to --handler Alternative \
    --alternative HTML::ColorDiff

Use the class in a custom script:

  use SVN::Notify::Alternative;

  my $notifier = SVN::Notify::Alternative->new(%params);


This subclass of SVN::Notify sends MIME multipart/alternative email messages for Subversion activity. The messages contain both the standard SVN::Notify plain text change notification and one or more alternative formats of the message. The default alternative format is HTML.

Note that this means that many or all of the processing of a subversion commit will be executed multiple times, once for the plain text version and then again for each alternative version. This will therefore increase resource usage on your Subversion server (mainly processor time, but also possibly memory).

It also means that the size of the outgoing message will increase for each alternative. If you’re using --with-diff, then those messages could be very large indeed for large commits. If, however, you use --attach-diff, the diff will only be attached to the last alternative.


To use SVN::Notify::Alternative, simply follow the instructions in SVN::Notify, but when using svnnotify, use the --alternative option to add one or more alternative formats.

Class Interface



  my $notifier = SVN::Notify::Alternative->new(%params);

Constructs and returns a new SVN::Notify object. All parameters supported by SVN::Notity are supported here, as are the options of all specified alternative formats, but SVN::Notify::Alternative supports an additional parameter:

  svnnotify --alternative HTML
  svnnotify --alt HTML --alt HTML::ColorDiff

An array reference that specifies the SVN::Notify handlers (subclasses) to be used for formatting the alternative parts of the notification message. The command-line option may be called as either --alternative or --alt, and the value is the same as that of the SVN::Notify --handler parameter, i.e. the module name without the SVN::Notify:: prefix. Specify the option multiple times to specify multiple alternative handlers. Defaults to [HTML] if not specified.

Instance Interface

    Instance Methods



Overrides the output() method of SVN::Notify to replace the standard message output with a MIME multipart/alternative skeleton. It then creates new instances of the standard SVN::Notify plain text formatter and each of the configured alternative formatters, and uses those instances to fill in the alternative parts of the message. If attach_diff is true, it will be used only in the last alternative to be output, which should also be the richest format.


In addition to those supported by SVN::Notify, SVN::Notify::Alternative supports the following accessors:


  my $alts = $notify->alternatives;

Gets or sets the value of the alternatives attribute, which must always be set to an array reference.

See Also



Jukka Zitting <>

David E. Wheeler <>

Copyright and License

Copyright (c) 2005 Jukka Zitting and 2005-2016 David E. Wheeler. Some Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 SVN::NOTIFY::ALTERNATIVE (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.