=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.14 retrieving revision 1.18 diff -u -p -r1.14 -r1.18 --- cvsweb/cvsweb.cgi 1998/01/12 16:27:14 1.14 +++ cvsweb/cvsweb.cgi 1998/05/08 10:14:10 1.18 @@ -36,8 +36,16 @@ require 'cgi-style.pl'; 'freebsd', '/home/ncvs', 'openbsd', '/home/OpenBSD/cvs', 'learn', '/c/learncvs', + 'mozilla', '/a/mozilla-cvs', ); +%CVSROOTdescr = ( + 'freebsd', 'FreeBSD', + 'openbsd', 'OpenBSD', + 'learn', 'Learn', + 'mozilla', 'Mozilla FreeBSD', + ); + $cvstreedefault = 'freebsd'; $cvstree = $cvstreedefault; $cvsroot = $CVSROOT{"$cvstree"} || "/home/ncvs"; @@ -57,7 +65,8 @@ display diffs between arbitrary revisions.

If you would like to use this CGI script on your own web server and CVS tree, see -the CVSWeb distribution site. +the CVSWeb distribution site or the current FreeBSD version.

Please send any suggestions, comments, etc. to Bill Fenner <fenner\@freebsd.org> @@ -107,6 +116,26 @@ if (!-d $cvsroot) { } +{ + local(@foo, $i); + local($scriptname) = $ENV{'SCRIPT_NAME'}; + foreach (keys %CVSROOT) { + if (-d $CVSROOT{$_}) { + push(@foo, $_); + } + } + if ($#foo > 1) { + $intro .= "

\nThis script support the following CVS trees:\n"; + for($i = 0; $i <= $#foo; $i++) { + $intro .= qq{} . + ($CVSROOTdescr{$foo[$i]} ? + $CVSROOTdescr{$foo[$i]} : $foo[$i]) . qq{} . + ($i == $#foo ? ".\n" : ",\n"); + } + } +} + + if (-d $fullname) { opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!"); @dir = readdir(DIR); @@ -118,7 +147,10 @@ if (-d $fullname) { print &html_header("/$where"); print $shortinstr; } - print "

Current directory: /$where\n"; + print "

"; + print "Current CVS tree: $cvstree
\n" + if $cvstree ne $cvstreedefault; + print "Current directory: /$where\n"; print "


\n"; # Using in this manner violates the HTML2.0 spec but # provides the results that I want in most browsers. Another @@ -142,6 +174,8 @@ if (-d $fullname) { if ($_ eq '.') { next; } + next if $_ eq '#cvs.lock'; + if (s|^Attic/||) { $attic = " (in the Attic)"; } else {