.\" Copyright © 2007 Antti-Juhani Kaijanaho .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with this program; if not, write to the Free Software Foundation, Inc., .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .TH darcs-monitor 1 .SH NAME darcs\-monitor \- Darcs add-on that sends mail about newly pushed changes .SH SYNOPSIS .B darcs-monitor [ .I option \&... ] .B email .I recipient [ .B email .I recipient \&... ] [ .I repository \&... ] .sp .B darcs\-monitor .B \-h | .B \-\-help .sp .B darcs\-monitor .B \-\-version .SH DESCRIPTION .B darcs\-monitor reads one or more .BR 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 .IR _darcs/prefs/defaults . .IP .B apply .B posthook .B darcs\-monitor .BI \-\-charset= charset .B email .I recipient [ .B email .I recipient \&... ] .br .B apply .B run\-posthook .br .PP In the above, .I charset should be the MIME charset that patches (including their metadata) are in, and .I recipient should be the email address where emails should be sent. You can specify more than one recipient by repeating the email parameter. .PP You can also run .B darcs\-monitor from .BR crontab (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 one. .PP By default, mail is sent by calling .IR /usr/sbin/sendmail . Another .B sendmail (1) binary can be specified by using a command-line switch. .PP You can customise the email by providing a template. . You should put your own template in the file .I _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: .TP .B %RECIPIENT% the email address to which email is sent .TP .B %DIFF% the Darcs-provided diff -u of the patch .TP .B %CHANGES% a Darcs-provided summary of changes .TP .B %REPO% the path to the repository .TP .B %SHORTREPO% the final component of the path to the repository .TP .B %AUTHOR% the patch author .TP .B %DATE% the patch date .TP .B %HASH% the patch Darcs hash .TP .B %TITLE% the patch name .TP .B %COMMENT% the patch comment .PP Also, in the template, two percent signs in sequence .BR "" ( %% ) start a comment that extends to the end of the current line. .SH OPTIONS .TP \-n, \-\-dry-run Do not actually do anything, but do mark it done. .TP \-\-darcs\-path=FILE Provide the location of the .BR darcs (1) executable. .TP \-\-darcs\-args=ARGS Provide additional arguments to .BR darcs (1), separating arguments with commas. .TP \-\-use\-sendmail[=FILE] Use .BR sendmail (1) (either at .I /usr/sbin/sendmail or at .IR FILE ). .TP \-d, \-\-max\-diff=SIZE Only include the first SIZE bytes of the diff in the e-mail. .TP \-\-charset=CHARSET Specify the MIME name of the repository's character set. .TP \-h, \-\-help Show usage. .TP \-\-version Show version. .SH "EXIT STATUS" Success is indicated by 0, failure by any other exit status. .SH FILES .TP .I /usr/share/darcs-monitor/default-template The default email template. See above for the format. .SH AUTHOR .B darcs\-monitor was written by Antti-Juhani Kaijanaho. .SH "SEE ALSO" .BR darcs (1)