1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
.\" 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
[
.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
.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.
.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)
|