' . "\n";
- $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // . '/';
+ $webcvs = 'http://www.mozdev.org/source/browse/' . $project;
for($l=$i+1;$l<$len;$l++) {
- if(ereg(" Revision Changes Path", $contents[$l]))
+ if(ereg(" Revision Changes Path", $contents[$l])) {
break;
+ }
- if(ereg(" User:", $contents[$l]))
+ if(ereg(" User:", $contents[$l])) {
break;
+ }
$checkins = eregi_replace("((https|http|mailto|ftp):\/\/[^[:space:]<>]{1,})",
- '\\1', htmlspecialchars($contents[$l]));
+ "\\1", htmlspecialchars($contents[$l]));
// ' Added: www/img background.png'
// ' Modified: www cdn.css'
// ' Removed: www/protected sources.html'
- // ' www/compact index.html' ?
+ // ' www/compact index.html'
+ // ' mozpos/downloads - New directory'
- if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("[[:space:]]{9}", $checkins) )
- {
+ if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("^[[:space:]]{9}", $checkins) ||
+ strstr($checkins, "New directory")
+ ) {
- $identifier = trim(substr($checkins, 0, 15)); // echo $identifier . '';
+ if ( !strstr($checkins, "New directory") ) {
+ $identifier = trim(substr($checkins, 0, 15)); // may change to group
- $checkins = substr($checkins, 15); // echo $checkins . '';
-
- // find first non-space character
- // if > 16, chances are the files are in the directory defined in the previous line ?
+ $checkins = substr($checkins, 15);
+ }
+ else {
+ $checkins = str_replace('- New directory', '-_New_directory', $checkins);
- $_16 = strpos($checkins, ' '); // echo '$_16 ' . $_16 . '';
+ $webcvs = 'http://www.mozdev.org/source/browse';
- $_path = substr( $checkins, 0, $_16); // echo $_path . '';
+ unset($identifier);
+ }
- // if ( $_16 > 16 ) // not going to happen frequently : )
- $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) );
+ $_16 = strpos($checkins, ' ');
- $__path = trim($_path);
+ $_path = substr( $checkins, 0, $_16);
- if ( !empty( $__path ) )
- {
- $chkA1 = $_path;
- }
+ $checkins = ereg_replace('[[:space:]]{1,}', ' ', trim( substr ( $checkins, $_16 ) ) );
$checkinsA = explode(' ', $checkins);
unset($checkins);
- for($z=0; $z < count($checkinsA); ++$z)
- {
+ for($z=0; $z < count($checkinsA); ++$z) {
$checkinsA[$z] = trim($checkinsA[$z]);
}
- if ( !empty($identifier) )
+ if ( !empty($identifier) ) {
$checkins = $identifier;
+ }
- if ( !empty($_path))
- {
+ if ( !empty($_path)) {
$webcvs = 'http://www.mozdev.org/source/browse/' . $project; // reset important !
$webcvs .= '/' . $_path;
$_path_ = $_path;
@@ -189,28 +188,58 @@ cvs -d :pserver:guest@mozdev.org:/cvs co
$checkins .= '">' . $_path . '';
}
- for($y=0; $y < count($checkinsA); ++$y)
- {
+ for($y=0; $y < count($checkinsA); ++$y) {
- if(!$checkinsA[$y] == 'Tag:') // && !$checkinsA[$y-1] == 'Tag:')
- {
- $checkins .= ' ';
+ if (ereg('Tag:', $checkinsA[$y]) || ereg('Tag:', $checkinsA[$y-1]) || $_tag ||
+ strstr($checkinsA[$y], '-_New_directory')
+ ) {
+ $TAG = true;
+ }
+ else {
+ $TAG = false;
}
- else
- {
+
+ if(!$TAG) {
+ $checkins .= ' ';
+ }
+ else {
$checkins .= ' ';
}
+ $checkinsA[$y] = str_replace('-_New_directory', '- New directory', $checkinsA[$y]);
+
$checkins .= $checkinsA[$y];
- if(!$checkinsA[$y] == 'Tag:'): $checkins .= ''; endif;
+ if ( ereg("Tag\:$", trim($checkinsA[$y])) && empty($checkinsA[$y+1])) {
+ $_tag = true;
+ }
+ else {
+ $_tag = false;
+ }
+
+ if(!$TAG) {
+ $checkins .= '';
+ }
+
+ }
+ if ( $identifier == 'Removed:' ) {
+ $idRemoved = true;
+ }
+ else {
+ $idRemoved = false;
}
}
- $result[$r] .= ' ' . $checkins .
- " \n"; // what
+// what
+ $result[$r] .= '' . $checkins . " \n"; // what
}
$result[$r] .= " |
\n";