Author: adsb
Date: 2009-01-29 20:38:35 +0000 (Thu, 29 Jan 2009)
New Revision: 1806
Modified:
trunk/debian/changelog
trunk/scripts/bts.pl
Log:
* bts:
+ If the debbugs host in use is bugs(-*).d.o, use bugs-master.d.o when
reporting spam to match recent changes to the BTS.
+ If -n / --no-action was given on the command line, print the URL that
would have been used to report spam rather than sending the report.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-01-21 21:27:18 UTC (rev 1805)
+++ trunk/debian/changelog 2009-01-29 20:38:35 UTC (rev 1806)
@@ -1,5 +1,10 @@
devscripts (2.10.46) UNRELEASED; urgency=low
+ * bts:
+ + If the debbugs host in use is bugs(-*).d.o, use bugs-master.d.o when
+ reporting spam to match recent changes to the BTS.
+ + If -n / --no-action was given on the command line, print the URL that
+ would have been used to report spam rather than sending the report.
* README.newscripts: Correct the "svn propset" syntax added in the previous
upload.
Modified: trunk/scripts/bts.pl
===================================================================
--- trunk/scripts/bts.pl 2009-01-21 21:27:18 UTC (rev 1805)
+++ trunk/scripts/bts.pl 2009-01-29 20:38:35 UTC (rev 1806)
@@ -647,8 +647,9 @@
my $btscgispamurl=$btscgiurl . 'bugspam.cgi';
my $btsemail='control@' . $btsserver;
my $packagesserver='';
-if ($btsserver =~ /bugs(-[\w-]+)?\.debian\.org/i) {
+if ($btsserver =~ /^bugs(-[\w-]+)?\.debian\.org/i) {
$packagesserver = 'packages.debian.org';
+ $btscgispamurl =~ s|$btsurl|http://bugs-master.debian.org/|;
}
no warnings 'once';
$Devscripts::Debbugs::btsurl=$btsurl;
@@ -1760,10 +1761,17 @@
init_agent() unless $ua;
foreach my $bug (@bugs) {
- my $request = HTTP::Request->new('GET',
"$btscgispamurl?bug=$bug;ok=ok");
- my $response = $ua->request($request);
- if (! $response->is_success) {
- warn "bts: failed to report $bug as containing spam: " .
$response->status_line . "\n";
+ my $url = "$btscgispamurl?bug=$bug;ok=ok";
+ if ($noaction) {
+ print "bts reportspam: would report $bug as containing spam (URL: "
.
+ $url . ")\n";
+ } else {
+ my $request = HTTP::Request->new('GET', $url);
+ my $response = $ua->request($request);
+ if (! $response->is_success) {
+ warn "bts: failed to report $bug as containing spam: " .
+ $response->status_line . "\n";
+ }
}
}
}
--
To unsubscribe, send mail to [email protected].