[Collab-qa-commits] r805 - svnbuildstat/trunk/script
goneri at alioth.debian.org
goneri at alioth.debian.org
Sat Apr 19 23:30:06 UTC 2008
Author: goneri
Date: 2008-04-19 23:30:05 +0000 (Sat, 19 Apr 2008)
New Revision: 805
Modified:
svnbuildstat/trunk/script/svnbuildstat_update-bugs.pl
Log:
adjust for the db changes
Modified: svnbuildstat/trunk/script/svnbuildstat_update-bugs.pl
===================================================================
--- svnbuildstat/trunk/script/svnbuildstat_update-bugs.pl 2008-04-19 23:14:36 UTC (rev 804)
+++ svnbuildstat/trunk/script/svnbuildstat_update-bugs.pl 2008-04-19 23:30:05 UTC (rev 805)
@@ -25,11 +25,10 @@
while( my $sourcepackage = $sourcepackage_rs->next) {
$currentPackage{$sourcepackage->name} = 1;
}
-#my $tmpfile = "/tmp/fullindex".$$;
-#
-#die if (!is_success( getstore("http://qa.debian.org/data/bts2ldap/fullindex", $tmpfile)));
-#print "download ok\n";
-my $tmpfile = "/tmp/fullindex.save";
+my $tmpfile = "/tmp/fullindex".$$;
+
+die if (!is_success( getstore("http://qa.debian.org/data/bts2ldap/fullindex", $tmpfile)));
+print "download ok\n";
my %keepThisBug;
my %keepThisBugmerged;
my %keepThisBugbugtag;
@@ -43,10 +42,10 @@
# if (!($h{debbugsTag} && $h{debbugsTag} =~ /(pending|wontfix|unreproducible|moreinfo)/)&& $h{debbugsState} =~ /open/) {
my $sourcepackage = $schema->resultset('Sourcepackage')->search({name => $h{debbugsSourcePackage}})->first;
- my $severity = $schema->resultset('Severity')->find_or_create({name=>$h{debbugsSeverity}});
+ my $severity = $schema->resultset('Bugseverity')->find_or_create({name=>$h{debbugsSeverity}});
my $bug = $schema->resultset('Bug')->find_or_create({id => $h{debbugsID}});
- $bug->severity_id ($severity->id);
+ $bug->bugseverity_id ($severity->id);
$bug->sourcepackage_id ($sourcepackage->id);
$bug->name ($h{debbugsTitle});
$bug->update;
@@ -59,9 +58,9 @@
my $bugmerged;
if ($_ > $h{debbugsID}) {
# bug1_id is the smallest bugnum
- $bugmerged = $schema->resultset('Mergedbug')->find_or_create(bug1_id => $h{debbugsID}, bug2_id => $_);
+ $bugmerged = $schema->resultset('Bugmerged')->find_or_create(bug1_id => $h{debbugsID}, bug2_id => $_);
} else {
- $bugmerged = $schema->resultset('Mergedbug')->find_or_create(bug1_id => $_, bug2_id => $h{debbugsID});
+ $bugmerged = $schema->resultset('Bugmerged')->find_or_create(bug1_id => $_, bug2_id => $h{debbugsID});
}
$keepThisBugmerged{$bugmerged->id} = 1;
}
@@ -96,7 +95,7 @@
while( my $bug = $bug_rs->next) {
$bug->delete unless exists ($keepThisBug{$bug->id});
}
-my $bugmerged_rs = $schema->resultset('Mergedbug');
+my $bugmerged_rs = $schema->resultset('Bugmerged');
while( my $bugmerged = $bugmerged_rs->next) {
$bugmerged->delete unless exists ($keepThisBugmerged{$bugmerged->id});
}
More information about the Collab-qa-commits
mailing list