Next: , Previous: The CVSROOT/ Administrative Directory, Up: Repository Administration

Commit Emails

The loginfo file is how one sets up commit emails – automated emails that go out to everyone working on a project whenever a commit takes place. (It may seem counterintuitive that this is done in loginfo instead of commitinfo, but the point is that one wants to include the log message in the email). The program to do the mailing – contrib/ in the CVS source distribution – can be installed anywhere on your system. I customarily put it in the repository's CVSROOT/ subdirectory, but that's just a matter of taste.

You may need to edit a bit to get it to work on your system, possibly changing the first line to point to your Perl interpreter, and maybe changing this line

     $mailcmd = "| Mail -s 'CVS update: $modulepath'";

to invoke your preferred mailer, which may or may not be named Mail. Once you've got it set the way you like it, you can put lines similar to these into your loginfo:

     listerizer CVSROOT/ %s -f CVSROOT/commitlog -m
     RoadMail   CVSROOT/ %s -f CVSROOT/commitlog -m
     bk/*score  CVSROOT/ %s -f CVSROOT/commitlog -m \

The %s expands to the names of the files being committed; the -f option to takes a file name, to which the log message will be appended (so CVSROOT/commitlog is an ever-growing file of log messages); and the -m flag takes an email address, to which will send a message about the commit. The address is usually a mailing list, but you can specify the -m option as many times as necessary in one command line.

Karl Fogel wrote this book. Buy a printed copy via his homepage at

copyright  ©  January 17 2019 sean dreilinger url: