[Collab-qa-commits] r390 - svnbuildstat/script

goneri-guest at alioth.debian.org goneri-guest at alioth.debian.org
Thu Aug 23 20:44:59 UTC 2007


Author: goneri-guest
Date: 2007-08-23 20:44:59 +0000 (Thu, 23 Aug 2007)
New Revision: 390

Modified:
   svnbuildstat/script/svnbuildstat_update-db.pl
Log:
do not scan a module is the revision is still the same since the last check
set issrcinmypool to false is the rev changed


Modified: svnbuildstat/script/svnbuildstat_update-db.pl
===================================================================
--- svnbuildstat/script/svnbuildstat_update-db.pl	2007-08-23 20:37:22 UTC (rev 389)
+++ svnbuildstat/script/svnbuildstat_update-db.pl	2007-08-23 20:44:59 UTC (rev 390)
@@ -205,6 +205,9 @@
     return;
 
   }
+  my $package = $schema->resultset('Package')->find_or_create({name => $packagesrc});
+  return unless $rev > $$package->rev; # do not continue unless needed
+  $package->issrcinmypool (0);
 
   my @changelog = `svn cat $uri/debian/changelog`;
   if (@changelog) {
@@ -249,11 +252,10 @@
     $todo .= $_ foreach @todo;
   }
 
-  my $package = $schema->resultset('Package')->find_or_create({name => $packagesrc});
   $package->update_from_related('repository_id',$$repository);
+  
   $package->svndebrelease ($svndebrelease);
   $package->uri($uri);
-  $package->rev($rev);
   $package->repository_id($$repository);
   foreach my $maintainer (@maintainer) {
     my $package_maintainer =
@@ -310,6 +312,7 @@
   $package->currentpendingbug($currentpendingbug);
   print "->".$package->name."\n";
   $package->lastcheck('now');
+  $package->rev($rev); # at the end since it marks in the new status of the package ins the DB
   $package->update();
 }
 




More information about the Collab-qa-commits mailing list