NAME
Darcs::Notify - Send emails when a Darcs repository has patches added or removed
SYNOPSIS
darcs_notify(smtp_server => "smtp.example.com",
email => ["user1@example.com", "user2@example.com"],
repo => "/path/to/my/repo");
DESCRIPTION
Darcs::Notify compares the list of patches in a darcs repository against a saved backup copy and sends emails about the changes. The backup copy is stored in the file _darcs/third-party/darcs-notify/old-inventory.
FUNCTIONS
The following functions are exported from the Darcs::Notify module by default.
darcs_notify(options)
-
This implements the Darcs::Notify functionality. It accepts a number of hash style options:
- repo => "/path/to/my/repo"
-
Path to the base of the target darcs repository. Don't point to the _darcs directory, that will be added for you.
- repo_name => "my_repo"
-
By default
&darcs_notify
will guess the name of the repo from the path name. If you'd like to override its guess, pass in the repo_name parameter. - new => sub { ... }
- unpull => sub { ... }
-
You can override the standard email notification by passing a subroutine ref to unpull or new. They both have the same interface:
sub darcs_notify_unpull($$) { my ($option, $patches) = @_; ... }
$option is a reference to the option hash passed to darcs_notify.
$patches is a reference to an array of Darcs::Inventory::Patch objects.
- email => ["email@example.com", email2@example.com]
-
This is reference to an array of email addresses. This is used by the default unpull and new patch notification routines.
- smtp_server => "localhost"
-
This is reference to an array of email addresses. This is used by the default unpull and new patch notification routines. It defaults to localhost if you do not pass the option.
SEE ALSO
darcs-notify, Darcs::Inventory::Patch, Darcs::Inventory
COPYRIGHT
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (C) 2007-2009 David Caldwell
AUTHOR
David Caldwell <david@porkrind.org>