[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4.0 beta - question on parsing of subject line in PR header

From: Mel Hatzis
Subject: Re: 4.0 beta - question on parsing of subject line in PR header
Date: Mon, 21 Oct 2002 11:46:13 -0700
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0.0) Gecko/20020530

On 10/20/02 15:00, Yngve Svendsen wrote:
This patch wasn't applied because Milan wanted a little bit of polish (he wanted ChangeLog entries and maybe unification of the regexp syntax with the rest of GNATS). I think this patch provides very useful functionality.

Mel: do you have a little bit of time to fix this, so we can get it applied? I can take care of the Texinfo docs.

OK...just to be clear, I'm going to modify the regex syntax that's
currently used in checkIfReply (RE_NO_BK_PARENS) to match that in
I'll roll this into my original patch and resubmit.


Yngve Svendsen

At 11:41 23.05.2002 -0700, Mel Hatzis wrote:

At 16:19 15.05.2002 -0700, Mel Hatzis wrote:

   Thinking about this some more, it would be *really* useful to
   allow this regular expression to be overriden in the dbconfig
   file. Allowing user's to define their own would provide them the
   flexibility to get as fancy as they want with some of the corner
   cases where the default regex behaviour is not desirable...such
   as "Re: PR 50 (was PR 33)" which matches PR 33.

Then Milan Zamazal wrote:

Me too.  If someone sends appropriate patches, I'll be happy to
incorporate them.  (If anyone wants to do it before the 4.0 release,
please test it carefully and include documentation patches as well.)

OK, I've attached a patchfile for this.

You can now (optionally) include the following in the database-info
section of the dbconfig file:

    # The regular expression used to determine whether a PR is referenced
    # on an email subject line
    subject-matching {
        "\\<((PR[ \t/])\\|([-a-z0-9_+.]+/))([0-9]+)"
        capture-group "4"

(The above example is exactly analogous to the built-in default)

Regarding documentation, I've updated the man page for dbconfig. One thing I didn't mention is that if you include a regex which doesn't compile, GNATS will revert to using the default - and will also email the gnats-admin via punt.

Invalid values for the capture-group similarly generate email to gnats-admin, though in this case, GNATS does not revert to the default - it simply assumes
no PR's are referenced on the subject line. I'm not clear on whether this
too should revert to using the default, but decided against it since the
associated regex would be valid in this case.

A possible enhancement would be to allow multiple regular expressions to
be specified, each with their own capture group. Alternatively, it might
be nice to allow multiple capture groups, making it possible to update
multiple PR's using a single submission.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]