]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Control/Service.pm
Add support for outlook in control
[debbugs.git] / Debbugs / Control / Service.pm
index 7b4b44dbeb1897e8259ac01d792741c887528ba0..fcd5d70b7805d8ab56feae46fafca63fd0dda386 100644 (file)
@@ -149,6 +149,7 @@ my %control_grammar =
      limit => qr/(?i)^limit\:?\s+(\S.*\S)\s*$/,
      affects => qr/(?i)^affects?\s+\#?(-?\d+)(?:\s+((?:[=+-])?)\s*(\S.*)?)?\s*$/,
      summary => qr/(?i)^summary\s+\#?(-?\d+)\s*(\d+|)\s*$/,
+     outlook => qr/(?i)^outlook\s+\#?(-?\d+)\s*(\d+|)\s*$/,
      owner => qr/(?i)^owner\s+\#?(-?\d+)\s+((?:\S.*\S)|\!)\s*$/,
      noowner => qr/(?i)^noowner\s+\#?(-?\d+)\s*$/,
      unarchive => qr/(?i)^unarchive\s+#?(\d+)$/,
@@ -488,7 +489,7 @@ sub control_line {
            $errors++;
            print {$transcript} "Failed to alter tags of $config{bug} $ref: ".cleanup_eval_fail($@,$debug)."\n";
        }
-    } elsif (m/^(un)?block\s+\#?(-?\d+)\s+(?:by|with)\s+(\S.*)?$/i) {
+    } elsif ($ctl eq 'block') {
        my $add_remove = defined $matches[0] && $matches[0] eq 'un';
        $ref = $matches[1];
        $ref = exists $param{clonebugs}{$ref} ? $param{clonebugs}{$ref} : $ref;
@@ -655,6 +656,19 @@ sub control_line {
            print {$transcript} "Failed to give $ref a summary: ".cleanup_eval_fail($@,$debug)."\n";
        }
 
+    } elsif ($ctl eq 'outlook') {
+       my $outlook_msg = length($matches[1])?$matches[1]:undef;
+       eval {
+           outlook(@{$param{common_control_options}},
+                   bug          => $ref,
+                   outlook      => $outlook_msg,
+                  );
+       };
+       if ($@) {
+           $errors++;
+           print {$transcript} "Failed to give $ref a outlook: ".cleanup_eval_fail($@,$debug)."\n";
+       }
+
     } elsif ($ctl eq 'owner') {
        my $newowner = $matches[1];
        if ($newowner eq '!') {