use Debbugs::Log::Spam;
use Debbugs::Config qw(:config);
use Debbugs::Command qw(:all);
+use Debbugs::Common qw(getbuglocation);
use IPC::Open3 qw(open3);
use Carp;
my %subcommands =
('auto-scan' => {function => \&auto_spamscan,
arguments => {'ham_threshold|ham-threshold=s' => 0,
+ 'skip_missing|skip-missing!' => 0,
},
- defaults => {ham_threshold => -5},
+ defaults => {ham_threshold => -5,
+ skip_missing => 0,
+ },
},
'score' => {function => \&score_bug,
arguments => {'skip_seen|skip-seen!' => 0
my ($options,$opts,$config,$argv) = @_;
for my $bug_num (@{$argv}) {
+ if ($opts->{skip_missing} and
+ not defined getbuglocation($bug_num,'log')) {
+ print STDERR "bug $bug_num does not exist\n" if $options->{verbose} > -1;
+ next;
+ }
my $spam = Debbugs::Log::Spam->new(bug_num => $bug_num) or
die "Unable to open bug log spam for $bug_num";
foreachmsg(sub {