version 1.24, 2003/02/20 20:59:03
|
version 1.50, 2003/02/21 13:56:30
|
Line 15 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 15 cvs -d :pserver:guest@mozdev.org:/cvs co
|
</pre> |
</pre> |
|
|
</li> |
</li> |
</ul><?php $doNotCapitalise = 1; ?> | </ul><?php $doNotCapitalise = 1; $project='orbits'; // testing ?> |
|
|
<?php |
<?php |
|
|
// $Id$ |
// $Id$ |
|
// $cvsId: sources.html,v 1.37 2003/02/21 00:43:24 cdn Exp svc$ |
|
|
require("include/CVS_PATHS"); |
require("include/CVS_PATHS"); |
|
|
define(MAX_READ_SIZE, 500000); |
define(MAX_READ_SIZE, 500000); |
define(MAX_READ, 100000); |
define(MAX_READ, 100000); |
|
|
$today = date("y/m/d"); | $today = date("y/m/d"); |
| $day = (int)date('d'); |
| --$day; |
| $yesterday = date("y/m/" . sprintf('%2u', $day)); |
$commit_log = "cvs@$project.mozdev.org"; |
$commit_log = "cvs@$project.mozdev.org"; |
|
|
// show_source(COMMIT_PATH.$commit_log); | $today = '03/02/14'; |
|
|
if(!$local_conf_commits) |
if(!$local_conf_commits) |
print '<span id="CVS-local-conf-commits">' . $local_conf_commits_msg . "</span>\n"; |
print '<span id="CVS-local-conf-commits">' . $local_conf_commits_msg . "</span>\n"; |
|
|
//BEGIN BLOCK |
//BEGIN BLOCK |
if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) { |
if(file_exists(COMMIT_PATH.$commit_log) && $local_conf_commits) { |
|
// if(file_exists('/tmp/commit_test') && $local_conf_commits) { |
|
|
$size = filesize(COMMIT_PATH.$commit_log); |
$size = filesize(COMMIT_PATH.$commit_log); |
|
// $size = filesize('/tmp/commit_test'); |
$contents = array(); |
$contents = array(); |
if ($size > MAX_READ_SIZE) { |
if ($size > MAX_READ_SIZE) { |
// print "<!-- Log File is greater than 500K -->\n"; |
// print "<!-- Log File is greater than 500K -->\n"; |
Line 54 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 60 cvs -d :pserver:guest@mozdev.org:/cvs co
|
$tok = strtok("\n"); |
$tok = strtok("\n"); |
} |
} |
fclose($fp); |
fclose($fp); |
} // echo '<pre>' . $contents[0] . '</pre>'; | } |
| |
if (!$contents) |
if (!$contents) |
|
{ |
$contents = file(COMMIT_PATH.$commit_log); |
$contents = file(COMMIT_PATH.$commit_log); |
|
// $contents = file('/tmp/commit_test'); |
|
} |
|
|
|
echo '<pre>' . $contents . '</pre>'; |
|
|
$len=count($contents); |
$len=count($contents); |
$r = -1; |
$r = -1; |
|
|
// echo '<pre style="color: red;">' . $contents[0] . '</pre>'; |
|
|
|
$_project = $project; |
$_project = $project; |
|
|
Line 69 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 81 cvs -d :pserver:guest@mozdev.org:/cvs co
|
$_project = PROJECT; |
$_project = PROJECT; |
} |
} |
|
|
print '<h4 id="CVS-h4">' . "Today's CVS Commits for " . $_project . " Project</h4>\n"; | // print '<h4 id="CVS-h4">' . "Today's CVS Commits for " . $_project . " Project</h4>\n"; |
| // print '<h4 id="CVS-h4">' . "Yesterday's CVS Commits for " . $_project . " Project</h4>\n"; |
| print '<h4 id="CVS-h4">' . "Some day's CVS Commits for " . $_project . " Project</h4>\n"; |
print '<table border="0" cellpadding="0" cellspacing="2" id="CVS-table">' . "\n"; |
print '<table border="0" cellpadding="0" cellspacing="2" id="CVS-table">' . "\n"; |
|
|
if($len) { |
if($len) { |
Line 77 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 91 cvs -d :pserver:guest@mozdev.org:/cvs co
|
if(ereg("Modified: www", $contents[$l]) && !$local_conf_commits) |
if(ereg("Modified: www", $contents[$l]) && !$local_conf_commits) |
break; |
break; |
|
|
|
// if(ereg(" Date: [0-9]{2}/[0-9]{2}/[0-9]{2}", $contents[$i])) { |
|
// if(ereg(" Date: $yesterday", $contents[$i])) { |
if(ereg(" Date: $today", $contents[$i])) { |
if(ereg(" Date: $today", $contents[$i])) { |
$r++; |
$r++; |
$result[$r] = |
$result[$r] = |
Line 88 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 104 cvs -d :pserver:guest@mozdev.org:/cvs co
|
"\n</td></tr>\n" . |
"\n</td></tr>\n" . |
'<tr class="CVS-tr-checkins"><td class="CVS-td-checkins">' . "\n"; |
'<tr class="CVS-tr-checkins"><td class="CVS-td-checkins">' . "\n"; |
|
|
|
$webcvs = 'http://www.mozdev.org/source/browse/' . $project; // . '/'; |
|
|
for($l=$i+1;$l<$len;$l++) { |
for($l=$i+1;$l<$len;$l++) { |
if(ereg(" Revision Changes Path", $contents[$l])) |
if(ereg(" Revision Changes Path", $contents[$l])) |
break; |
break; |
Line 103 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 121 cvs -d :pserver:guest@mozdev.org:/cvs co
|
// ' Removed: www/protected sources.html' |
// ' Removed: www/protected sources.html' |
// ' www/compact index.html' ? |
// ' www/compact index.html' ? |
|
|
$webcvs = 'http://www.mozdev.org/source/browse/' . $project; // . '/'; | if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("[[:space:]]{9}", $checkins) ) |
| |
if ( ereg("((Added|Modified|Removed):)", $checkins) ) | |
{ |
{ |
$checkins = trim($checkins); |
|
|
|
$checkins = ereg_replace('[[:space:]]{1,}', ' ', $checkins); | $identifier = trim(substr($checkins, 0, 15)); // echo $identifier . '<p />'; |
| |
| $checkins = substr($checkins, 15); // echo $checkins . '<p />'; |
| |
| // find first non-space character |
| // if > 16, chances are the files are in the directory defined in the previous line ? |
| |
| $_16 = strpos($checkins, ' '); // echo '$_16 ' . $_16 . '<p />'; |
| |
| $_path = substr( $checkins, 0, $_16); // echo $_path . '<p />'; |
| |
| // if ( $_16 > 16 ) // not going to happen frequently : ) |
| $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) ); |
| |
| $__path = trim($_path); |
| |
| if ( !empty( $__path ) ) |
| { |
| $chkA1 = $_path; |
| } |
|
|
$checkinsA = explode(' ', $checkins); |
$checkinsA = explode(' ', $checkins); |
|
|
Line 120 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 154 cvs -d :pserver:guest@mozdev.org:/cvs co
|
$checkinsA[$z] = trim($checkinsA[$z]); |
$checkinsA[$z] = trim($checkinsA[$z]); |
} |
} |
|
|
$chkA1 = $checkinsA[1]; | if ( !empty($identifier) ) |
| $checkins = $identifier; |
$webcvs .= '/' . $chkA1; | |
|
|
$checkins = $checkinsA[0] . ' <a href="' . $webcvs; | if ( !empty($_path)) |
$checkins .= '">' . $chkA1 . '</a>'; | { |
| $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // reset important ! |
| $webcvs .= '/' . $_path; |
| $_path_ = $_path; |
| $checkins .= ' <a href="' . $webcvs; |
| $checkins .= '">' . $_path . '</a>'; |
| } |
|
|
// reset($checkinsA); |
|
for($y=0; $y < count($checkinsA); ++$y) |
for($y=0; $y < count($checkinsA); ++$y) |
{ |
{ |
// how can $webcvs not have $chkA1 as part of it ? |
|
|
|
if($y >= 2) | if(!$checkinsA[$y] == 'Tag:' && !$checkinsA[$y-1] == 'Tag:') |
{ | { |
$checkins .= ' <a href="' . $webcvs . '/' . $checkinsA[$y] . '">'; | $checkins .= ' <a href="' . $webcvs . '/' . $checkinsA[$y] . '">'; |
$checkins .= $checkinsA[$y] . '</a>'; | } |
} | else |
| { |
| $checkins .= ' '; |
| } |
| |
| $checkins .= $checkinsA[$y]; |
| |
| if(!$checkinsA[$y] == 'Tag:' && !$checkinsA[$y-1] == 'Tag:'): $checkins .= '</a>'; endif; |
| |
} |
} |
|
|
} |
} |
|
|
$result[$r] .= '<div class="CVS-div-checkins">' . $checkins . |
$result[$r] .= '<div class="CVS-div-checkins">' . $checkins . |