NEW - bug 270659: Project meta-data needs improvement. https://bugs.eclipse.org/bugs/show_bug.cgi?id=270659
diff --git a/project_summary.php b/project_summary.php index 79942e0..8a75bcd 100644 --- a/project_summary.php +++ b/project_summary.php
@@ -31,6 +31,22 @@ $release_logos = true; // show the member company logos +// Used for breaking out CVS roots from end directory paths, which are not separated +// in the meta-data but need to be for clients to connect. [270569] +$cvsroots = array( + '/cvsroot/birt', + '/cvsroot/datatools', + '/cvsroot/dsdp', + '/cvsroot/eclipse', + '/cvsroot/modeling', + '/cvsroot/rt', + '/cvsroot/stp', + '/cvsroot/technology', + '/cvsroot/tools', + '/cvsroot/tptp', + '/cvsroot/webtools' +); + // ---------------------------------------------------------------------------- // PHOENIX STUFF @@ -53,6 +69,11 @@ // ---------------------------------------------------------------------------- // BEGIN CODE +function filter_cvsroot($entry) { + global $cvsroot; + return (strpos($cvsroot, $entry) !== false); +} + // Start Output Buffering ob_start(); @@ -221,13 +242,31 @@ <p>Eclipse projects store all of their source code in public revision control systems. The <?= $project->shortname ?> project hosts its revision control repository at:</p> <?php + $cvsdirs = array(); + $cvsroot = ''; + $root = ''; foreach($project->sourcerepositorys as $cvs) { + // CVS roots and paths have to be listed separately if(preg_match('/^\/cvsroot/', $cvs)) { - echo "<div style=\"padding-left: 2em;\">:pserver:anonymous@dev.eclipse.org:$cvs</a></div>\n"; + // Figure out from the first one what the the root is so we can strip if off the others + if($root == '') { + $cvsroot = $cvs; + $root = array_values(array_filter($cvsroots, 'filter_cvsroot')); // reduce + $root = $root[0]; + } + $cvsdirs[] = str_replace($root, '', $cvs); // filter out the root part } else { - echo "<div style=\"padding-left: 2em;\">http://dev.eclipse.org/svnroot$cvs</a></div>\n"; + echo "<div style=\"padding-left: 2em;\"><b>SVN:</b> http://dev.eclipse.org/svnroot$cvs</div>\n"; } } + + if(count($cvsdirs) > 0) { + echo "<div style=\"padding-left: 2em;\"><b>CVS:</b> :pserver:anonymous@dev.eclipse.org:" . $root . "</div>\n"; + echo "<div style='padding-left: 3em;'>Including the following CVS paths:</div>\n"; + foreach($cvsdirs as $cvsdir) { + echo "<div style='padding-left: 4em'>" . trim($cvsdir, '/') . "</div>\n"; + } + } ?> <p>CVS and SVN repositories are browseable <a href="http://dev.eclipse.org/viewcvs/index.cgi/">on the web</a>.</p>