From 428eb4599f1aad8c4c5b71d02b91252a1daba24d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 6 May 2013 16:01:03 -0700 Subject: [PATCH] accept -1 in addition to 0 for the current message in summary/outlook; properly handle control psuedoheaders --- Debbugs/Control.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index 0390ba7..44d0062 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -2663,7 +2663,7 @@ Handles all setting of summary fields If summary is undef, unsets the summary -If summary is 0, sets the summary to the first paragraph contained in +If summary is 0 or -1, sets the summary to the first paragraph contained in the message passed. If summary is a positive integer, sets the summary to the message specified. @@ -2751,7 +2751,7 @@ sub _summary { elsif ($param{$cmd} =~ /^\d+$/) { my $log = []; my @records = Debbugs::Log::read_log_records(bug_num => $param{bug}); - if ($param{$cmd} == 0) { + if ($param{$cmd} == 0 or $param{$cmd} == -1) { $log = $param{message}; $summary_msg = @records + 1; } @@ -2785,7 +2785,7 @@ sub _summary { } # skip a paragraph if it looks like it's control or # pseudo-headers - if ($line =~ m{^\s*(?:Package|Source|Version|User|Tag|Severity)\:\s+\S}xi or #pseudo headers + if ($line =~ m{^\s*(?:Package|Source|Version|User|Tag|Severity|Control)\:\s+\S}xi or #pseudo headers $line =~ m{^(?:package:?|(?:no|)owner|severity|tags?|summary| #control \#|reopen|close|(?:not|)(?:fixed|found)|clone| debug|(?:not|)forwarded|priority| -- 2.39.2