[Debian-l10n-commits] r1487 - in /dl10n/trunk: Changelog lib/Debian/L10n/BTS.pm
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Sun Dec 7 19:50:39 UTC 2008
Author: nekral-guest
Date: Sun Dec 7 19:50:38 2008
New Revision: 1487
URL: http://svn.debian.org/wsvn/?sc=1&rev=1487
Log:
* lib/Debian/L10n/BTS.pm: Only check the BTS if a status has the
BTS tag, and no other status line follow for the pkg, type, file.
This will reduce the load on the BTS and reduce the number of
mails for the server admins.
Modified:
dl10n/trunk/Changelog
dl10n/trunk/lib/Debian/L10n/BTS.pm
Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1487&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Sun Dec 7 19:50:38 2008
@@ -1,3 +1,10 @@
+2008-12-06 Nicolas François <nicolas.francois at centraliens.net>
+
+ * lib/Debian/L10n/BTS.pm: Only check the BTS if a status has the
+ BTS tag, and no other status line follow for the pkg, type, file.
+ This will reduce the load on the BTS and reduce the number of
+ mails for the server admins.
+
2008-11-30 Nicolas François <nicolas.francois at centraliens.net>
* pootle/sync-projects.d/cfg/10debconf: Fix the link to the
Modified: dl10n/trunk/lib/Debian/L10n/BTS.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/L10n/BTS.pm?rev=1487&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/L10n/BTS.pm (original)
+++ dl10n/trunk/lib/Debian/L10n/BTS.pm Sun Dec 7 19:50:38 2008
@@ -61,23 +61,34 @@
my $count = 0;
foreach my $pkg (sort (grep { $db->has_status($_) } $db->list_packages())) {
- PKG_BTS:
+ # Only check a bug if the last status for a file/type is BTS
+ my %last_status = ();
foreach my $statusline (@{$db->status($pkg)}) {
my ($type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb) = @{$statusline};
warn "$pkg\:$type\:$file does not specify the status\n"
unless defined $status_from_db;
- next unless defined $status_from_db;
- next unless $bug_nb;
- next unless ($status_from_db eq 'bts')
- || ($status_from_db eq 'wontfix')
- || ($status_from_db eq 'fix');
- check_bts_bug_soap ($db, $pkg, $statusline);
- # Note: this will only add the DONE tags if bugs are now closed.
- # There is no need to parse these additional statusline.
- $count++;
- if ($count > 10) {
- $count = 0;
- $db->write($dbName) if defined $dbName;
+ $last_status{$type}{$file} = $statusline;
+ }
+
+ foreach my $t (keys %last_status) {
+ foreach my $f (keys %{$last_status{$t}}) {
+ my $statusline = $last_status{$t}{$f};
+ my ($type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb) = @{$statusline};
+ next unless defined $status_from_db;
+ next unless $bug_nb;
+ next unless ($status_from_db eq 'bts')
+ || ($status_from_db eq 'wontfix')
+ || ($status_from_db eq 'fix');
+ check_bts_bug_soap ($db, $pkg, $statusline);
+ # Note: this will only add the DONE tags
+ # if bugs are now closed.
+ # There is no need to parse these
+ # additional statusline.
+ $count++;
+ if ($count > 10) {
+ $count = 0;
+ $db->write($dbName) if defined $dbName;
+ }
}
}
}
More information about the Debian-l10n-commits
mailing list