From 7a8fd215b9770862772c0ba251d242bb85c4361b Mon Sep 17 00:00:00 2001 From: Akinori MUSHA Date: Sun, 7 Jul 2002 04:46:06 +0000 Subject: [PATCH] Merge from FreeBSD-CVSweb 2.0.4. Refer to the project page for details. --- en/cgi/cvsweb.cgi | 126 +++++++++++++++++++++++++-------------------- en/cgi/cvsweb.conf | 51 +++++++----------- 2 files changed, 88 insertions(+), 89 deletions(-) diff --git a/en/cgi/cvsweb.cgi b/en/cgi/cvsweb.cgi index a6baeb8dd7..c72c246b1b 100755 --- a/en/cgi/cvsweb.cgi +++ b/en/cgi/cvsweb.cgi @@ -10,7 +10,7 @@ # Dick Balaska # Akinori MUSHA # Jens-Uwe Mager -# Ville Skyttä (html cleanup) +# Ville Skyttä # # Based on: # * Bill Fenners cvsweb.cgi revision 1.28 available from: @@ -18,9 +18,9 @@ # # Copyright (c) 1996-1998 Bill Fenner # (c) 1998-1999 Henner Zeller -# (c) 1999 Henrik Nordstrom -# (c) 2000-2002 Akinori MUSHA -# All rights reserved. +# (c) 1999 Henrik Nordstrom +# (c) 2000-2002 Akinori MUSHA +# (c) 2002 Ville Skyttä‹# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -43,10 +43,10 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.104 2002/05/22 08:10:18 knu Exp -# $Id: cvsweb.cgi,v 1.83 2002-05-22 08:33:27 knu Exp $ +# FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.112 2002/07/06 18:15:19 scop Exp +# $Id: cvsweb.cgi,v 1.84 2002-07-07 04:46:06 knu Exp $ # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $ -# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.82 2002/05/22 08:31:02 knu Exp $ +# $FreeBSD: www/en/cgi/cvsweb.cgi,v 1.83 2002/05/22 08:33:27 knu Exp $ # ### @@ -93,7 +93,7 @@ use vars qw ( $use_moddate $has_zlib $gzip_open $allow_tar @tar_options @gzip_options @zip_options @cvs_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR - $tmpdir $HTML_DOCTYPE + $tmpdir $HTML_DOCTYPE $HTML_META ); sub printDiffSelect($); @@ -148,7 +148,7 @@ sub forbidden_module($); ##### Start of Configuration Area ######## delete $ENV{PATH}; -$cvsweb_revision = '2.0.3'; +$cvsweb_revision = '2.0.4'; use File::Basename (); @@ -186,7 +186,7 @@ $cvstreedefault = $body_tag = $body_tag_for_src = $logo = $defaulttitle = $extern_window_width = $extern_window_height = $edit_option_form = $show_subdir_lastmod = $show_log_in_markup = $v = $navigationHeaderColor = $tableBorderColor = $markupLogColor = $tabstop = $use_moddate = $moddate = - $gzip_open = $HTML_DOCTYPE = undef; + $gzip_open = $HTML_DOCTYPE = $HTML_META = undef; $tmpdir = defined($ENV{TMPDIR}) ? $ENV{TMPDIR} : "/var/tmp"; $LOG_FILESEPARATOR = q/^={77}$/; @@ -235,7 +235,7 @@ $LOG_REVSEPARATOR = q/^-{28}$/; ); $cgi_style::hsty_base = 'http://www.FreeBSD.org'; -$_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.82 2002/05/22 08:31:02 knu Exp $; +$_ = q$FreeBSD: www/en/cgi/cvsweb.cgi,v 1.83 2002/05/22 08:33:27 knu Exp $; @_ = split; $cgi_style::hsty_date = "@_[3,4]"; @@ -249,6 +249,13 @@ package main; $HTML_DOCTYPE = ''; +$HTML_META = < + + + +EOM + ##### End of configuration variables ##### use Time::Local (); @@ -643,14 +650,14 @@ if (-d $fullname) { print $short_instruction; } - my $descriptions; - if (($use_descriptions) && open(DESC, "<$cvsroot/CVSROOT/descriptions")) + if ($use_descriptions && open(DESC, "<$cvsroot/CVSROOT/descriptions")) { while () { chomp; my ($dir, $description) = /(\S+)\s+(.*)/; $descriptions{$dir} = $description; } + close(DESC); } print "

