Author: adsb
Date: 2009-07-29 11:06:09 +0000 (Wed, 29 Jul 2009)
New Revision: 1943

Modified:
   trunk/debian/changelog
   trunk/scripts/bts.pl
Log:
* bts:
  + Add the "affects" command to mark a bug as affecting packages other
    than the package it was filed against.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2009-07-24 16:42:47 UTC (rev 1942)
+++ trunk/debian/changelog      2009-07-29 11:06:09 UTC (rev 1943)
@@ -1,8 +1,11 @@
 devscripts (2.10.53) UNRELEASED; urgency=low
 
   [ Adam D. Barratt ]
-  * bts: Add a missing "use IO::File" to make "bts select file:foo" work.
-    Thanks, Raphaël Hertzog.  (Closes: #538288)
+  * bts:
+    + Add a missing "use IO::File" to make "bts select file:foo" work.
+      Thanks, Raphaël Hertzog.  (Closes: #538288)
+    + Add the "affects" command to mark a bug as affecting packages other
+      than the package it was filed against.
   * checkbashisms: Detect the use of "source" when the sourced filename
     contains a tilde (Closes: #528592) or consists of a single character
     (Closes: #535252).  Thanks, Raphael Geissert and Ryan Niebur.

Modified: trunk/scripts/bts.pl
===================================================================
--- trunk/scripts/bts.pl        2009-07-24 16:42:47 UTC (rev 1942)
+++ trunk/scripts/bts.pl        2009-07-29 11:06:09 UTC (rev 1943)
@@ -1556,6 +1556,44 @@
     }
 }
 
+=item affects <bug> [+|-|=] <package> [<package> ..]
+
+Indicates that a bug affects a package other than that against which it is 
filed, causing
+the bug to be listed by default in the package list of the other package.  
This should 
+generally be used where the bug is severe enough to cause multiple reports 
from users to be 
+assigned to the wrong package. 
+
+=cut
+
+sub bts_affects {
+    my $bug=checkbug(shift) or die "bts affects: mark what bug as affecting 
another package?\n";
+
+    if (! @_) {
+       die "bts affects: mark which package as affected?\n";
+    }
+    # Parse the rest of the command line.
+    my $command="affects $bug";
+    my $flag="";
+    if ($_[0] =~ /^[-+=]$/) {
+       $flag = $_[0];
+       $command .= " $flag";
+       shift;
+    } elsif ($_[0] =~ s/^([-+=])//) {
+       $flag = $1;
+       $command .= " $flag";
+    }
+
+    if (! @_) {
+       die "bts affects: mark which package as affected?\n";
+    }
+
+    foreach my $package (@_) {
+       $command .= " $package";
+    }
+
+    mailbts("affects $bug", $command);
+}
+
 =item user <email>
 
 Specify a user email address before using the usertags command.



-- 
To unsubscribe, send mail to pkg-devscripts-unsubscr...@teams.debian.net.

Reply via email to