@need 3200

@node Using Triggers
@chapter Using Triggers

This chapter describes two ways to use triggers: for sending email
about changes to an archive, and for keeping a revision library up to
date (see @ref{Revision Tree Libraries}).

@need 3200

@section Sending Email Notices About Repository Changes

@geindex repository, email notifications

@geindex email notifications

@geindex mail-new-categories

@geindex mail-new-branches

@geindex mail-new-versions

@geindex mail-new-revisions



@code{arch} provides four commands designed for use as triggers that send
email about changes to a repository.  (See @ref{arch Triggers}.)
These are:

@example
@group
        larch mail-new-categories
        larch mail-new-branches
        larch mail-new-versions
        larch mail-new-revisions
@end group
@group
@end group
@end example

You can create a triggers for sending email with a @code{notify}
@code{=rules.archives} configuration rule such as this (here split over
multiple lines to fit the printed page -- in practice, this rule would
be on one line):

@example
@group
        joe.hacker--2002@@gnu.org
                mail-new-categories:joe@@gnu.org
                mail-new-branches:joe@@gnu.org
                mail-new-versions:joe@@gnu.org
                mail-new-revisions:joe@@gnu.org
@end group
@group
@end group
@end example



@need 3200

@section Updating a Revision Library

@geindex revision library, automatically updating



You can use triggers to keep a revision library automatically
up-to-date with a rule like this:

@example
@group
        joe.hacker--2002@@gnu.org
                noop:
                noop:
                noop:
                library-add:--ignore-extra-args
@end group
@group
@end group
@end example






