[Debian-l10n-commits] r1124 - in /dl10n/trunk: Changelog lib/Debian/L10n/Spider.pm

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Mon Aug 4 18:40:41 UTC 2008


Author: nekral-guest
Date: Mon Aug  4 18:40:41 2008
New Revision: 1124

URL: http://svn.debian.org/wsvn/?sc=1&rev=1124
Log:
	* lib/Debian/L10n/Spider.pm: When we receive a BTS status, check
	the status of the bug so that we can set it to DONE. This permits
	to clear the history later on if another review cycle is started
	before we notice that the bug is actually closed.

Modified:
    dl10n/trunk/Changelog
    dl10n/trunk/lib/Debian/L10n/Spider.pm

Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1124&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Mon Aug  4 18:40:41 2008
@@ -1,3 +1,10 @@
+2008-08-04  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* lib/Debian/L10n/Spider.pm: When we receive a BTS status, check
+	the status of the bug so that we can set it to DONE. This permits
+	to clear the history later on if another review cycle is started
+	before we notice that the bug is actually closed.
+
 2008-08-04  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* lib/Debian/L10n/Spider.pm: Split check_bts_soap() into

Modified: dl10n/trunk/lib/Debian/L10n/Spider.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/L10n/Spider.pm?rev=1124&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/L10n/Spider.pm (original)
+++ dl10n/trunk/lib/Debian/L10n/Spider.pm Mon Aug  4 18:40:41 2008
@@ -412,9 +412,9 @@
 	}
 }
 
-sub check_bts_bug_soap ($) {
+sub check_bts_bug_soap ($$$$) {
 	my $db = shift;
-	my $soap = shift;
+	my $soap = shift || SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi');
 	my $pkg = shift;
 	my $statusline = shift;
 	my $changed = 0; # 0: No changes
@@ -499,8 +499,10 @@
 			}
 
 			if ($changed == 2) {
+print "    ***   Add status\n";
 				$db->add_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb);
 			} elsif ($changed == 1) {
+print "    ***   Set status\n";
 				$db->set_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb, $statusline);
 			}
 
@@ -676,6 +678,11 @@
 					}
 					$db->add_status($pkg, $type, $file, $date, $status, $translator, $list, $url, ($bug_nb || ""));
 					print "Insert $type#$file#$date#$status#$translator#$list#$url#".($bug_nb ? "$bug_nb" : "")."\n";
+					if ($status eq 'bts') {
+						# Check the status of the bug with the last status line.
+						# This will set the bug to status to DONE if the bug is an old one.
+						check_bts_bug_soap ($db, 0, $pkg, $db->status($pkg)->[0]);
+					}
 				}
 			} continue {
 				$db->set_header('Year',    $year   );




More information about the Debian-l10n-commits mailing list