=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.21 retrieving revision 1.34 diff -u -p -r1.21 -r1.34 --- cvsweb/cvsweb.cgi 1998/07/23 09:42:40 1.21 +++ cvsweb/cvsweb.cgi 1999/09/08 13:04:09 1.34 @@ -28,7 +28,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $fId$ +# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.33 1999/09/06 07:02:40 peter Exp $ # @@ -62,15 +62,20 @@ require 'cgi-style.pl'; %CVSROOT = ( 'freebsd', '/home/ncvs', 'learn', '/c/learncvs', - 'mozilla', '/a/mozilla-cvs', ); %CVSROOTdescr = ( 'freebsd', 'FreeBSD', 'learn', 'Learn', - 'mozilla', 'Mozilla FreeBSD', ); +%mirrors = ( + 'Germany', 'http://www.de.freebsd.org/cgi/cvsweb.cgi', + 'Spain', 'http://www.es.freebsd.org/cgi/cvsweb.cgi', + 'California', 'http://www.freebsd.org/cgi/cvsweb.cgi', + 'Japan', 'http://www.jp.freebsd.org/cgi/cvsweb.cgi', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -140,17 +145,21 @@ if (!-d $cvsroot) { &fatal("500 Internal Error",'$CVSROOT not found!
The server on which the CVS tree lives is probably down. Please try again in a few minutes.'); } +# Set up for FreeBSD repo options. +$ENV{'RCSLOCALID'} = 'FreeBSD=CVSHeader'; +$ENV{'RCSINCEXC'} = 'iFreeBSD'; +$ENV{'CVSROOT'} = $cvsroot; { local(@foo, $i); local($scriptname) = $ENV{'SCRIPT_NAME'}; - foreach (keys %CVSROOT) { + foreach (sort keys %CVSROOT) { if (-d $CVSROOT{$_}) { push(@foo, $_); } } if ($#foo > 1) { - $intro .= "
\nThis script support the following CVS trees:\n"; + $intro .= "
\nThis script supports the following CVS trees:\n";
for($i = 0; $i <= $#foo; $i++) {
$intro .= qq{} .
($CVSROOTdescr{$foo[$i]} ?
@@ -161,6 +170,20 @@ if (!-d $cvsroot) {
}
+{
+ local(@mirrors) = sort keys %mirrors;;
+ if ($#mirrors >= 0) {
+ $intro .= " \nThis script is mirrored in:\n";
+ local($m);
+ for($m = 0; $m <= $#mirrors; $m++) {
+ $intro .= qq($mirrors[$m]);
+ $intro .= ',' if $m != $#mirrors;
+ $intro .= "\n";
+ }
+ }
+}
+
+
if (-d $fullname) {
opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!");
@dir = readdir(DIR);
@@ -173,8 +196,9 @@ if (-d $fullname) {
print $shortinstr;
}
print " ";
- print "Current CVS tree: $cvstree
\n"
- if $cvstree ne $cvstreedefault;
+ print "Current CVS tree: ",
+ ($CVSROOTdescr{"$cvstree"} ? $CVSROOTdescr{"$cvstree"} :
+ $cvstree), "
\n";
print "Current directory: /$where\n";
print "
\n";
# Using