\n"; @@ -1015,8 +1022,9 @@ if (-d $fullname) { || $input{$var} ne $DEFAULTVALUE{$var}) && $input{$var} ne "" && $var ne "only_with_tag"); } - print "

Show only files with tag:\n"; - print ""; print "\n"; @@ -1028,10 +1036,11 @@ if (-d $fullname) { ">$tag\n"; } print "\n"; - print " Module path or alias:\n"; - printf "\n", + print " \n"; + printf "\n", htmlquote($where); - print "

\n"; + print "

\n"; print "\n"; } @@ -1069,7 +1078,9 @@ if (-d $fullname) { print "
\n"; print "\n\n"; print "\n\n"; - print "\n\n\n"; - print "\n\n"; - print "\n\n\n"; - print "\n\n"; + ">\n\n"; print "\n\n\n
Preferences
Sort files by
"; + print "\nSort log by: "; + print ""; printLogSortSelect(0); print "
Diff format: "; + print "
"; printDiffSelect(0); print "
"; - print ""; + print ""; print "
\n
\n\n"; } html_footer(); @@ -1197,7 +1211,7 @@ sub printDiffSelect($) { my ($use_java_script) = @_; my $f = $input{'f'}; - print '\n"; @@ -2776,7 +2790,6 @@ sub printLog($;$) { printDiffLinks($input{'r1'}, $url); } - print '
' if $diff; } print "\n

\n
\n";
 	print &htmlify($log{$_}, $allow_log_extra);
@@ -2838,41 +2851,47 @@ sub doLog($) {
 		    || $input{$_} ne $DEFAULTVALUE{$_}) && $input{$_} ne ""));
 	}
 	print "\n\n";
-	print "\n";
+	    "\n";
 	print "\n\n";
-	print "\n\n\n";
-	print "\n";
+	    "\n";
+	print "\n";
 	print "\n
