darcs-monitor

Darcs repository monitor (sends email) http://wiki.darcs.net/RelatedSoftware/DarcsMonitor

Latest on Hackage:0.4.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

GPL licensed by Antti-Juhani Kaijanaho
darcs-monitor
-------------

Darcs-monitor sends email to a specified recipient about every patch
in the repository that it has not sent mail about yet. It can be run from
Cron or as a darcs apply posthook, whichever fits best your needs.

It ought not be too hard to extend it for other kinds of notification than
just emails; but no others are implemented at this time.

There is a DarcsWiki page on darcs-monitor at
http://wiki.darcs.net/RelatedSoftware/DarcsMonitor


Installation

Darcs-monitor depends on mtl and HaXml. First, make sure they are
installed.

Darcs-monitor is Cabalised. The standard incantations

runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install

ought to work for most people.

Darcs-monitor has been tested using GHC 6.12.1. It might not work with
older compilers; though patches are accepted for fixing any
unportabilities.


Usage

In the following, I assume that the repository you want to monitor is
in directory $REPO.

To have darcs-monitor run every time someone pushes to the repository,
create the file $REPO/_darcs/prefs/defaults with the following content:

8<-- cut here --
apply posthook darcs-monitor --charset=CHARSET email RECIPIENT [email RECIPIENT ...]
apply run-posthook
8<-- cut here

In the above, CHARSET should be the MIME charset that patches
(including their metadata) are in, and RECIPIENT should be the email
address where emails should be sent. You can specify more than one recipient
by repeating the email parameter. Also, if darcs-monitor is not
installed in the default $PATH, you should specify th full path to the
darcs-monitor binary.

You can also run darcs-monitor from Cron or from the command line. In
those cases, it is easiest to specify the path to the repository on
the command line after other arguments. In fact, you can specify more
than one.

By default, mail is sent by calling /usr/sbin/sendmail. Another sendmail
binary can be specified by using a command-line switch.

You can customise the email by providing a template. The default one
is installed in the Cabal-specified datadir as "default-template".
You should put your own template in the file
$REPO/_darcs/third-party/darcs-monitor/email-template
(you can use other files, but then you have to specify where it is).

In the template you can use the following substitutions:
%RECIPIENT% -- the email address to which email is sent
%DIFF% -- the Darcs-provided diff -u of the patch
%CHANGES% -- a Darcs-provided summary of changes
%REPO% -- the path to the repository
%SHORTREPO% -- the final component of the path to the repository
%AUTHOR% -- the patch author
%DATE% -- the patch date
%HASH% -- the patch Darcs hash
%TITLE% -- the patch name
%COMMENT% -- the patch comment

Also, in the template, two percent signs in sequence (%%) start a comment
that extends to the end of the current line.


Thanks

The following people, in addition to myself, have contributed code to
this program:

Benja Fallenstein
Benjamin Franksen

My thanks to them.


Feedback

Please send comments and bug reports to marcot@marcot.eti.br.

Any patches should be prepared with Darcs against the repository
http://marcot.eti.br/darcs/darcs-monitor/
and sent using "darcs send".

Have fun,


Antti-Juhani Kaijanaho

Changes

0.4.2 (2011-06-13)

* Update dependency to HaXml 1.20.

0.4.1 (2011-04-13)

* Use HaXml 1.20.
* Enable use with darcs --interactive.

0.4.0 (2010-09-08)

* make it possible to use more than one email address as recipient.
* update maintainer address
* update darcs repository address

0.3.8 (2010-03-07)

* Correct crash with GHC 6.12.1 because of malformed UTF-8 character
in the darcs output.

0.3.7 (2010-02-27)

* New maintainer: Marco Túlio Gontijo e Silva <marcot@debian.org>.
* Include --max-diff option.
* README: Update the Homepage link and the darcs repository.
* darcs-monitor.1: Don't generate manpage and correct syntax for
"...".
* Make the code Warning-free and hlint-free.
* darcs-monitor.cabal:
- Include more fields.
- Include upper bound to base dependency.
- Include ChangeLog in Extra-Source-Files.
* ChangeLog: Include the log for 0.3.[3-6] in ChangeLog.

0.3.6 (2008-05-10)

* use Cabal's mechanism for telling the program what version it is
* consequently the Setup.hs customization has been removed

0.3.5 (2008-05-10)

* change the Cabal description to reflect the fact that this package
fails to build with development versions of HaXml

0.3.4 (2008-05-04)

* add a Description to the Cabal file

0.3.3 (2008-05-04)

* fixes to enable building with GHC 6.8
* now requires Cabal 1.2

0.3.2 (2007-08-31)

* documentation update

0.3.1 (2007-05-31)

* documentation update

0.3 (2007-05-31)

* there is now support for the %CHANGES% and %SHORTREPO%
substitutions in the template
* a default template is now provided
* &apos; and &quot; entity references in darcs changes –xml is now
supported
* patches with just the author email address (no real name) are
now handled correctly
* when multiple emails are sent, they are now sent in
chronological order
* emails are announced to the user

0.2 (2007-02-12)

* new option --dry-run

0.1 (2007-02-11)

* Initial release.
Used by 1 package:
comments powered byDisqus