CVS-MAILCOMMIT(1) | Debian GNU/Linux | CVS-MAILCOMMIT(1) |
cvs-mailcommit - Send CVS commitments via mail
cvs-mailcommit [options] [version*]
cvs-mailcommit is a helper application to CVS to help people keep track of CVS repositories via mail. It is hooked into the CVS system via the CVSROOT/loginfo file. It will read modification information from CVS via stdin and require version information via the commandline.
cvs-mailcommit will send differences of modified files or entire new files via mail to the denoted address.
You'll have to hook it into CVS for each module in a repository that you want to monitor via mail. See INSTALLATION below
This program supports the following arguments. When the arguments don't make sense the program won't do anything.
X-Loop: address
From: CVS User foo <address>
Otherwise the local user the program runs under will be used instead of address. With this parameter you can ensure that all such mails will be sent with the same from line, which may be useful for moderated lists or some where only subscribers may write.
Reply-To: address
Mail-Followup-To: address
Approved: address
--cvs %{sVv}
If you want to test this program manually you'll have to supply the module directory and the modified files including the old and new versions. This will look like
--cvs 'CVSROOT loginfo,1.1,1.2'
This option is only usful for old-style CVS format strings (i.e. prior to CVS 1.12.6). You can continue using old-style format strings with newer cvs if you write %1{sVv} and set UseNewInfoFmtStrings=yes in CVSROOT/config. For more recent versions of CVS you should, however, use the new --root and --dir arguments and place %{sVv} at the end of the commandline.
--root %r
--dir %p
cvs-mailcommit supports an additional configuration file /etc/cvs-mailcommit.pl so that hard-coded default values can be overwritten. The file is included via require and hence needs to contain valid Perl code, which evaluates to true. I.e. place 1; at the end of the file.
The CVSROOT/loginfo file controls where cvs commit log information is sent. The first entry on a line is a regular expression which must match the directory (alias module) that the change is being made to, relative to the $CVSROOT. If a match is found, then the remainder of the line is a filter program that should expect log information on its standard input.
A loginfo line looks like
<directory> <command> --<option> --<option>
The --cvs option is only valid for old-style CVS format strings prior to version 1.12.6 of CVS with %{sVv} or for new-style CVS format strings using the compatibility hack with %1{sVv}.
For new-style CVS format strings for CVS version 1.12.6 or higher --cvs must not be used anymore, but instead --root and --dir are required. The version information %{sVv} must be added at the end of the command line.
Assume you want to monitor changes in the CVSROOT module, then you may want to use the following line.
CVSROOT cvs-mailcommit \ --mailto master@host.org \ --from cvs@cvshost.com \ --cvs %{sVv} --diff --full
If you want to distribute changes in a module via a mailing list where only these log messages should appear you may have to add an X-Loop: or Approved: header line.
webwml cvs-mailcommit \ --mailto master@host.org \ --from cvs@cvshost.com \ --approved cvsmaster@cvshost.com \ --cvs %{sVv} --diff --full
The above configuration lines are valid only for old-style format strings. With a more recent version of CVS (1.12.6 or newer) you'll have to replace %{sVv} with %1{sVv} and set UseNewInfoFmtStrings to yes in CVSROOT/config.
For new-style CVS format strings other parameters need to be used since CVS changed the syntax and semantics. You must not use the --cvs option anymore but need to use --root and --dir and place the version list at the end. The last example converted for new-style format strings looks like the following:
webwml cvs-mailcommit \ --mailto master@host.org \ --from cvs@cvshost.com \ --approved cvsmaster@cvshost.com \ --diff --full --root %r --dir %p %{sVv}
To improve readability, the above lines were broken up into several lines using normal continuation lines. This is not supported by CVS. You will have to write it in one single line.
CVS does not support continuation lines (multiple lines per command) in the CVSROOT/loginfo file. You'll have to write each filter in a single line of its own.
http://www.infodrom.org/Infodrom/tools/cvs-mailcommit.html
2020-05-31 | Debian Project |