' . $checkins;
+ }
+
+ if ( ereg("^[[:space:]]{1,3}((Added|Modified|Removed):)", $checkins) || ereg("^[[:space:]]{9}", $checkins) ||
+ strstr($checkins, "New directory")
+ ) {
+
+ if ( !strstr($checkins, "New directory") ) {
+ $identifier = trim(substr($checkins, 0, 15)); // may change to group
+
+ $checkins = substr($checkins, 15);
+
+ $_New_directory = false;
+ }
+ else {
+ $checkins = str_replace('- New directory', '-_New_directory', $checkins);
- $webcvs = 'http://www.mozdev.org/source/browse/' . $project; // . '/';
+ $webcvs = 'http://www.' . HOST . '/source/browse';
- // Removed should probably point to Attic
+ unset($identifier);
- if ( ereg("((Added|Modified|Removed):)", $checkins) || ereg("[[:space:]]{9}", $checkins) )
- {
- $checkins = trim($checkins);
+ $_New_directory = true;
+ }
+
+ $_16 = strpos($checkins, ' ');
- $checkins = ereg_replace('[[:space:]]{1,}', ' ', $checkins);
+ $_path = substr( $checkins, 0, $_16);
+
+ $checkins = ereg_replace('[[:space:]]{1,}', ' ',
+ trim( substr ( $checkins, $_16 ) ) );
$checkinsA = explode(' ', $checkins);
unset($checkins);
for($z=0; $z < count($checkinsA); ++$z)
- {
$checkinsA[$z] = trim($checkinsA[$z]);
+
+ if ( !empty($identifier) )
+ $checkins = '
' . $identifier . '';
+
+ if ( !empty($_path)) {
+ // reset, important !
+ $webcvs = 'http://www.' . HOST . '/source/browse/' . $project;
+ $webcvs .= '/' . $_path;
+ $checkins .= '
' . $_path . '';
}
- $chkA1 = $checkinsA[1];
+ $Y = count($checkinsA);
+
+ for($y=0; $y < $Y; ++$y) {
+
+ if ( ereg('Tag:', $checkinsA[$y]) || ereg('Tag:', $checkinsA[$y-1]) || $_tag ||
+ strstr($checkinsA[$y], '-_New_directory')
+ )
+ $TAG = true;
+ else
+ $TAG = false;
+
+ $checkins .= '
';
+ }
+
+ if ( !$_New_directory ) {
+ $checkins .= ''; // $project / $_path
+ $_webcvs = str_replace('http://www.' . HOST . '/source/browse/', '', $webcvs);
+
+ if ( strlen($_webcvs) > 15 )
+ $checkins .= substr($_webcvs, 0, 12) . '...' . substr($_webcvs, strrpos($_webcvs, '/'));
+ else
+ $checkins .= $_webcvs;
- $webcvs .= '/' . $chkA1;
+ if( $identifier == 'Removed:' || $idRemoved )
+ $checkins .= '/Attic';
- $checkins = $checkinsA[0];
-
- if(eregi("[^[:space:]<>]+/+[^[:space:]<>]", $checkinsA[0]))
- {
- $checkins = '' . $checkinsA[0] . '';
- }
-
- $checkins .= ' ' . $chkA1 . '';
-
- // reset($checkinsA);
- for($y=0; $y < count($checkinsA); ++$y)
- {
- // how can $webcvs not have $chkA1 as part of it ?
-
- if($y >= 2)
- {
- $checkins .= ' ';
- $checkins .= $checkinsA[$y] . '';
+ $checkins .= '/';
}
+
+ $checkinsA[$y] = str_replace('-_New_directory', '- New directory', $checkinsA[$y]);
+
+ $checkins .= $checkinsA[$y];
+
+ if (ereg("Tag\:$", trim($checkinsA[$y])) &&
+ empty($checkinsA[$y+1]))
+ $_tag = true;
+ else
+ $_tag = false;
+
+ if (!$TAG)
+ $checkins .= '';
+
+ $checkins .= '';
+
}
+
+ if ( $identifier == 'Removed:' || $idRemoved )
+ $idRemoved = true;
+ else
+ $idRemoved = false;
+
}
- $result[$r] .= '
' . $checkins .
- "
\n";
+ $checkins = trim( str_replace('
', ' ', $checkins) );
+
+ if ( !ereg('^' . $checkins;
+// what
+ if ( !empty( $checkins ) )
+ $result[$r] .= $checkins . "