activitymail 1.19

Theory on 2004-03-11T17:54:26

I'm pleased to announce the release of activitymail 1.19, currently finding its way to a CPAN mirror near you. This release has a new feature I've been wanted to add for a long time, ever since Ask mentioned it to me a couple of years ago. A patch from Gary Meyer ported log_accume's -I and -E options, which specify files with a list of regular expressions that can be used to exclude certain files from being processed via a commit. Now, this was the feature I wanted, but wasn't exactly how I wanted to do it.

So starting with Gary's patch, I've modified the -I and -E options to instead take one or more regular expressions right on the command line. These regular expressions are then compared to each file processed during the CVS activity, and then either include the file (in the case of a -I regular expression) or exclude the file (in the case of a -E regular expression). Needless to say, both -I and -E cannot be included in a single invocation of activitymail. You can even pass multiple regular expressions to a single -I or -E option, delimited by an empty space. This means you can't use spaces in your regular expressions, though; use \s, instead.

The expected use for these new options is in combination with the regular expressions in the CVS loginfo file. You can specify that activitymail be executed for a particular directory, and then use -I or -E to include or exclude specific files in that directory.

One other new feature of activitymail 1.19 is the new -q and -Q options. Both options enable a quiet mode for activitymail, eliminating the status messages typically printed out during a commit (such as "Collecting file lists..." and "Sending email"). The -q option can be used for most cases; the -Q option is exactly the same, except that it also silences the status message output when an email is larger than the size specified by the -M option.

Enjoy!

David


perhaps useful together

jmm on 2004-03-11T18:15:58

Needless to say, both -I and -E cannot be included in a single invocation of activitymail.

I don't see why it is "needless to say". Surely it could be useful to allow multiple -I and -E options in a single invokation to specify subtle patterns of selection. Just process them in order and use the selected result whenever a match is foud, or reverse the final option if its pattern fails to match. So: "-I normal -E no*" would exclude most files beginning with "no", but still include "normal" as well as files that do not begin with "no". (I would be tempted to process them in right-to-left order, the reverse of the order that they were typed, since people normally think of the larger cases and then proceed to the exceptions.)

Re:perhaps useful together

smew on 2004-03-11T19:13:27

Perhaps a better sentence to use would have been: It is ambiguous at best to specify both -I and -E, thus it is not allowed. Your suggested algorithm is neither the one that I came up with, nor the one that David originally implemented, thus we decided not to allow it to avoid such confusion. Gary Meyer.

Re:perhaps useful together

Theory on 2004-03-11T21:19:02

I kinda like this idea, but I'm not sure how I'd divide it up if either or both -E and -I specified multiple regular expressions. How to decide which go first?

David