From: Don Armstrong Date: Mon, 6 May 2013 23:01:03 +0000 (-0700) Subject: accept -1 in addition to 0 for the current message in summary/outlook; properly handl... X-Git-Tag: release/2.6.0~280^2~5 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=428eb4599f1aad8c4c5b71d02b91252a1daba24d accept -1 in addition to 0 for the current message in summary/outlook; properly handle control psuedoheaders --- 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|