]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
merge changes from dla source
[debbugs.git] / scripts / service
index 0dfa366293bf641ea0f1555ce01f1b5753e685b2..0d23df44bdb621f71bd7a569b42cd709d97f63a8 100755 (executable)
@@ -787,7 +787,7 @@ END
        $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
        $bug_affected{$ref}=1;
        my $tags = $2;
-       my @tags = split /[\s,]+/, $tags;
+       my @tags = map {m/^([+=-])(.+)/ ? ($1,$2):($_)} split /[\s,]+/, $tags;
        # this is an array of hashrefs which contain two elements, the
        # first of which is the array of tags, the second is the
        # option to pass to set_tag (we use a hashref here to make it
@@ -852,7 +852,7 @@ END
        $ok++;
         $ref= $2;
        my $add_remove = defined $1 && $1 eq 'un';
-       my @blockers = split /[\s,]+/, $3;
+       my @blockers = map {exists $clonebugs{$_}?$clonebugs{$_}:$_} split /[\s,]+/, $3;
        $ref = $clonebugs{$ref} if exists $clonebugs{$ref};
        $bug_affected{$ref} = 1;
        eval {
@@ -1111,11 +1111,16 @@ END
        if (scalar(@pkgs) > 0) {
                %limit_pkgs = map { ($_, 1) } @pkgs;
                $limit{package} = [@pkgs];
-               print {$transcript} "Ignoring bugs not assigned to: " .
-                       join(" ", keys(%limit_pkgs)) . "\n\n";
+               print {$transcript} "Limiting to bugs with field 'package' containing at least one of ".join(', ',map {qq('$_')} @pkgs)."\n";
+               print {$transcript} "Limit currently set to";
+               for my $limit_field (keys %limit) {
+                   print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
+               }
+               print {$transcript} "\n";
        } else {
-               %limit_pkgs = ();
-               print {$transcript} "Not ignoring any bugs.\n\n";
+           %limit_pkgs = ();
+           $limit{package} = [];
+           print {$transcript} "Limit cleared.\n\n";
        }
     } elsif (m/^limit\:?\s+(\S.*\S)\s*$/) {
        $ok++;
@@ -1131,9 +1136,9 @@ END
            # fixing this.
            $limit{$field} = [@options];
            print {$transcript} "Limiting to bugs with field '$field' containing at least one of ".join(', ',map {qq('$_')} @options)."\n";
-           print {$transcript} "Limit currently set to ";
+           print {$transcript} "Limit currently set to";
            for my $limit_field (keys %limit) {
-               print {$transcript} "  '$limit_field':".join(', ',map {qq('$_')} @options)."\n";
+               print {$transcript} " '$limit_field':".join(', ',map {qq('$_')} @{$limit{$limit_field}})."\n";
            }
            print {$transcript} "\n";
        }