blob: 5d146ba86426d05c9e3fd34d6a4fe05400af0dcf [file] [log] [blame]
Version 7<p>
<?php
require_once "/home/data/httpd/eclipse-php-classes/system/dbconnection_dashboard_rw.class.php";
$db_connection = new DBConnectionDashboard();
$db_handle = $db_connection->connect();
// $query = "CREATE TABLE COMMITS ( ID int not null auto_increment, DATE datetime,
// REPOSITORY text, FILENAME text, REVISION text, CHANGE_SIZE int, LOGIN text,
// MESSAGE_SIZE int, primary key (ID) )";
$filename = "/home/data/users/bfreeman/cvslogging/pending0.txt";
echo $filename . "<br>\n";
echo filesize($filename) . "<br>\n";
$lines = file( $filename );
print_r($lines);
foreach( $lines as $line ) {
list($year, $month, $day, $hour, $min, $sec, $repository, $user, $filepath, $revision) = explode( "|", $line );
echo $line . "<br>\n";
$query = "INSERT INTO COMMITS ( REPOSITORY, FILENAME, REVISION, LOGIN ) VALUES ( "
. "'$repository', "
. "'$filepath', "
. "'$revision', "
. "'$user' )";
echo $query."<br>";
/*
mysql_query($query,$db_handle) or die("Error executing: ".mysql_error());
*/
}
/*
* open the pendingN.txt file
* read each line
* 2: do a cvs log info get on that file
* 2: get the LOChange and LOLog
* 3: parse the log message for bug references
* write a database line
* 4: clear the pendingN.txt file
*/
$db_handle = null;
$db_connection = null;
?>
End of page<p>