use warnings;
use strict;
use vars qw($VERSION $DEBUG %EXPORT_TAGS @EXPORT_OK @EXPORT);
-use base qw(Exporter);
+use Exporter qw(import);
BEGIN{
$VERSION = 1.00;
}
}
}
- my @new_blockers = keys %blockers;
for my $data (@data) {
my $old_data = dclone($data);
# remove blockers and/or add new ones as appropriate
$mungable_blocks{add} = \%added_blockers if keys %added_blockers;
my $new_locks = 0;
for my $add_remove (keys %mungable_blocks) {
- my @munge_blockers;
my %munge_blockers;
- my $block_locks = 0;
for my $blocker (keys %{$mungable_blocks{$add_remove}}) {
next if $munge_blockers{$blocker};
my ($temp_locks, @blocking_data) =
__begin_control(%param,
command => 'tag'
);
- my ($debug,$transcript) =
- @info{qw(debug transcript)};
+ my $transcript = $info{transcript};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my @tags = make_list($param{tag});
if (not @tags and ($param{remove} or $param{add})) {
if ($param{remove}) {
my $action = 'Did not alter tags';
my %tag_added = ();
my %tag_removed = ();
- my %fixed_removed = ();
my @old_tags = split /\,?\s+/, $data->{keywords};
my %tags;
@tags{@old_tags} = (1) x @old_tags;
- my $reopened = 0;
my $old_data = dclone($data);
if (not $param{add} and not $param{remove}) {
$tag_removed{$_} = 1 for @old_tags;
__begin_control(%param,
command => 'severity'
);
- my ($debug,$transcript) =
- @info{qw(debug transcript)};
+ my $transcript = $info{transcript};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
__begin_control(%param,
command => $param{reopen}?'reopen':'done',
);
- my ($debug,$transcript) =
- @info{qw(debug transcript)};
+ my $transcript = $info{transcript};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action ='';
if ($param{reopen}) {
}
else {
my %submitter_notified;
- my $requester_notified = 0;
my $orig_report_set = 0;
for my $data (@data) {
if (exists $data->{done} and
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
# here we only concern ourselves with the first of the merged bugs
for my $data ($data[0]) {
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
my $old_data = dclone($data);
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
my $old_data = dclone($data);
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
# clean up the new package
my $new_package =
join(',',
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my %versions;
for my $version (make_list($param{found})) {
next unless defined $version;
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my %versions;
for my $version (make_list($param{fixed})) {
next unless defined $version;
return;
}
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my %data;
my %merged_bugs;
for my $data (@data) {
# handle unmerging
my $new_locks = 0;
if (not exists $param{merge_with}) {
- my $ok_to_unmerge = 1;
delete $merged_bugs{$param{bug}};
if (not keys %merged_bugs) {
print {$transcript} "Ignoring request to unmerge a bug which is not merged with any others.\n";
return;
}
# lock and load all of the bugs we need
- my @bugs_to_load = keys %merging;
- my $bug_to_load;
- my %merge_added;
my ($data,$n_locks) =
__lock_and_load_merged_bugs(bugs_to_load => [keys %merging],
data => \@data,
my %target_blockedby;
@target_blockedby{@{$change->{func_value}}} = (1) x @{$change->{func_value}};
my %unhandled_targets = %target_blockedby;
- my @blocks_to_remove;
for my $key (split / /,$change->{orig_value}) {
delete $unhandled_targets{$key};
next if exists $target_blockedby{$key};
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
$action = '';
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
# figure out the log that we're going to use
my $summary = '';
my $summary_msg = '';
print {$debug} "Removing $cmd fields\n";
$action = "Removed $cmd";
}
- elsif ($param{$cmd} =~ /^\d+$/) {
+ elsif ($param{$cmd} =~ /^-?\d+$/) {
my $log = [];
my @records = Debbugs::Log::read_log_records(bug_num => $param{bug});
if ($param{$cmd} == 0 or $param{$cmd} == -1) {
__begin_control(%param,
command => 'clone'
);
- my ($debug,$transcript) =
- @info{qw(debug transcript)};
+ my $transcript = $info{transcript};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
for my $bug (split ' ', $data->{blocks}) {
for my $new_bug (@new_bugs) {
set_blocks(bug => $bug,
- block => $new_bug,
+ block => $new_bug,
+ add => 1,
hash_slice(%param,
keys %common_options,
keys %append_action_options),
for my $bug (split ' ', $data->{blockedby}) {
for my $new_bug (@new_bugs) {
set_blocks(bug => $new_bug,
- block => $bug,
+ block => $bug,
+ add => 1,
hash_slice(%param,
keys %common_options,
keys %append_action_options),
my ($debug,$transcript) =
@info{qw(debug transcript)};
my @data = @{$info{data}};
- my @bugs = @{$info{bugs}};
my $action = '';
for my $data (@data) {
print {$debug} "Going to change owner to '".(defined $param{owner}?$param{owner}:'(going to unset it)')."'\n";
command=>'unarchive');
my ($debug,$transcript) =
@info{qw(debug transcript)};
- my @data = @{$info{data}};
my @bugs = @{$info{bugs}};
my $action = "$config{bug} unarchived.";
my @files_to_remove;