control.pl:
- followup <BUGID> (shortcut for "graft <BUGID> !")
- - <BUGID> == "it" (most recently mentioned bug in this message)
- way to reference the root of the thread. (From iwj)
- nicks for owners? (e.g. ijc => ian.campbell@citrix.com) (From gwd)
- quiet control messages (From tjd)
--- /dev/null
+From: Ian Campbell <IJC@heLlion.org.uk>
+Subject: Using "it" bug reference
+Message-id: <control.12.test@emesinae.example.com>
+To: emesinae-test@list.example.com
+Cc: ijc@hellion.org.uk, test-control@bugs.xenproject.org
+
+create !
+severity it critical
+title it This is a critical bug
+
+create !
+severity it wishlist
+title it This is a wishlist bug
+thanks
--- /dev/null
+From: Ian Campbell <IJC@heLlion.org.uk>
+Subject: Non existent "it"
+Message-id: <control.13.test@emesinae.example.com>
+To: emesinae-test@list.example.com
+Cc: ijc@hellion.org.uk, test-control@bugs.xenproject.org
+
+severity it normal
+thanks
-[0-9]* -- A back reference to a bug created by a previous command,
e.g. via a preceeding "create <MSGID>". The first such bug is
- -1, the second is -2, etc.
+ -1, the second is -2, etc. (Note: -1 is the first bug created in this
+ mail, not the previous one, -2 is the second bug not the second last
+ one).
+
+it -- The literal string "it" refers to the most recently referenced bug.
Identifying a person
====================
our @reply;
-our $MATCH_BUGID = "-?[0-9]+";
+our $MATCH_BUGID = "(?:-?[0-9]+|it)";
sub parse_address ($) {
my $a = shift;
sub lookup_bugid ($) {
my $b = shift;
+ if ( $b eq "it" ) {
+ die "No previous bug found" unless @bugs;
+ print "bugs array: " . join(" ",@bugs) . ": $#bugs\n";
+ my $it = $bugs [ $#bugs ];
+ print "it is $it\n";
+ $bugs{$it} = 0 unless $bugs{$it};
+ return Emesinae::Bug->new( $dbh, ID => $it );
+ }
+
if ( $b > 0 ) {
$bugs{$b} = 0 unless $bugs{$b};
return Emesinae::Bug->new( $dbh, ID => $b );