Diffs between \n"; - print ""; + print "\n"; + print "\n"; $diffrev = $revdisplayorder[$#revdisplayorder]; $diffrev = $input{"r1"} if (defined($input{"r1"})); print - "
and \n"; - print "
"; + print "\n"; + print "\n"; $diffrev = $revdisplayorder[0]; $diffrev = $input{"r2"} if (defined($input{"r2"})); print - "
\n"; print "\n"; print "
\n"; print "
\n"; print "\n"; - print "\n\n"; + print "\n\n"; print "\n\n\n"; if (@branchnames) { - print "\n\n"; + print "\n\n"; print "\n"; - print "\n\n"; - print "\n"; + print "\n"; print "\n
Preferred Diff type:
"; + print ""; printDiffSelect($use_java_script); print "
View only Branch:
"; + print ""; print "\n"; - print ""; print "\n"; - print "Sort log by:"; + print ""; printLogSortSelect($use_java_script); print "
\n"; print "
\n"; html_footer(); @@ -3159,12 +3178,8 @@ sub navigateHeader($$$$$) { $HTML_DOCTYPE - - - - $path$filename - $title - $rev$css - +$HTML_META $body_tag_for_src
@@ -3294,8 +3309,8 @@ sub chooseCVSRoot() { # isn't gray and the form elements are not placed # within a table ... print "\n\n"; - print "\n"; - print "\n"; + print "\n\n
CVS Root:\n\n\n"; - print ""; + print " \n"; + print "\n"; + print ""; if (2 <= @CVSROOT) { print "
"; @@ -3336,7 +3352,7 @@ sub chooseMirror() { # # Should perhaps exlude the current site somehow.. if (keys %MIRRORS) { - print "\nThis cvsweb is mirrored in:\n"; + print "\nThis CVSweb is mirrored in:\n"; foreach $mirror (keys %MIRRORS) { print ", " if ($moremirrors); @@ -3610,12 +3626,8 @@ sub html_header($) { $HTML_DOCTYPE - - - $title - - +$HTML_META $header EOH } diff --git a/en/cgi/cvsweb.conf b/en/cgi/cvsweb.conf index 0be74f7582..c18b11ff68 100644 --- a/en/cgi/cvsweb.conf +++ b/en/cgi/cvsweb.conf @@ -5,11 +5,13 @@ # (c) 1998-1999 H. Zeller # 1999 H. Nordstrom # 2000-2002 A. MUSHA +# 2002 V. Skyttä # based on work by Bill Fenner # -# $Id: cvsweb.conf,v 1.28 2002-07-01 16:22:34 fenner Exp $ +# FreeBSD: projects/cvsweb/cvsweb.conf,v 1.35 2002/07/06 18:10:44 scop Exp +# $Id: cvsweb.conf,v 1.29 2002-07-07 04:46:06 knu Exp $ # $Idaemons: /home/cvs/cvsweb/cvsweb.conf,v 1.27 2001/08/01 09:48:39 knu Exp $ -# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.27 2002/05/22 08:31:06 knu Exp $ +# $FreeBSD: www/en/cgi/cvsweb.conf,v 1.28 2002/07/01 16:22:34 fenner Exp $ # ### @@ -153,11 +155,11 @@ $body_tag_for_src = ''; # Wanna have a logo on the page ? $logo = ''; -# The title of the Page on startup +# The title of the Page on startup. This will be put inside a

tag. $defaulttitle = "CVS Repository"; -# The address is shown on the footer -$address = 'CVSweb by <knu@FreeBSD.org>'; +# The address is shown on the footer. This will be put inside a
tag. +$address = 'FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>'; # color of navigation Header for # diffs and annotations @@ -177,44 +179,29 @@ a form at the bottom of the page that allows you to display diffs between arbitrary revisions.

-This script has been written by Bill Fenner <fenner\@FreeBSD.org> and -improved by Henner Zeller <zeller\@think.de>, Henrik -Nordström <hno\@hem.passagen.se>, and -Ken Coar <Ken.Coar\@Golux.Com>, then -Akinori MUSHA <knu\@FreeBSD.org> brought it +This script has been written by Bill Fenner and improved by Henner Zeller, +Henrik Nordström, and Ken Coar, then Akinori MUSHA brought it back to FreeBSD community and made further improvements; it is covered -by the BSD-Licence. +by The BSD Licence.

If you would like to use this CGI script on your own web server and -CVS tree, download the latest version here, and also check -out Zeller's CVSweb -distribution site. Bill's original script can be found here. +CVS tree, download the latest version from <URL:http://www.FreeBSD.org/projects/cvsweb.html>.

-Please send any suggestions, comments, etc. to -Bill Fenner or, regarding the -modifications, to -Akinori MUSHA, -Henner Zeller, -Henrik Nordström, or -Ken Coar. +Feel free to send any patches, suggestions and comments to the FreeBSD-CVSweb +mailing list at +<freebsd-cvsweb\@FreeBSD.org>.

EOT $short_instruction = < Click on a directory to enter that directory. Click on a file to display -its revision history and to get a chance to display diffs between revisions. +its revision history and to get a chance to display diffs between revisions.

EOT @@ -518,7 +505,7 @@ $allow_tar = ''; # compression, or higher, for better compression. # Options to pass to cvs(1). -@cvs_options = qw(-l); +@cvs_options = qw(-lf); push @cvs_options, '-R' if ($uname eq 'FreeBSD' || $uname eq 'OpenBSD');