use vars qw($dbhost $dbname $dbuser $dbpass $dbport
);
-require "$ENV{BFConfDir}/BuildFarmWeb.pl";
+
+use FindBin qw($RealBin);
+require "$RealBin/../BuildFarmWeb.pl";
die "no dbname" unless $dbname;
die "no dbuser" unless $dbuser;
die $DBI::errstr unless $db;
my ($brhandle,@branches_of_interest);
-if (open($brhandle,"$ENV{BFConfDir}/htdocs/branches_of_interest.txt"))
+if (open($brhandle,"$RealBin/../htdocs/branches_of_interest.txt"))
{
@branches_of_interest = <$brhandle>;
close($brhandle);
WHERE sysname = ?
AND branch = ?
]);
-
+my $del_snap_sth = $db->prepare(q[
+ DELETE FROM latest_snapshot
+ WHERE sysname = ?
+ AND branch = ?
+ ]);
while (my $row = $sth->fetchrow_hashref)
{
my $sysname = $row->{sysname};
print "** Delete branch $branch\n";
$del_sth->execute($sysname,$branch);
$del_dash_sth->execute($sysname,$branch);
+ $del_snap_sth->execute($sysname,$branch);
}
}
$db->disconnect();