darcs-monitor - Darcs add-on that sends mail about newly pushed changes
... ] email recipient
... ] [ repository
reads one or more darcs
(1) repositories and sends
email about every change it has not previously sent an email about to the same
address. To have darcs-monitor run every time someone pushes to a repository,
add the following lines to _darcs/prefs/defaults
- apply posthook darcs-monitor
--charset=charset email recipient [
email recipient ... ]
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.
You can also run darcs-monitor
(1) 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
By default, mail is sent by calling /usr/sbin/sendmail
binary can be specified by using a command-line switch.
You can customise the email by providing a template. You should put your own
template in the file _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:
- the email address to which email is sent
- the Darcs-provided diff -u of the patch
- a Darcs-provided summary of changes
- the path to the repository
- the final component of the path to the repository
- the patch author
- the patch date
- the patch Darcs hash
- the patch name
- the patch comment
Also, in the template, two percent signs in sequence
) start a
comment that extends to the end of the current line.
- -n, --dry-run
- Do not actually do anything, but do mark it done.
- Provide the location of the darcs(1)
- Provide additional arguments to darcs(1), separating
arguments with commas.
- Use sendmail(1) (either at /usr/sbin/sendmail
or at FILE).
- -d, --max-diff=SIZE
- Only include the first SIZE bytes of the diff in the
- Specify the MIME name of the repository's character
- -h, --help
- Show usage.
- Show version.
Success is indicated by 0, failure by any other exit status.
- The default email template. See above for the format.
was written by Antti-Juhani Kaijanaho.