public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mel Hatzis <hatzis@juniper.net>
To: Lars Henriksen <Lars.Henriksen@netman.dk>
Cc: help-gnats@gnu.org, Yngve Svendsen <yngve.svendsen@sun.com>,
	Milan Zamazal <pdm@zamazal.org>
Subject: Re: Subject header matching--once again
Date: Sat, 09 Nov 2002 03:26:00 -0000	[thread overview]
Message-ID: <3DC6FFDD.9000304@juniper.net> (raw)
In-Reply-To: <20021104191125.GA1148639@cluster2.netman.dk>

On 11/04/2002 11:11 AM, Lars Henriksen wrote:
> On Sun, Nov 03, 2002 at 09:17:08PM -0800, Mel Hatzis wrote:
> 
>>(snip)
>>
>>Building on your proposal, I suggest that it'd be even better if an
>>array of capture groups could be specified, each associated with a
>>field name. This would allow for fields other than 'category' on the
>>subject line.
>>
>>This could take the following form:
>>
>> subject-matching {
>>     "\\<PR[ \t#/]?([0-9]+)[ \t]?:(.*)"
>>     captured-fields {
>>           "Number" "Synopsis"
>>     }
>> }
> 
> 
> I like that, a nice, concise way of identifying the groups and their purpose,
> The built-in default would then become
> 
>    subject-matching {
>        "\\<(PR[ \t#]?\\|([-\\w+.]+)/)([0-9]+)"
>        captured-fields {
>            "" "Category" "Number"
>        }
>    }
> 
> 
>>The example above would match subject lines of the form:
>>
>>  "PR 333 : missing subject-matching clause causes gnatsd to dump core"
>>
>>(verifying that the synopsis matched the PR number before accepting it
>>as a reference to PR 333)
> 
> 
> Would you allow any field name to appear in the list or just an exquisite
> selection? I am not well versed in the intricacies of gnatsd. Does the existing
> code allow a check of Synopsis as you suggest? There will, of course, have to
> be validity checks for each of the field types in the list.

The existing code would need to be modified to do the checking.
Currently, the code does a category search for the captured stuff
preceding the pr number - so it's fairly hardwired.
This could be addressed using 'find_field_index' and 'field_value'
for the fields in question.

One would also need to be careful to account for changes - for example,
if PR 333 is associated with category 'A' and someone updates it to
category 'B', a subject line of 'Re: A/333' should probably still
match PR 333 - this is currently what happens because the check for
category is independent of PR number.

This poses a problem for setups like my example which used 'Synopsis'
since, if the synopsis for PR 333 is modified, there is no way to
verify subject lines that reference the old synopsis. However, this
problem also applies to category, if one considers the possibility
that a category is deleted from the categories file.

Perhaps this is OK - if the category is deleted, it shouldn't surprise
anyone if subject lines with the old category no longer match. This is
a tougher argument to apply to a modified synopsis - since you're not
deleting the synopsis value, you're merely modifying it. With a category
modification, you can still do the verification, but with a synopsis
modification, you can't.

It all comes down to gnats-admin policy - the patch gives you the
flexibility to define your own policy. It won't protect against
ill-defined policy.

-Mel



_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

  parent reply	other threads:[~2002-11-04 23:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03 21:40 Lars Henriksen
2002-11-04 11:31 ` Mel Hatzis
2002-11-04 15:41   ` Lars Henriksen
2002-11-06 21:43     ` Lars Henriksen
2002-11-09  3:26     ` Mel Hatzis [this message]
2002-12-02 14:45       ` Lars Henriksen
2002-12-17  6:38         ` Yngve Svendsen
2003-03-02 11:57         ` Andrew J. Gray
2003-03-02 20:47           ` Mark D. Baushke
2003-03-03 20:22             ` Lars Henriksen
2003-03-03 19:51           ` Lars Henriksen
2003-03-09  2:33             ` Andrew J. Gray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DC6FFDD.9000304@juniper.net \
    --to=hatzis@juniper.net \
    --cc=Lars.Henriksen@netman.dk \
    --cc=help-gnats@gnu.org \
    --cc=pdm@zamazal.org \
    --cc=yngve.svendsen@sun.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).