=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.13 retrieving revision 1.17 diff -u -p -r1.13 -r1.17 --- cvsweb/cvsweb.cgi 1997/11/19 19:20:22 1.13 +++ cvsweb/cvsweb.cgi 1998/05/05 16:05:32 1.17 @@ -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 @@ -642,7 +674,7 @@ sub dolog { if (/^1\.1\.1\.\d+$/) { print " (vendor branch)"; } - print " " . &ctime($date{$_}) . " by "; + print " " . &ctime($date{$_}) . " UTC by "; print "" . $author{$_} . "\n"; if ($revsym{$_}) { print "
CVS Tags: $revsym{$_}";