[Collab-qa-commits] r921 - in udd/src: . udd

neronus-guest at alioth.debian.org neronus-guest at alioth.debian.org
Wed Jul 23 12:09:05 UTC 2008


Author: neronus-guest
Date: 2008-07-23 12:09:04 +0000 (Wed, 23 Jul 2008)
New Revision: 921

Modified:
   udd/src/setup-db.sql
   udd/src/udd/bugs_gatherer.pl
Log:
Added found_in and fixed_in and merged_with


Modified: udd/src/setup-db.sql
===================================================================
--- udd/src/setup-db.sql	2008-07-23 10:33:26 UTC (rev 920)
+++ udd/src/setup-db.sql	2008-07-23 12:09:04 UTC (rev 921)
@@ -68,6 +68,11 @@
 GRANT SELECT ON Packages TO PUBLIC;
 GRANT SELECT ON sources TO PUBLIC;
 GRANT SELECT ON popcon TO PUBLIC;
-
 GRANT SELECT ON popcon_average TO PUBLIC;
 GRANT SELECT ON popcon_max TO PUBLIC;
+GRANT SELECT ON bugs TO PUBLIC;
+GRANT SELECT ON bug_merged_with TO PUBLIC;
+GRANT SELECT ON bug_found_in TO PUBLIC;
+GRANT SELECT ON bug_fixed_in TO PUBLIC;
+GRANT SELECT ON bug_user_tags TO PUBLIC;
+

Modified: udd/src/udd/bugs_gatherer.pl
===================================================================
--- udd/src/udd/bugs_gatherer.pl	2008-07-23 10:33:26 UTC (rev 920)
+++ udd/src/udd/bugs_gatherer.pl	2008-07-23 12:09:04 UTC (rev 921)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# Last-Modified: <Wed Jul 23 10:02:51 2008>
+# Last-Modified: <Wed Jul 23 11:21:47 2008>
 
 use strict;
 use warnings;
@@ -34,6 +34,7 @@
 	$dbh->prepare("DELETE FROM bugs")->execute();
 	$dbh->prepare("DELETE from bug_found_in")->execute();
 	$dbh->prepare("DELETE from bug_fixed_in")->execute();
+	$dbh->prepare("DELETE FROM bug_merged_with")->execute();
 
 	# Read all bugs
 	foreach my $bug_nr (get_bugs()) {
@@ -62,6 +63,10 @@
 			$query = "INSERT INTO bug_fixed_in VALUES ($bug_nr, $version)";
 			$dbh->prepare($query)->execute() or die $!;
 		}
+		foreach my $mergee (split / /, $bug{mergedwith}) {
+			$query = "INSERT INTO bug_merged_with VALUES ($bug_nr, $mergee)";
+			$dbh->prepare($query)->execute() or die $!;
+		}
 	}
 
 	$dbh->commit();




More information about the Collab-qa-commits mailing list