| 1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
| 2 |
# Last-Modified: <Wed Jul 23 10:02:51 2008> |
# Last-Modified: <Wed Jul 23 11:21:47 2008> |
| 3 |
|
|
| 4 |
use strict; |
use strict; |
| 5 |
use warnings; |
use warnings; |
| 34 |
$dbh->prepare("DELETE FROM bugs")->execute(); |
$dbh->prepare("DELETE FROM bugs")->execute(); |
| 35 |
$dbh->prepare("DELETE from bug_found_in")->execute(); |
$dbh->prepare("DELETE from bug_found_in")->execute(); |
| 36 |
$dbh->prepare("DELETE from bug_fixed_in")->execute(); |
$dbh->prepare("DELETE from bug_fixed_in")->execute(); |
| 37 |
|
$dbh->prepare("DELETE FROM bug_merged_with")->execute(); |
| 38 |
|
|
| 39 |
# Read all bugs |
# Read all bugs |
| 40 |
foreach my $bug_nr (get_bugs()) { |
foreach my $bug_nr (get_bugs()) { |
| 63 |
$query = "INSERT INTO bug_fixed_in VALUES ($bug_nr, $version)"; |
$query = "INSERT INTO bug_fixed_in VALUES ($bug_nr, $version)"; |
| 64 |
$dbh->prepare($query)->execute() or die $!; |
$dbh->prepare($query)->execute() or die $!; |
| 65 |
} |
} |
| 66 |
|
foreach my $mergee (split / /, $bug{mergedwith}) { |
| 67 |
|
$query = "INSERT INTO bug_merged_with VALUES ($bug_nr, $mergee)"; |
| 68 |
|
$dbh->prepare($query)->execute() or die $!; |
| 69 |
|
} |
| 70 |
} |
} |
| 71 |
|
|
| 72 |
$dbh->commit(); |
$dbh->commit(); |