version 1.56, 2003/02/21 14:33:59
|
version 1.88, 2003/02/21 20:59:17
|
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; $project='orbits'; // testing ?> | </ul><?php $doNotCapitalise = 1; // $project='orbits'; // testing ?> |
|
|
<?php |
<?php |
|
|
Line 33 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 33 cvs -d :pserver:guest@mozdev.org:/cvs co
|
$yesterday = date("y/m/" . sprintf('%2u', $day)); |
$yesterday = date("y/m/" . sprintf('%2u', $day)); |
$commit_log = "cvs@$project.mozdev.org"; |
$commit_log = "cvs@$project.mozdev.org"; |
|
|
$today = '03/02/14'; | // $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('/tmp/commit_test') && $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'); |
// $size = filesize('/tmp/commit_test'); |
Line 64 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 65 cvs -d :pserver:guest@mozdev.org:/cvs co
|
|
|
if (!$contents) |
if (!$contents) |
{ |
{ |
|
// |
$contents = file(COMMIT_PATH.$commit_log); |
$contents = file(COMMIT_PATH.$commit_log); |
// $contents = file('/tmp/commit_test'); | // $contents = file('/tmp/commit_test'); // echo 'boing '; echo $contents; |
} |
} |
|
|
echo '<pre>'; | // preprocess Tag: stuff |
|
|
for($i=0; $i < count($contents); ++$i) | // |
{ | $stnetnoc = implode('', $contents); |
echo htmlspecialchars($contents[$i]); | |
} | // $contents = ereg_replace('Tag\:[[:space:]]{1,}', 'Tag: ', $stnetnoc); |
| |
| // |
| // '_[_cdn_]_ Log:' |
| // '_[_cdn_]_ Tag: ...' |
| |
| // $contents = ereg_replace('Log\:[[:space:]]{1,}Tag', "Log\:\n Tg", $contents); |
| // |
| $contents = str_replace("Log:\n Tag", "Log:\n Tg", $contents); |
| |
| // |
| // '_[_cdn_]_ Log:' |
| // '_[_cdn_]_ Tg: ...' |
| |
| // $stnetnoc = ereg_replace("Tag\:\ [^[:space:]\.]{1,}\ ", "\\0\n ", $contents); |
| // needs to not process 'Tag:' if in a commemt, i.e. it follows 'Log:' |
| |
| // $stetnoc = ereg_replace("Log\:[[:space:]]{1,}Tg", "Log\:\n Tag", $stetnoc); |
| // $stetnoc = str_replace("Log:\n Tg", "Log\:\n Tag", $stetnoc); |
| $stetnoc = str_replace("Log:\n Tg", "Log\:\n Tag", $contents); |
| |
| // |
| $contents = explode("\n", $stnetnoc); |
| |
| // /preprocess Tag: stuff |
|
|
echo '</pre>'; |
|
|
|
$len=count($contents); |
$len=count($contents); |
$r = -1; |
$r = -1; |
|
|
Line 89 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 113 cvs -d :pserver:guest@mozdev.org:/cvs co
|
} |
} |
|
|
// 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">' . "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 '<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 102 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 126 cvs -d :pserver:guest@mozdev.org:/cvs co
|
// if(ereg(" Date: $yesterday", $contents[$i])) { |
// if(ereg(" Date: $yesterday", $contents[$i])) { |
if(ereg(" Date: $today", $contents[$i])) { |
if(ereg(" Date: $today", $contents[$i])) { |
$r++; |
$r++; |
| |
| $_i = $i + 1; |
| |
$yy = substr(YEAR, 0, 2); |
$yy = substr(YEAR, 0, 2); |
|
|
$_timestamp = str_replace('Date: ', '', ltrim($contents[$i])); |
$_timestamp = str_replace('Date: ', '', ltrim($contents[$i])); |
$_timestamp = str_replace("\n", '', $_timestamp); |
$_timestamp = str_replace("\n", '', $_timestamp); |
$_timestamp = str_replace(':', '.', $_timestamp); |
|
|
|
$_ts_link = '#' . $yy . ereg_replace('[\ \/]', '_', $_timestamp); | $_ts_link = $yy . ereg_replace('[\ \/]', '_', $_timestamp); |
|
|
$_timestamp = '<a name="' . $_ts_link . '">'; |
$_timestamp = '<a name="' . $_ts_link . '">'; |
|
|
Line 122 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 147 cvs -d :pserver:guest@mozdev.org:/cvs co
|
|
|
$_time = htmlspecialchars($contents[$i]); |
$_time = htmlspecialchars($contents[$i]); |
|
|
$result[$r] .= '<a href="' . $_ts_link . '">' . $_time . '</a>'; // when | $result[$r] .= '<a class="CVS-td-f90" href="' . '#' . $_ts_link . '">' . $_time . '</a>'; // when |
|
|
$result[$r] .= "\n</td></tr>\n" . |
$result[$r] .= "\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"; |
Line 137 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 162 cvs -d :pserver:guest@mozdev.org:/cvs co
|
break; |
break; |
|
|
$checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})", |
$checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})", |
'<a href="\\1">\\1</a>', htmlspecialchars($contents[$l])); | "<a href=\"\\1\">\\1</a>", htmlspecialchars($contents[$l])); |
|
|
// ' Added: www/img background.png' |
// ' Added: www/img background.png' |
// ' Modified: www cdn.css' |
// ' Modified: www cdn.css' |
// ' Removed: www/protected sources.html' |
// ' Removed: www/protected sources.html' |
// ' www/compact index.html' ? |
// ' www/compact index.html' ? |
|
|
if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("[[:space:]]{9}", $checkins) ) | if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("^[[:space:]]{9}", $checkins) ) |
{ |
{ |
|
|
$identifier = trim(substr($checkins, 0, 15)); // echo $identifier . '<p />'; | $identifier = trim(substr($checkins, 0, 15)); // may change to group |
|
|
$checkins = substr($checkins, 15); // echo $checkins . '<p />'; | $checkins = substr($checkins, 15); |
|
|
// find first non-space character |
// find first non-space character |
// if > 16, chances are the files are in the directory defined in the previous line ? |
// if > 16, chances are the files are in the directory defined in the previous line ? |
|
|
$_16 = strpos($checkins, ' '); // echo '$_16 ' . $_16 . '<p />'; | $_16 = strpos($checkins, ' '); |
| |
$_path = substr( $checkins, 0, $_16); // echo $_path . '<p />'; | |
|
|
// if ( $_16 > 16 ) // not going to happen frequently : ) | $_path = substr( $checkins, 0, $_16); |
$checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) ); | |
|
|
$__path = trim($_path); | $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) ); |
| |
if ( !empty( $__path ) ) | |
{ | |
$chkA1 = $_path; | |
} | |
|
|
$checkinsA = explode(' ', $checkins); |
$checkinsA = explode(' ', $checkins); |
|
|
Line 192 cvs -d :pserver:guest@mozdev.org:/cvs co
|
Line 209 cvs -d :pserver:guest@mozdev.org:/cvs co
|
for($y=0; $y < count($checkinsA); ++$y) |
for($y=0; $y < count($checkinsA); ++$y) |
{ |
{ |
|
|
if(!$checkinsA[$y] == 'Tag:') // && !$checkinsA[$y-1] == 'Tag:') | if (ereg('Tag:', $checkinsA[$y]) || ereg('Tag:', $checkinsA[$y-1])) |
| { |
| $TAG = true; |
| } |
| else |
{ |
{ |
$checkins .= ' <a href="' . $webcvs . '/' . $checkinsA[$y] . '">'; | $TAG = false; |
| } |
| |
| if(!$TAG) |
| { |
| $checkins .= ' <a href="' . $webcvs . '/'; |
| |
| if($identifier == 'Removed:'): $checkins .= 'Attic/'; endif; |
| |
| $checkins .= $checkinsA[$y] . '">'; |
} |
} |
else |
else |
{ |
{ |
$checkins .= ' '; | $checkins .= ' '; ++$_tagtracker; |
} |
} |
|
|
$checkins .= $checkinsA[$y]; |
$checkins .= $checkinsA[$y]; |
|
|
if(!$checkinsA[$y] == 'Tag:'): $checkins .= '</a>'; endif; | if(!$TAG): $checkins .= '</a>'; endif; |
|
|
} |
} |
|
|