]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Control.pm
clarify that blockers which are bad could be archived
[debbugs.git] / Debbugs / Control.pm
index 32239afbf7426b221a802d32d6331b202bdf4923..6b2ab9181025df9663719c9b5f9ce612362b8504 100644 (file)
@@ -364,7 +364,7 @@ sub set_blocks {
        next if $ok_blockers{$blocker} or $bad_blockers{$blocker};
        my $data = read_bug(bug=>$blocker,
                           );
-       if (defined $data and not $data->{archive}) {
+       if (defined $data and not $data->{archived}) {
            $data = split_status_fields($data);
            $ok_blockers{$blocker} = 1;
            my @merged_bugs;
@@ -380,8 +380,8 @@ sub set_blocks {
     # blocker
     if (keys %bad_blockers and $mode eq 'set') {
        __end_control(%info);
-       croak "Unknown blocking bug(s):".join(', ',keys %bad_blockers).
-           keys %ok_blockers?'':" and no known blocking bug(s)";
+       croak "Unknown/archived blocking bug(s):".join(', ',keys %bad_blockers).
+           keys %ok_blockers?'':" and no good blocking bug(s)";
     }
     # if there are no ok blockers and we are not setting the blockers,
     # there's an error.
@@ -389,7 +389,7 @@ sub set_blocks {
        print {$transcript} "No valid blocking bug(s) given; not doing anything\n";
        if (keys %bad_blockers) {
            __end_control(%info);
-           croak "Unknown blocking bug(s):".join(', ',keys %bad_blockers);
+           croak "Unknown/archived blocking bug(s):".join(', ',keys %bad_blockers);
        }
        __end_control(%info);
        return;
@@ -2298,13 +2298,22 @@ sub __calculate_merge_status{
            $merged_bugs{$data->{bug_num}} = 1;
            $bugs_to_merge = 1;
        }
+    }
+    for my $data (@{$data_a}) {
        # the master_bug is the bug that every other bug is made to
        # look like. However, if merge is set, tags, fixed and found
        # are merged.
        if ($data->{bug_num} == $master_bug) {
-           for (qw(package forwarded severity blocks blockedby done owner summary outlook affects)) {
+           for (qw(package forwarded severity done owner summary outlook affects)) {
                $merge_status{$_} = $data->{$_}
            }
+           # bugs which are in the newly merged set and are also
+           # blocks/blockedby must be removed before merging
+           for (qw(blocks blockedby)) {
+               $merge_status{$_} =
+                   join(' ',grep {not exists $merged_bugs{$_}}
+                        split / /,$data->{$_});
+           }
        }
        if (defined $merge_status) {
            next unless $data->{bug_num} == $master_bug;
@@ -2782,7 +2791,8 @@ sub _summary {
                                 \#|reopen|close|(?:not|)(?:fixed|found)|clone|
                                 debug|(?:not|)forwarded|priority|
                                 (?:un|)block|limit|(?:un|)archive|
-                                reassign|retitle|affects|wrongpackage
+                                reassign|retitle|affects|package|
+                                outlook|
                                 (?:un|force|)merge|user(?:category|tags?|)
                             )\s+\S}xis) {
                   if (not length $paragraph) {