[Debian-l10n-commits] r1120 - 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 05:43:27 UTC 2008


Author: nekral-guest
Date: Mon Aug  4 05:43:26 2008
New Revision: 1120

URL: http://svn.debian.org/wsvn/?sc=1&rev=1120
Log:
	* lib/Debian/L10n/Spider.pm: When a new cycle starts (after a
	DONE), do not wait 3 days to erase the old cycle history if a new
	status must be added to the database.

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=1120&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Mon Aug  4 05:43:26 2008
@@ -1,3 +1,9 @@
+2008-08-04  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* lib/Debian/L10n/Spider.pm: When a new cycle starts (after a
+	DONE), do not wait 3 days to erase the old cycle history if a new
+	status must be added to the database.
+
 2008-08-03  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* lib/Debian/L10n/Html.pm, lib/Debian/L10n/Spider.pm, dl10n-html:

Modified: dl10n/trunk/lib/Debian/L10n/Spider.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/L10n/Spider.pm?rev=1120&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/L10n/Spider.pm (original)
+++ dl10n/trunk/lib/Debian/L10n/Spider.pm Mon Aug  4 05:43:26 2008
@@ -772,6 +772,20 @@
 						$db->package($pkg);
 						$db->add_package($pkg,$pkg);
 					}
+					foreach my $statusline (@{$db->status($pkg)}) {
+						my ($type_from_db, $file_from_db, $date_from_db, $status_from_db, $translator_from_db, $list_from_db, $url_from_db, $bug_nb_from_db) = @{$statusline};
+						if (    $type eq $type_from_db
+						    and $file eq $file_from_db
+						    and $status_from_db eq 'done'
+						    and $status ne 'done') {
+							# A cycle was already
+							# finished. Clear the
+							# status of this file
+							# before we add status
+							# for the new cycle.
+							$db->del_status($pkg, $type, $file);
+						}
+					}
 					$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";
 				}




More information about the Debian-l10n-commits mailing list