versionary-changes Mailing List for Versionary
Status: Pre-Alpha
Brought to you by:
coar
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(16) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Ken C. <co...@us...> - 2002-01-15 20:56:10
|
coar 02/01/15 12:56:06 Modified: . versionary.conf Log: Rrrrg.. Revision Changes Path 1.5 +2 -2 versionary/versionary.conf Index: versionary.conf =================================================================== RCS file: /cvsroot/versionary/versionary/versionary.conf,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- versionary.conf 2001/12/20 22:13:54 1.4 +++ versionary.conf 2002/01/15 20:56:06 1.5 @@ -7,7 +7,7 @@ # (c) 1998-1999 H. Zeller <ze...@th...> # 1999 H. Nordström <hn...@he...> # based on work by Bill Fenner <fe...@fr...> -# $Id: versionary.conf,v 1.4 2001/12/20 22:13:54 coar Exp $ +# $Id: versionary.conf,v 1.5 2002/01/15 20:56:06 coar Exp $ # ### @@ -102,7 +102,7 @@ # The address is shown on the footer $address = "<font size=-1>Versionary by " - . "<a href=\"http://Versionary.SourceForce.Net\"" + . "<a href=\"http://Versionary.SourceForge.Net\"" . ">The Versionary Project</a>.</font>"; # Default page background color for the diffs |
|
From: Ken C. <co...@us...> - 2002-01-15 20:55:24
|
coar 02/01/15 12:55:23
Modified: . versionary.cgi
Log:
A fix to findinPATH(), error on missing applications, and various other..
Revision Changes Path
1.12 +197 -165 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- versionary.cgi 2002/01/02 18:22:43 1.11
+++ versionary.cgi 2002/01/15 20:55:22 1.12
@@ -19,7 +19,7 @@
#
# Copyright (c) 1996-1998 Bill Fenner
# (c) 1998-1999 Henner Zeller
-# (c) 1999 Henrik Nordström
+# (c) 1999 Henrik Nordström
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.11 2002/01/02 18:22:43 coar Exp $
+# $Id: versionary.cgi,v 1.12 2002/01/15 20:55:22 coar Exp $
#
###
require 5.000;
@@ -51,32 +51,35 @@
use strict;
use vars qw (
- $config $allow_version_select $verbose
- %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES
- %alltags @tabcolors %fileinfo %tags @branchnames %nameprinted
- %symrev %revsym @allrevisions %date %author @revdisplayorder
- @revisions %state %difflines %log %branchpoint @revorder
- $checkoutMagic $doCheckout $scriptname $scriptwhere
- $where $Browser $nofilelinks $maycompress @stickyvars
- %input $query $barequery $sortby $bydate $byrev $byauthor
- $bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot
- $mimetype $defaultTextPlain $defaultViewable $allow_compress
- $GZIPBIN $RCSDIFF $RLOG $backicon $diricon $fileicon $fullname $newname
- $cvstreedefault $body_tag $logo $defaulttitle $address
- $backcolor $long_intro $short_instruction $shortLogLen
- $show_author $dirtable $tablepadding $columnHeaderColorDefault
- $columnHeaderColorSorted $hr_breakable $hr_funout $hr_ignwhite
- $hr_ignkeysubst $diffcolorHeading $diffcolorEmpty $diffcolorRemove
- $diffcolorChange $diffcolorAdd $diffcolorDarkChange $difffontface
- $difffontsize $inputTextSize $mime_types $allow_annotate
- $allow_markup $use_java_script $open_extern_window
- $extern_window_width $extern_window_height $edit_option_form
- $checkout_magic $show_subdir_lastmod $show_log_in_markup $v
- $navigationHeaderColor $tableBorderColor $markupLogColor
- $tabstop $state $annTable $sel $curbranch @HideModules @DisallowRead
- $module $use_descriptions %descriptions @mytz $dwhere $moddate
- $use_moddate $has_zlib $gzip_open
-);
+ $config $allow_version_select $verbose
+ %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES
+ %alltags @tabcolors %fileinfo %tags @branchnames %nameprinted
+ %symrev %revsym @allrevisions %date %author @revdisplayorder
+ @revisions %state %difflines %log %branchpoint @revorder
+ $checkoutMagic $doCheckout $scriptname $scriptwhere
+ $where $Browser $nofilelinks $maycompress @stickyvars
+ %input $query $barequery $sortby $bydate $byrev $byauthor
+ $bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot
+ $mimetype $defaultTextPlain $defaultViewable $allow_compress
+ $CVS $GZIPBIN $RCSDIFF $RLOG $backicon $diricon $fileicon
+ $fullname $newname $cvstreedefault $body_tag $logo
+ $defaulttitle $address $backcolor $long_intro
+ $short_instruction $shortLogLen $show_author $dirtable
+ $tablepadding $columnHeaderColorDefault
+ $columnHeaderColorSorted $hr_breakable $hr_funout
+ $hr_ignwhite $hr_ignkeysubst $diffcolorHeading
+ $diffcolorEmpty $diffcolorRemove $diffcolorChange
+ $diffcolorAdd $diffcolorDarkChange $difffontface
+ $difffontsize $inputTextSize $mime_types $allow_annotate
+ $allow_markup $use_java_script $open_extern_window
+ $extern_window_width $extern_window_height
+ $edit_option_form $checkout_magic $show_subdir_lastmod
+ $show_log_in_markup $v $navigationHeaderColor
+ $tableBorderColor $markupLogColor $tabstop $state
+ $annTable $sel $curbranch @HideModules @DisallowRead
+ $module $use_descriptions %descriptions @mytz $dwhere
+ $moddate $use_moddate $HAVE_ZLIB $gzip_open
+ );
##### prototype declarations ########
sub printDiffSelect($);
@@ -163,7 +166,7 @@
eval {
require Compress::Zlib;
};
-$has_zlib = !$@;
+$HAVE_ZLIB = !$@;
$verbose = $v;
$checkoutMagic = "~checkout~";
@@ -200,7 +203,7 @@
&& $ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip|)
|| $Browser =~ m%^Mozilla/3%)
&& ($Browser !~ m/MSIE/)
- && !(defined($ENV{'MOD_PERL'}) && !$has_zlib));
+ && !(defined($ENV{'MOD_PERL'}) && !$HAVE_ZLIB));
# put here the variables we need in order
# to hold our state - they will be added (with
@@ -213,7 +216,7 @@
}
else {
&fatal("500 Internal Error",
- 'Configuration not found. Set the variable <code>$config</code> '
+ 'Configuration not found. Set the variable <code>$config</code> '
. 'in versionary.cgi, or the environment variable '
. '<code>VERSIONARY_CONF</code>, to your <b>versionary.conf</b> '
. 'configuration file first.');
@@ -222,14 +225,14 @@
undef %input;
if ($query = $ENV{'QUERY_STRING'}) {
foreach (split(/&/, $query)) {
- y/+/ /;
- s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted
- if (/(\S+)=(.*)/) {
- $input{$1} = $2 if ($2 ne "");
- }
- else {
- $input{$_}++;
- }
+ y/+/ /;
+ s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted
+ if (/(\S+)=(.*)/) {
+ $input{$1} = $2 if ($2 ne "");
+ }
+ else {
+ $input{$_}++;
+ }
}
}
@@ -240,21 +243,21 @@
foreach (keys %DEFAULTVALUE) {
# replace not given parameters with the default parameters
if (!defined($input{$_}) || $input{$_} eq "") {
- # Empty Checkboxes in forms return -- nothing. So we define a helper
- # variable in these forms (copt) which indicates that we just set
- # parameters with a checkbox
- if (!defined($input{"copt"})) {
- # 'copt' isn't defined --> empty input is not the result
- # of empty input checkbox --> set default
- $input{$_} = $DEFAULTVALUE{$_} if (defined($DEFAULTVALUE{$_}));
- }
- else {
- # 'copt' is defined -> the result of empty input checkbox
- # -> set to zero (disable) if default is a boolean (0|1).
- $input{$_} = 0
- if (defined($DEFAULTVALUE{$_})
- && ($DEFAULTVALUE{$_} eq "0" || $DEFAULTVALUE{$_} eq "1"));
- }
+ # Empty Checkboxes in forms return -- nothing. So we define a helper
+ # variable in these forms (copt) which indicates that we just set
+ # parameters with a checkbox
+ if (!defined($input{"copt"})) {
+ # 'copt' isn't defined --> empty input is not the result
+ # of empty input checkbox --> set default
+ $input{$_} = $DEFAULTVALUE{$_} if (defined($DEFAULTVALUE{$_}));
+ }
+ else {
+ # 'copt' is defined -> the result of empty input checkbox
+ # -> set to zero (disable) if default is a boolean (0|1).
+ $input{$_} = 0
+ if (defined($DEFAULTVALUE{$_})
+ && ($DEFAULTVALUE{$_} eq "0" || $DEFAULTVALUE{$_} eq "1"));
+ }
}
}
@@ -263,11 +266,11 @@
# construct a query string with the sticky non default parameters set
if (defined($input{$_}) && ($input{$_} ne "")
&& (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) {
- if ($barequery) {
- $barequery = $barequery . "&";
- }
- my $thisval = urlencode($_) . "=" . urlencode($input{$_});
- $barequery .= $thisval;
+ if ($barequery) {
+ $barequery = $barequery . "&";
+ }
+ my $thisval = urlencode($_) . "=" . urlencode($input{$_});
+ $barequery .= $thisval;
}
}
# is there any query ?
@@ -310,9 +313,9 @@
## Default CVS-Tree
if (!defined($CVSROOT{$cvstreedefault})) {
&fatal("500 Internal Error",
- "<code>\$cvstreedefault</code> points to a repository "
+ "<code>\$cvstreedefault</code> points to a repository "
. "($cvstreedefault) not defined in <code>%CVSROOT</code> "
- . "(edit your configuration file $config)");
+ . "(edit your configuration file $config)");
}
$cvstree = $cvstreedefault;
$cvsroot = $CVSROOT{"$cvstree"};
@@ -320,8 +323,8 @@
# alternate CVS-Tree, configured in versionary.conf
if ($input{'cvsroot'}) {
if ($CVSROOT{$input{'cvsroot'}}) {
- $cvstree = $input{'cvsroot'};
- $cvsroot = $CVSROOT{"$cvstree"};
+ $cvstree = $input{'cvsroot'};
+ $cvsroot = $CVSROOT{"$cvstree"};
}
}
@@ -330,11 +333,11 @@
no strict 'refs';
my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}};
if ($ipath) {
- ${"${k}icon"} = "<img src=\"$ipath\" alt=\"$itxt\" "
+ ${"${k}icon"} = "<img src=\"$ipath\" alt=\"$itxt\" "
. "border=\"0\" width=\"$iwidth\" height=\"$iheight\">";
}
else {
- ${"${k}icon"} = $itxt;
+ ${"${k}icon"} = $itxt;
}
}
@@ -351,12 +354,24 @@
# ge get an Internal Server Error if we try to pipe the
# output through the nonexistent gzip ..
# any more elegant ways to prevent this are welcome!
-if ($allow_compress && $maycompress && !$has_zlib) {
+if ($allow_compress && $maycompress && !$HAVE_ZLIB) {
$GZIPBIN = findinPATH("gzip");
}
+$CVS = findinPATH("cvs");
$RLOG = findinPATH("rlog");
$RCSDIFF = findinPATH("rcsdiff");
+my @missing = ();
+push(@missing, "cvs") if (! defined($CVS));
+push(@missing, "rlog") if (! defined($RLOG));
+push(@missing, "rcsdiff") if (! defined($RCSDIFF));
+if (@missing) {
+ &fatal("500 Internal Server Error",
+ "\n<p>\nMissing support applications; cannot find the\n"
+ . "following in PATH ('" . $ENV{'PATH'} . "'):\n</p>\n<pre> "
+ . join("\n ", @missing)
+ . "\n</pre>\n");
+}
if (-d $fullname) {
#
@@ -365,11 +380,11 @@
##
my $pathinfo = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : "";
if (!($pathinfo =~ m|/$|) || ($pathinfo =~ m |/{2,}$|)) {
- redirect ($scriptwhere . '/' . $query);
+ redirect ($scriptwhere . '/' . $query);
}
else {
- $where .= '/';
- $scriptwhere .= '/';
+ $where .= '/';
+ $scriptwhere .= '/';
}
}
@@ -392,114 +407,127 @@
# View a directory
###############################
elsif (-d $fullname) {
- my $dh = do {local(*DH);};
- opendir($dh, $fullname) || &fatal("404 Not Found", "$where: $!");
- my @dir = readdir($dh);
- closedir($dh);
- my @subLevelFiles = findLastModifiedSubdirs(@dir)
- if ($show_subdir_lastmod);
- getDirLogs($cvsroot, $where, @subLevelFiles);
-
- if ($where eq '/') {
- html_header("$defaulttitle");
- print $long_intro;
- }
- else {
- html_header("$where");
- print $short_instruction;
- }
+ my $dh = do {local(*DH);};
+ opendir($dh, $fullname) || &fatal("404 Not Found", "$where: $!");
+ my @dir = readdir($dh);
+ closedir($dh);
+ my @subLevelFiles = findLastModifiedSubdirs(@dir)
+ if ($show_subdir_lastmod);
+ getDirLogs($cvsroot, $where, @subLevelFiles);
+
+ if ($where eq '/') {
+ html_header("$defaulttitle");
+ print $long_intro;
+ }
+ else {
+ html_header("$where");
+ print $short_instruction;
+ }
- my $descriptions;
- if (($use_descriptions) && open (DESC, "<$cvsroot/CVSROOT/descriptions")) {
- while (<DESC>) {
- chomp;
- my ($dir, $description) = /(\S+)\s+(.*)/;
- $descriptions{$dir} = $description;
- }
- }
+ my $descriptions;
+ if (($use_descriptions) && open (DESC, "<$cvsroot/CVSROOT/descriptions")) {
+ while (<DESC>) {
+ chomp;
+ my ($dir, $description) = /(\S+)\s+(.*)/;
+ $descriptions{$dir} = $description;
+ }
+ }
- print "<p>\n<a name=\"dirlist\"></a>\n";
- # give direct access to dirs
- if ($where eq '/') {
- chooseMirror();
- chooseCVSRoot();
- }
- else {
- print "<p>\nCurrent directory: <b>", &clickablePath($where, 0),
+ print "<p>\n<a name=\"dirlist\"></a>\n";
+ # give direct access to dirs
+ if ($where eq '/') {
+ chooseMirror();
+ chooseCVSRoot();
+ }
+ else {
+ print "<p>\nCurrent directory: <b>", &clickablePath($where, 0),
"</b>\n";
- print "<p>\nCurrent tag: <b>", $input{only_with_tag}, "</b>\n" if
- $input{only_with_tag};
+ print "<p>\nCurrent tag: <b>", $input{only_with_tag}, "</b>\n" if
+ $input{only_with_tag};
- }
-
+ }
+
- print "<hr noshade>\n";
- # Using <MENU> in this manner violates the HTML2.0 spec but
- # provides the results that I want in most browsers. Another
- # case of layout spooging up HTML.
-
- my $infocols = 0;
- if ($dirtable) {
- if (defined($tableBorderColor)) {
- # Can't this be done by defining the border for the inner table?
- print "<table border=\"0\" cellpadding=\"0\" "
+ print "<hr noshade>\n";
+ # Using <MENU> in this manner violates the HTML2.0 spec but
+ # provides the results that I want in most browsers. Another
+ # case of layout spooging up HTML.
+
+ my $infocols = 0;
+ if ($dirtable) {
+ if (defined($tableBorderColor)) {
+ # Can't this be done by defining the border for the inner table?
+ print "<table border=\"0\" cellpadding=\"0\" "
. "width=\"100%\"><tr><td bgcolor=\"$tableBorderColor\">";
- }
- print "<table width=\"100%\" border=\"0\" cellspacing=\"1\" "
+ }
+ print "<table width=\"100%\" border=\"0\" cellspacing=\"1\" "
. "cellpadding=\"$tablepadding\">\n";
- $infocols++;
- print "<tr><th align=\"left\" bgcolor=\"" . (($byfile) ?
- $columnHeaderColorSorted :
- $columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery("sortby", "file") .
- "#dirlist\">" if (!$byfile);
- print "File";
- print "</a>" if (!$byfile);
- print "</th>";
- # do not display the other column-headers, if we do not have any files
- # with revision information:
- if (scalar(%fileinfo)) {
- $infocols++;
- print "<th align=\"left\" bgcolor=\"" . (($byrev) ?
- $columnHeaderColorSorted :
- $columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby", "rev") .
- "#dirlist\">" if (!$byrev);
- print "Rev.";
- print "</a>" if (!$byrev);
- print "</th>";
- $infocols++;
- print "<th align=\"left\" bgcolor=\"" . (($bydate) ?
- $columnHeaderColorSorted :
- $columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby", "date") .
- "#dirlist\">" if (!$bydate);
+ $infocols++;
+ print "<tr><th align=\"left\" bgcolor=\"" . (($byfile) ?
+ $columnHeaderColorSorted :
+ $columnHeaderColorDefault) . "\">";
+ print "<a href=\"./" . &toggleQuery("sortby", "file") .
+ "#dirlist\">" if (!$byfile);
+ print "File";
+ print "</a>" if (!$byfile);
+ print "</th>";
+ #
+ # do not display the other column-headers, if we do not
+ # have any files with revision information:
+ #
+ if (scalar(%fileinfo)) {
+ $infocols++;
+ print "<th align=\"left\" bgcolor=\""
+ . (($byrev) ?
+ $columnHeaderColorSorted :
+ $columnHeaderColorDefault)
+ . "\">";
+ print "<a href=\"./" . &toggleQuery("sortby", "rev")
+ . "#dirlist\">" if (!$byrev);
+ print "Rev.";
+ print "</a>" if (!$byrev);
+ print "</th>";
+ $infocols++;
+ print "<th align=\"left\" bgcolor=\""
+ . (($bydate) ?
+ $columnHeaderColorSorted :
+ $columnHeaderColorDefault)
+ . "\">";
+ print "<a href=\"./" . &toggleQuery ("sortby", "date")
+ . "#dirlist\">" if (!$bydate);
print "Age";
print "</a>" if (!$bydate);
print "</th>";
if ($show_author) {
$infocols++;
- print "<th align=\"left\" bgcolor=\"" . (($byauthor) ?
- $columnHeaderColorSorted :
- $columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby", "author") .
- "#dirlist\">" if (!$byauthor);
+ print "<th align=\"left\" bgcolor=\""
+ . (($byauthor) ?
+ $columnHeaderColorSorted :
+ $columnHeaderColorDefault)
+ . "\">";
+ print "<a href=\"./" . &toggleQuery ("sortby", "author")
+ . "#dirlist\">" if (!$byauthor);
print "Author";
print "</a>" if (!$byauthor);
print "</th>";
}
$infocols++;
- print "<th align=\"left\" bgcolor=\"" . (($bylog) ?
- $columnHeaderColorSorted :
- $columnHeaderColorDefault) . "\">";
- print "<a href=\"./", toggleQuery("sortby", "log"), "#dirlist\">" if (!$bylog);
+ print "<th align=\"left\" bgcolor=\""
+ . (($bylog) ?
+ $columnHeaderColorSorted :
+ $columnHeaderColorDefault)
+ . "\">";
+ print "<a href=\"./", toggleQuery("sortby", "log"),
+ "#dirlist\">"
+ if (!$bylog);
print "Last log entry";
print "</a>" if (!$bylog);
print "</th>";
}
elsif ($use_descriptions) {
- print "<th align=\"left\" bgcolor=\"". $columnHeaderColorDefault . "\">";
+ print "<th align=\"left\" bgcolor=\""
+ . $columnHeaderColorDefault . "\">";
print "Description";
$infocols++;
}
@@ -560,12 +588,16 @@
$attic = "";
}
- if ($_ eq '..' || -d "$fullname/$_") {
- next if ($_ eq '..' && $where eq '/');
+ if (($_ eq '..') || (-d "$fullname/$_")) {
+ next if (($_ eq '..') && ($where eq '/'));
my ($rev, $date, $log, $author, $filename);
($rev, $date, $log, $author, $filename) = @{$fileinfo{$_}}
if (defined($fileinfo{$_}));
- print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);
+ if ($dirtable) {
+ print "<tr bgcolor=\""
+ . @tabcolors[$dirrow%2]
+ . "\"><td>";
+ }
if ($_ eq '..') {
$url = "../" . $query;
if ($nofilelinks) {
@@ -1102,7 +1134,7 @@
# the public domain.
# we could abandon the use of rlog, rcsdiff and co using
# the cvsserver in a similiar way one day (..after rewrite)
- $pid = open2($reader, $writer, "cvs server")
+ $pid = open2($reader, $writer, "$CVS server")
|| fatal ("500 Internal Error",
"Fatal Error - unable to open cvs for annotation");
@@ -1281,7 +1313,7 @@
if (! open($fh, "-|")) { # child
my $nohist = ($logactions ? "" : "l");
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
- exec("cvs", "-d$nohist", "$cvsroot", "co", "-p", "$revopt", "$where");
+ exec($CVS, "-d$nohist", "$cvsroot", "co", "-p", "$revopt", "$where");
}
#===================================================================
#Checking out squid/src/ftp.c
@@ -2459,7 +2491,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<html>\n<head>\n";
- print '<!-- Versionary $Revision: 1.11 $ -->';
+ print '<!-- Versionary $Revision: 1.12 $ -->';
print "\n<title>$path$filename - $title - $rev</title></head>\n";
print "<body bgcolor=\"$backcolor\">\n";
print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"$navigationHeaderColor\">";
@@ -2775,7 +2807,7 @@
print "Content-type: $content_type\r\n";
}
if ($allow_compress && $maycompress) {
- if ($has_zlib
+ if ($HAVE_ZLIB
|| (defined($GZIPBIN)
&& open(GZIP, "|$GZIPBIN -1 -c"))) {
if ($is_mod_perl) {
@@ -2789,7 +2821,7 @@
print "\r\n"; # Close headers
}
$| = 1; $| = 0; # Flush header output
- if ($has_zlib) {
+ if ($HAVE_ZLIB) {
tie *GZIP, __PACKAGE__, \*STDOUT;
}
select(GZIP);
@@ -2818,7 +2850,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.11 $';
+ my $version = '$Revision: 1.12 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
@@ -2957,9 +2989,9 @@
my ($app) = @_;
my $result;
- foreach (split(/:/, $ENV{'PATH'})) {
+ for (split(/:/, $ENV{'PATH'})) {
if (-x ($result = "$_/$app")) {
- last;
+ return $result;
}
}
return undef;
|
|
From: Ken C. <co...@us...> - 2002-01-02 18:22:44
|
coar 02/01/02 10:22:43
Modified: . versionary.cgi
Log:
Make sure we can find anything we plan to exec()
Revision Changes Path
1.11 +45 -20 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- versionary.cgi 2001/12/21 19:27:41 1.10
+++ versionary.cgi 2002/01/02 18:22:43 1.11
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.10 2001/12/21 19:27:41 coar Exp $
+# $Id: versionary.cgi,v 1.11 2002/01/02 18:22:43 coar Exp $
#
###
require 5.000;
@@ -61,7 +61,7 @@
%input $query $barequery $sortby $bydate $byrev $byauthor
$bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot
$mimetype $defaultTextPlain $defaultViewable $allow_compress
- $GZIPBIN $backicon $diricon $fileicon $fullname $newname
+ $GZIPBIN $RCSDIFF $RLOG $backicon $diricon $fileicon $fullname $newname
$cvstreedefault $body_tag $logo $defaulttitle $address
$backcolor $long_intro $short_instruction $shortLogLen
$show_author $dirtable $tablepadding $columnHeaderColorDefault
@@ -355,6 +355,9 @@
$GZIPBIN = findinPATH("gzip");
}
+$RLOG = findinPATH("rlog");
+$RCSDIFF = findinPATH("rcsdiff");
+
if (-d $fullname) {
#
# ensure, that directories always end with (exactly) one '/'
@@ -1099,8 +1102,9 @@
# the public domain.
# we could abandon the use of rlog, rcsdiff and co using
# the cvsserver in a similiar way one day (..after rewrite)
- $pid = open2($reader, $writer, "cvs server") || fatal ("500 Internal Error",
- "Fatal Error - unable to open cvs for annotation");
+ $pid = open2($reader, $writer, "cvs server")
+ || fatal ("500 Internal Error",
+ "Fatal Error - unable to open cvs for annotation");
# OK, first send the request to the server. A simplified example is:
# Root /home/kingdon/zwork/cvsroot
@@ -1465,15 +1469,14 @@
# We'll display anomalous results if we exec rcsdiff and it
# isn't in the path.. defend against such nonsense.
#
- my $rcsdiff = findinPATH("rcsdiff");
- if (! defined($rcsdiff)) {
+ if (! defined($RCSDIFF)) {
&fatal("500 Internal Server Error",
"<p>\n<code>rcsdiff</code> not found in "
. "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
}
else {
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
- exec("rcsdiff", @difftype, "-r$rev1", "-r$rev2", $fullname);
+ exec("$RCSDIFF", @difftype, "-r$rev1", "-r$rev2", $fullname);
}
}
if ($human_readable) {
@@ -1556,17 +1559,32 @@
}
if (defined($tag)) {
- #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog..
+ # can't use -r<tag> as - is allowed in tagnames, but
+ # misinterpreted by rlog..
if (! open($fh, "-|")) {
- open(STDERR, "> /dev/null"); # rlog may complain; ignore.
- exec("rlog", @files);
+ if (! defined($RLOG)) {
+ &fatal("500 Internal Server Error",
+ "<p>\n<code>rlog</code> not found in "
+ . "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
+ }
+ else {
+ open(STDERR, "> /dev/null"); # rlog may complain; ignore.
+ exec("$RLOG", @files);
+ }
}
}
else {
my $kidpid = open($fh, "-|");
if (! $kidpid) {
- open(STDERR, "> /dev/null"); # rlog may complain; ignore.
- exec("rlog", "-r", @files);
+ if (! defined($RLOG)) {
+ &fatal("500 Internal Server Error",
+ "<p>\n<code>rlog</code> not found in "
+ . "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
+ }
+ else {
+ open(STDERR, "> /dev/null"); # rlog may complain; ignore.
+ exec("$RLOG", "-r", @files);
+ }
}
}
$state = "start";
@@ -1723,12 +1741,19 @@
print("Going to rlog '$fullname'\n") if ($verbose);
if (! open($fh, "-|")) { # child
- if ($revision ne '') {
- exec("rlog", $revision, $fullname);
- }
- else {
- exec("rlog", $fullname);
- }
+ if (! defined($RLOG)) {
+ &fatal("500 Internal Server Error",
+ "<p>\n<code>rlog</code> not found in "
+ . "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
+ }
+ else {
+ if ($revision ne '') {
+ exec("$RLOG", $revision, $fullname);
+ }
+ else {
+ exec("$RLOG", $fullname);
+ }
+ }
}
while (<$fh>) {
print if ($verbose);
@@ -2434,7 +2459,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<html>\n<head>\n";
- print '<!-- Versionary $Revision: 1.10 $ -->';
+ print '<!-- Versionary $Revision: 1.11 $ -->';
print "\n<title>$path$filename - $title - $rev</title></head>\n";
print "<body bgcolor=\"$backcolor\">\n";
print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"$navigationHeaderColor\">";
@@ -2793,7 +2818,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.10 $';
+ my $version = '$Revision: 1.11 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
From: Ken C. <co...@us...> - 2001-12-21 19:27:41
|
coar 01/12/21 11:27:41
Modified: . versionary.cgi
Log:
Abstract the find-an-app functionality, and fix some stylistic stuff
Revision Changes Path
1.10 +92 -90 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- versionary.cgi 2001/12/21 19:10:02 1.9
+++ versionary.cgi 2001/12/21 19:27:41 1.10
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.9 2001/12/21 19:10:02 coar Exp $
+# $Id: versionary.cgi,v 1.10 2001/12/21 19:27:41 coar Exp $
#
###
require 5.000;
@@ -352,12 +352,7 @@
# output through the nonexistent gzip ..
# any more elegant ways to prevent this are welcome!
if ($allow_compress && $maycompress && !$has_zlib) {
- foreach (split(/:/, $ENV{PATH})) {
- if (-x "$_/gzip") {
- $GZIPBIN = "$_/gzip";
- last;
- }
- }
+ $GZIPBIN = findinPATH("gzip");
}
if (-d $fullname) {
@@ -623,7 +618,8 @@
if ($use_descriptions && defined $descriptions{$dwhere}) {
print "<td colspan=\"" . ($infocols-1) . "\"> " if $dirtable;
print $descriptions{$dwhere};
- } elsif ($dirtable && $infocols > 1) {
+ }
+ elsif ($dirtable && $infocols > 1) {
# close the row with the appropriate number of
# columns, so that the vertical seperators are visible
my($cols) = $infocols;
@@ -1469,14 +1465,8 @@
# We'll display anomalous results if we exec rcsdiff and it
# isn't in the path.. defend against such nonsense.
#
- my $rcsdiff;
- foreach (split(/:/, $ENV{PATH})) {
- if (-x "$_/rcsdiff") {
- $rcsdiff = "$_/rcsdiff";
- last;
- }
- }
- if (! $rcsdiff) {
+ my $rcsdiff = findinPATH("rcsdiff");
+ if (! defined($rcsdiff)) {
&fatal("500 Internal Server Error",
"<p>\n<code>rcsdiff</code> not found in "
. "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
@@ -2007,7 +1997,8 @@
if (defined @mytz) {
my ($est) = $mytz[(localtime($date{$_}))[8]];
print ", <i>" . scalar localtime($date{$_}) . " $est</i> (";
- } else {
+ }
+ else {
print ", <i>" . scalar gmtime($date{$_}) . " UTC</i> (";
}
print readableTime(time() - $date{$_}, 1) . " ago)";
@@ -2247,8 +2238,7 @@
print "</body></html>\n";
}
-sub flush_diff_rows ($$$$)
-{
+sub flush_diff_rows($$$$) {
my $j;
my ($leftColRef, $rightColRef, $leftRow, $rightRow) = @_;
@@ -2444,7 +2434,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<html>\n<head>\n";
- print '<!-- Versionary $Revision: 1.9 $ -->';
+ print '<!-- Versionary $Revision: 1.10 $ -->';
print "\n<title>$path$filename - $title - $rev</title></head>\n";
print "<body bgcolor=\"$backcolor\">\n";
print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"$navigationHeaderColor\">";
@@ -2457,8 +2447,7 @@
print "</tr></table>";
}
-sub plural_write ($$)
-{
+sub plural_write($$) {
my ($num, $text) = @_;
if ($num != 1) {
$text = $text . "s";
@@ -2758,19 +2747,21 @@
Apache->request->content_type($content_type);
}
else {
- print "Content-type: $content_type\r\n";
+ print "Content-type: $content_type\r\n";
}
if ($allow_compress && $maycompress) {
- if ($has_zlib || (defined($GZIPBIN) && open(GZIP, "|$GZIPBIN -1 -c"))) {
+ if ($has_zlib
+ || (defined($GZIPBIN)
+ && open(GZIP, "|$GZIPBIN -1 -c"))) {
if ($is_mod_perl) {
- Apache->request->content_encoding("x-gzip");
- Apache->request->header_out(Vary => "Accept-Encoding");
- Apache->request->send_http_header;
+ Apache->request->content_encoding("x-gzip");
+ Apache->request->header_out(Vary => "Accept-Encoding");
+ Apache->request->send_http_header;
}
else {
- print "Content-encoding: x-gzip\r\n";
- print "Vary: Accept-Encoding\r\n"; #RFC 2068, 14.43
- print "\r\n"; # Close headers
+ print "Content-encoding: x-gzip\r\n";
+ print "Vary: Accept-Encoding\r\n"; #RFC 2068, 14.43
+ print "\r\n"; # Close headers
}
$| = 1; $| = 0; # Flush header output
if ($has_zlib) {
@@ -2782,27 +2773,27 @@
}
else {
if ($is_mod_perl) {
- Apache->request->send_http_header;
+ Apache->request->send_http_header;
}
else {
- print "\r\n"; # Close headers
+ print "\r\n"; # Close headers
}
print "<font size=\"-1\">Unable to find gzip binary in the \$PATH to compress output</font><br>";
}
}
else {
- if ($is_mod_perl) {
- Apache->request->send_http_header;
- }
- else {
- print "\r\n"; # Close headers
- }
+ if ($is_mod_perl) {
+ Apache->request->send_http_header;
+ }
+ else {
+ print "\r\n"; # Close headers
+ }
}
}
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.9 $';
+ my $version = '$Revision: 1.10 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
@@ -2820,8 +2811,7 @@
return "<hr noshade><address>$address</address></body></html>\n";
}
-sub link_tags($)
-{
+sub link_tags($) {
my ($tags) = @_;
my ($ret) = "";
my ($fileurl, $filename);
@@ -2862,12 +2852,12 @@
# Close the GZIP handle remove the tie.
sub gzipclose() {
- if ($gzip_open) {
- select(STDOUT);
- close(GZIP);
- untie *GZIP;
- $gzip_open = 0;
- }
+ if ($gzip_open) {
+ select(STDOUT);
+ close(GZIP);
+ untie *GZIP;
+ $gzip_open = 0;
+ }
}
# implement a gzipped file handle via the Compress:Zlib compression
@@ -2878,62 +2868,74 @@
sub OSCODE() { 3 }
sub TIEHANDLE {
- my ($class, $out) = @_;
- my ($d) = Compress::Zlib::deflateInit(-Level => Compress::Zlib::Z_BEST_COMPRESSION(),
- -WindowBits => -Compress::Zlib::MAX_WBITS()) or return undef;
- my ($o) = {
- handle => $out,
- dh => $d,
- crc => 0,
- len => 0,
- };
- my ($header) = pack("c10", MAGIC1, MAGIC2, Compress::Zlib::Z_DEFLATED(), 0, 0, 0, 0, 0, 0, OSCODE);
- print {$o->{handle}} $header;
- return bless($o, $class);
+ my ($class, $out) = @_;
+ my ($d) = Compress::Zlib::deflateInit(-Level => Compress::Zlib::Z_BEST_COMPRESSION(),
+ -WindowBits => -Compress::Zlib::MAX_WBITS()) or return undef;
+ my ($o) = {
+ handle => $out,
+ dh => $d,
+ crc => 0,
+ len => 0,
+ };
+ my ($header) = pack("c10", MAGIC1, MAGIC2, Compress::Zlib::Z_DEFLATED(), 0, 0, 0, 0, 0, 0, OSCODE);
+ print {$o->{handle}} $header;
+ return bless($o, $class);
}
sub PRINT {
- my ($o) = shift;
- my ($buf) = join(defined $, ? $, : "", @_);
- my ($len) = length($buf);
- my ($compressed, $status) = $o->{dh}->deflate($buf);
- print {$o->{handle}} $compressed if defined($compressed);
- $o->{crc} = Compress::Zlib::crc32($buf, $o->{crc});
- $o->{len} += $len;
- return $len;
+ my ($o) = shift;
+ my ($buf) = join(defined $, ? $, : "", @_);
+ my ($len) = length($buf);
+ my ($compressed, $status) = $o->{dh}->deflate($buf);
+ print {$o->{handle}} $compressed if defined($compressed);
+ $o->{crc} = Compress::Zlib::crc32($buf, $o->{crc});
+ $o->{len} += $len;
+ return $len;
}
sub PRINTF {
- my ($o) = shift;
- my ($fmt) = shift;
- my ($buf) = sprintf($fmt, @_);
- my ($len) = length($buf);
- my ($compressed, $status) = $o->{dh}->deflate($buf);
- print {$o->{handle}} $compressed if defined($compressed);
- $o->{crc} = Compress::Zlib::crc32($buf, $o->{crc});
- $o->{len} += $len;
- return $len;
+ my ($o) = shift;
+ my ($fmt) = shift;
+ my ($buf) = sprintf($fmt, @_);
+ my ($len) = length($buf);
+ my ($compressed, $status) = $o->{dh}->deflate($buf);
+ print {$o->{handle}} $compressed if defined($compressed);
+ $o->{crc} = Compress::Zlib::crc32($buf, $o->{crc});
+ $o->{len} += $len;
+ return $len;
}
sub WRITE {
- my ($o, $buf, $len, $off) = @_;
- my ($compressed, $status) = $o->{dh}->deflate(substr($buf, 0, $len));
- print {$o->{handle}} $compressed if defined($compressed);
- $o->{crc} = Compress::Zlib::crc32(substr($buf, 0, $len), $o->{crc});
- $o->{len} += $len;
- return $len;
+ my ($o, $buf, $len, $off) = @_;
+ my ($compressed, $status) = $o->{dh}->deflate(substr($buf, 0, $len));
+ print {$o->{handle}} $compressed if defined($compressed);
+ $o->{crc} = Compress::Zlib::crc32(substr($buf, 0, $len), $o->{crc});
+ $o->{len} += $len;
+ return $len;
}
sub CLOSE {
- my ($o) = @_;
- return if !defined( $o->{dh});
- my ($buf) = $o->{dh}->flush();
- $buf .= pack("V V", $o->{crc}, $o->{len});
- print {$o->{handle}} $buf;
- undef $o->{dh};
+ my ($o) = @_;
+ return if !defined( $o->{dh});
+ my ($buf) = $o->{dh}->flush();
+ $buf .= pack("V V", $o->{crc}, $o->{len});
+ print {$o->{handle}} $buf;
+ undef $o->{dh};
}
sub DESTROY {
- my ($o) = @_;
- CLOSE($o);
+ my ($o) = @_;
+ CLOSE($o);
+}
+
+sub findinPATH {
+ my ($app) = @_;
+ my $result;
+
+ foreach (split(/:/, $ENV{'PATH'})) {
+ if (-x ($result = "$_/$app")) {
+ last;
+ }
+ }
+ return undef;
}
|
|
From: Ken C. <co...@us...> - 2001-12-21 19:10:03
|
coar 01/12/21 11:10:02
Modified: . versionary.cgi
Log:
Huh, the HTML is somewhat cleaner now..
Revision Changes Path
1.9 +84 -84 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- versionary.cgi 2001/12/21 18:50:06 1.8
+++ versionary.cgi 2001/12/21 19:10:02 1.9
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.8 2001/12/21 18:50:06 coar Exp $
+# $Id: versionary.cgi,v 1.9 2001/12/21 19:10:02 coar Exp $
#
###
require 5.000;
@@ -580,7 +580,7 @@
}
else {
$url = urlencode($_) . '/' . $query;
- print "<a name=\"$_\"></A>";
+ print "<a name=\"$_\"></a>";
if ($nofilelinks) {
print $diricon;
}
@@ -725,7 +725,7 @@
print "<option",
(defined($input{only_with_tag})
&& ($input{only_with_tag} eq $tag)
- ? " selected" : "",
+ ? " selected" : ""),
">$tag\n";
}
print "</select>\n";
@@ -773,7 +773,7 @@
print "</td></tr></table></center></form>\n";
}
print &html_footer;
- print "</BODY></HTML>\n";
+ print "</body></html>\n";
}
###############################
@@ -1991,7 +1991,7 @@
if ($allow_version_select) {
if ((!defined($input{"r1"}) || $input{"r1"} ne $_)) {
print " - <a href=\"${scriptwhere}?r1=$_$barequery" .
- "\">[select for diffs]</A>\n";
+ "\">[select for diffs]</a>\n";
}
else {
print " - <b>[selected]</b>";
@@ -2053,10 +2053,10 @@
if ($prev) {
$diffrev{$prev} = 1;
print " to previous <a href=\"${scriptwhere}.diff?r1=$prev";
- print "&r2=$_" . $barequery . "\">$prev</A>\n";
+ print "&r2=$_" . $barequery . "\">$prev</a>\n";
if (!$hr_default) { # offer a human readable version if not default
print "(<a href=\"${scriptwhere}.diff?r1=$prev";
- print "&r2=$_" . $barequery . "&f=h\">colored</A>)\n";
+ print "&r2=$_" . $barequery . "&f=h\">colored</a>)\n";
}
}
#
@@ -2064,10 +2064,10 @@
# offer a diff with the branch point.
if ($revsym{$brp} && !/^1\.1\.1\.\d+$/ && !defined($diffrev{$brp})) {
print " to branchpoint <a href=\"${scriptwhere}.diff?r1=$brp";
- print "&r2=$_" . $barequery . "\">$brp</A>\n";
+ print "&r2=$_" . $barequery . "\">$brp</a>\n";
if (!$hr_default) { # offer a human readable version if not default
print "(<a href=\"${scriptwhere}.diff?r1=$brp";
- print "&r2=$_" . $barequery . "&f=h\">colored</A>)\n";
+ print "&r2=$_" . $barequery . "&f=h\">colored</a>)\n";
}
}
#
@@ -2095,11 +2095,11 @@
$diffrev{$nextmain} = 1;
print " next main <a href=\"${scriptwhere}.diff?r1=$nextmain";
print "&r2=$_" . $barequery .
- "\">$nextmain</A>\n";
+ "\">$nextmain</a>\n";
if (!$hr_default) { # offer a human readable version if not default
print "(<a href=\"${scriptwhere}.diff?r1=$nextmain";
print "&r2=$_" . $barequery .
- "&f=h\">colored</A>)\n";
+ "&f=h\">colored</a>)\n";
}
}
}
@@ -2109,18 +2109,18 @@
$diffrev{$input{"r1"}} = 1;
print " to selected <a href=\"${scriptwhere}.diff?"
. "r1=$input{'r1'}&r2=$_" . $barequery
- . "\">$input{'r1'}</A>\n";
+ . "\">$input{'r1'}</a>\n";
if (!$hr_default) { # offer a human readable version if not default
print "(<a href=\"${scriptwhere}.diff?r1=$input{'r1'}";
print "&r2=$_" . $barequery .
- "&f=h\">colored</A>)\n";
+ "&f=h\">colored</a>)\n";
}
}
}
print "<pre>\n";
print &htmlify($log{$_});
- print "</PRE>\n";
+ print "</pre>\n";
}
sub doLog($) {
@@ -2135,7 +2135,7 @@
$backurl = $scriptname . "/" . urlencode($upwhere) . $query;
print &link($backicon, "$backurl#$filename"),
" <b>Up to ", &clickablePath($upwhere, 1), "</b><p>\n";
- print "<a href=\"#diff\">Request diff between arbitrary revisions</A>\n";
+ print "<a href=\"#diff\">Request diff between arbitrary revisions</a>\n";
print "<hr noshade>\n";
if ($curbranch) {
print "Default branch: ";
@@ -2175,76 +2175,76 @@
print "<select name=\"r1\">\n";
print "<option value=\"text\" selected>Use Text Field\n";
print $sel;
- print "</SELECT>\n";
+ print "</select>\n";
$diffrev = $revdisplayorder[$#revdisplayorder];
$diffrev = $input{"r1"} if (defined($input{"r1"}));
print "<input type=\"text\" size=\"$inputTextSize\" name=\"tr1\" value=\"$diffrev\" onChange='document.diff_select.r1.selectedIndex=0'>\n";
print " and \n";
print "<select name=\"r2\">\n";
- print "<OPTION VALUE=\"text\" SELECTED>Use Text Field\n";
+ print "<option value=\"text\" selected>Use Text Field\n";
print $sel;
- print "</SELECT>\n";
+ print "</select>\n";
$diffrev = $revdisplayorder[0];
$diffrev = $input{"r2"} if (defined($input{"r2"}));
- print "<INPUT TYPE=\"TEXT\" SIZE=\"$inputTextSize\" NAME=\"tr2\" VALUE=\"$diffrev\" onChange='document.diff_select.r2.selectedIndex=0'>\n";
- print "<BR>Type of Diff should be a ";
+ print "<input type=\"text\" size=\"$inputTextSize\" name=\"tr2\" value=\"$diffrev\" onChange='document.diff_select.r2.selectedIndex=0'>\n";
+ print "<br>Type of Diff should be a ";
printDiffSelect(0);
- print "<INPUT TYPE=SUBMIT VALUE=\" Get Diffs \">\n";
- print "</FORM>\n";
- print "<HR noshade>\n";
+ print "<input type=\"submit\" value=\" Get Diffs \">\n";
+ print "</form>\n";
+ print "<hr noshade>\n";
if (@branchnames) {
- print "<A name=branch></A>\n";
- print "<FORM METHOD=\"GET\" ACTION=\"$scriptwhere\">\n";
+ print "<a name=\"branch\"></a>\n";
+ print "<form method=\"GET\" action=\"$scriptwhere\">\n";
foreach (@stickyvars) {
next if ($_ eq "only_with_tag");
next if ($_ eq "logsort");
- print "<INPUT TYPE=HIDDEN NAME=\"$_\" VALUE=\"$input{$_}\">\n"
+ print "<input type=\"hidden\" name=\"$_\" value=\"$input{$_}\">\n"
if (defined($input{$_})
&& (!defined($DEFAULTVALUE{$_})
|| $input{$_} ne $DEFAULTVALUE{$_})
&& $input{$_} ne "");
}
print "View only Branch: \n";
- print "<SELECT NAME=\"only_with_tag\"";
+ print "<select name=\"only_with_tag\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">\n";
- print "<OPTION VALUE=\"\"";
- print " SELECTED" if (defined($input{"only_with_tag"}) &&
+ print "<option value=\"\"";
+ print " selected" if (defined($input{"only_with_tag"}) &&
$input{"only_with_tag"} eq "");
print ">Show all branches\n";
foreach (reverse sort @branchnames) {
- print "<OPTION";
- print " SELECTED" if (defined($input{"only_with_tag"})
+ print "<option";
+ print " selected" if (defined($input{"only_with_tag"})
&& $input{"only_with_tag"} eq $_);
print ">${_}\n";
}
- print "</SELECT>\n";
- print "<INPUT TYPE=SUBMIT VALUE=\" View Branch \">\n";
- print "</FORM>\n";
+ print "</select>\n";
+ print "<input type=\"submit\" value=\" View Branch \">\n";
+ print "</form>\n";
}
- print "<A name=logsort></A>\n";
- print "<FORM METHOD=\"GET\" ACTION=\"$scriptwhere\">\n";
+ print "<a name=\"logsort\"></a>\n";
+ print "<form method=\"GET\" action=\"$scriptwhere\">\n";
foreach (@stickyvars) {
next if ($_ eq "only_with_tag");
next if ($_ eq "logsort");
- print "<INPUT TYPE=HIDDEN NAME=\"$_\" VALUE=\"$input{$_}\">\n"
+ print "<input type=\"hidden\" name=\"$_\" value=\"$input{$_}\">\n"
if (defined($input{$_})
&& (!defined($DEFAULTVALUE{$_})
|| $input{$_} ne $DEFAULTVALUE{$_})
&& $input{$_} ne "");
}
print "Sort log by: \n";
- print "<SELECT NAME=\"logsort\"";
+ print "<select name=\"logsort\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">\n";
- print "<OPTION VALUE=cvs", $logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
- print "<OPTION VALUE=date", $logsort eq "date" ? " SELECTED" : "", ">Commit date";
- print "<OPTION VALUE=rev", $logsort eq "rev" ? " SELECTED" : "", ">Revision";
- print "</SELECT>\n";
- print "<INPUT TYPE=SUBMIT VALUE=\" Sort \">\n";
- print "</FORM>\n";
+ print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">Not sorted";
+ print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">Commit date";
+ print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">Revision";
+ print "</select>\n";
+ print "<input type=\"submit\" value=\" Sort \">\n";
+ print "</form>\n";
print &html_footer;
- print "</BODY></HTML>\n";
+ print "</body></html>\n";
}
sub flush_diff_rows ($$$$)
@@ -2315,16 +2315,16 @@
$date2 = $r2d;
}
- print "<h3 align=center>Diff for /$where_nd between version $rev1 and $rev2</h3>\n";
+ print "<h3 align=\"center\">Diff for /$where_nd between version $rev1 and $rev2</h3>\n";
- print "<table border=0 cellspacing=0 cellpadding=0 width=\"100%\">\n";
+ print "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n";
print "<tr bgcolor=\"#ffffff\">\n";
- print "<th width=\"50%\" valign=TOP>";
+ print "<th width=\"50%\" valign=\"top\">";
print "version $rev1";
print ", $date1" if (defined($date1));
print "<br>Tag: $sym1\n" if ($sym1);
print "</th>\n";
- print "<th width=\"50%\" valign=TOP>";
+ print "<th width=\"50%\" valign=\"top\">";
print "version $rev2";
print ", $date2" if (defined($date2));
print "<br>Tag: $sym2\n" if ($sym1);
@@ -2348,11 +2348,11 @@
if ($difftxt =~ /^@@/) {
($oldline, $newline, $funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/;
print "<tr bgcolor=\"$diffcolorHeading\"><td width=\"50%\">";
- print "<table width=\"100%\" border=1 cellpadding=5><tr><td><b>Line $oldline</b>";
- print " <font size=-1>$funname</font></td></tr></table>";
+ print "<table width=\"100%\" border=\"1\" cellpadding=\"5\"><tr><td><b>Line $oldline</b>";
+ print " <font size=\"-1\">$funname</font></td></tr></table>";
print "</td><td width=\"50%\">";
- print "<table width=\"100%\" border=1 cellpadding=5><tr><td><b>Line $newline</b>";
- print " <font size=-1>$funname</font></td></tr></table>";
+ print "<table width=\"100%\" border=\"1\" cellpadding=\"5\"><tr><td><b>Line $newline</b>";
+ print " <font size=\"-1\">$funname</font></td></tr></table>";
print "</td>\n";
$state = "dump";
$leftRow = 0;
@@ -2400,39 +2400,39 @@
# state is empty if we didn't have any change
if (!$state) {
- print "<tr><td colspan=2> </td></tr>";
+ print "<tr><td colspan=\"2\"> </td></tr>";
print "<tr bgcolor=\"$diffcolorEmpty\" >";
- print "<td colspan=2 align=center><b>- No viewable Change -</b></td></tr>";
+ print "<td colspan=\"2\" align=\"center\"><b>- No viewable Change -</b></td></tr>";
}
print "</table>";
close($fh);
print "<br><hr noshade width=\"100%\">\n";
- print "<table border=0>";
+ print "<table border=\"0\">";
print "<tr><td>";
# print legend
- print "<table border=1><tr><td>";
- print "Legend:<br><table border=0 cellspacing=0 cellpadding=1>\n";
- print "<tr><td align=center bgcolor=\"$diffcolorRemove\">Removed from v.$rev1</td><td bgcolor=\"$diffcolorEmpty\"> </td></tr>";
- print "<tr bgcolor=\"$diffcolorChange\"><td align=center colspan=2>changed lines</td></tr>";
- print "<tr><td bgcolor=\"$diffcolorEmpty\"> </td><td align=center bgcolor=\"$diffcolorAdd\">Added in v.$rev2</td></tr>";
+ print "<table border=\"1\"><tr><td>";
+ print "Legend:<br><table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
+ print "<tr><td align=\"center\" bgcolor=\"$diffcolorRemove\">Removed from v.$rev1</td><td bgcolor=\"$diffcolorEmpty\"> </td></tr>";
+ print "<tr bgcolor=\"$diffcolorChange\"><td align=\"center\" colspan=\"2\">changed lines</td></tr>";
+ print "<tr><td bgcolor=\"$diffcolorEmpty\"> </td><td align=\"center\" bgcolor=\"$diffcolorAdd\">Added in v.$rev2</td></tr>";
print "</table></td></tr></table>\n";
print "<td>";
# Print format selector
- print "<FORM METHOD=\"GET\" ACTION=\"${scriptwhere}\">\n";
+ print "<form method=\"GET\" action=\"${scriptwhere}\">\n";
foreach my $var (keys %input) {
next if ($var eq "f");
next if (defined($DEFAULTVALUE{$var})
&& $DEFAULTVALUE{$var} eq $input{$var});
- print "<INPUT TYPE=HIDDEN NAME=\"", urlencode($var), "\" VALUE=\"",
+ print "<input type=\"hidden\" name=\"", urlencode($var), "\" value=\"",
urlencode($input{$var}), "\">\n";
}
printDiffSelect($use_java_script);
- print "<INPUT TYPE=SUBMIT VALUE=\"Show\">\n";
- print "</FORM>\n";
+ print "<input type=\"submit\" value=\"Show\">\n";
+ print "</form>\n";
print "</td>";
print "</tr></table>";
@@ -2443,17 +2443,17 @@
$swhere = "" if ($swhere eq $scriptwhere);
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
- print "<HTML>\n<HEAD>\n";
- print '<!-- Versionary $Revision: 1.8 $ -->';
- print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
- print "<BODY BGCOLOR=\"$backcolor\">\n";
- print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
- print "<tr valign=bottom><td>";
+ print "<html>\n<head>\n";
+ print '<!-- Versionary $Revision: 1.9 $ -->';
+ print "\n<title>$path$filename - $title - $rev</title></head>\n";
+ print "<body bgcolor=\"$backcolor\">\n";
+ print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"$navigationHeaderColor\">";
+ print "<tr valign=\"bottom\"><td>";
print "<a href=\"$swhere$query#rev$rev\">$backicon";
print "</a> <b>Return to ", &link("$filename", "$swhere$query#rev$rev"), " CVS log";
print "</b> $fileicon</td>";
- print "<td align=right>$diricon <b>Up to ", &clickablePath($path, 1), "</b></td>";
+ print "<td align=\"right\">$diricon <b>Up to ", &clickablePath($path, 1), "</b></td>";
print "</tr></table>";
}
@@ -2567,7 +2567,7 @@
my ($k);
print "<form method=\"GET\" action=\"${scriptwhere}\">\n";
foreach $k (keys %input) {
- print "<input type=hidden NAME=$k VALUE=$input{$k}>\n"
+ print "<input type=\"hidden\" name=\"$k\" value=\"$input{$k}\">\n"
if ($input{$k}) && ($k ne "cvsroot");
}
# Form-Elements look wierd in Netscape if the background
@@ -2585,7 +2585,7 @@
$k). "</option>\n";
}
print "</select>\n</td>";
- print "<td><input type=submit value=\"Go\"></td>";
+ print "<td><input type=\"submit\" value=\"Go\"></td>";
print "</tr></table></form>";
}
else {
@@ -2606,7 +2606,7 @@
print "\nThis Versionary is mirrored in:\n";
foreach $mirror (keys %MIRRORS) {
print ", " if ($moremirrors);
- print qq(<a href="$MIRRORS{$mirror}">$mirror</A>\n);
+ print qq(<a href="$MIRRORS{$mirror}">$mirror</a>\n);
$moremirrors = 1;
}
print "<p>\n";
@@ -2636,8 +2636,8 @@
# available.
my $ad = ((-d "$fullname/$a")?"D":"F");
my $bd = ((-d "$fullname/$b")?"D":"F");
- ($c=$a) =~ s|.*/||;
- ($d=$b) =~ s|.*/||;
+ ($c = $a) =~ s|.*/||;
+ ($d = $b) =~ s|.*/||;
$comp = ("$ad$c" cmp "$bd$d");
}
return $comp;
@@ -2670,7 +2670,7 @@
$textlink =~ s/^\(// if ($paren);
$textlink =~ s/\)$// if ($paren);
print "(" if ($paren);
- print "<A HREF=\"$fullurl";
+ print "<a href=\"$fullurl";
print $barequery;
print "\"";
if ($open_extern_window && (!defined($mimetype)
@@ -2703,7 +2703,7 @@
print"');\"";
}
}
- print "><b>$textlink</b></A>";
+ print "><b>$textlink</b></a>";
print ")" if ($paren);
}
@@ -2787,7 +2787,7 @@
else {
print "\r\n"; # Close headers
}
- print "<font size=-1>Unable to find gzip binary in the \$PATH to compress output</font><br>";
+ print "<font size=\"-1\">Unable to find gzip binary in the \$PATH to compress output</font><br>";
}
}
else {
@@ -2802,7 +2802,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.8 $';
+ my $version = '$Revision: 1.9 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
@@ -2831,8 +2831,8 @@
foreach my $sym (split(", ", $tags)) {
$ret .= ",\n" if ($ret ne "");
- $ret .= "<A HREF=\"$fileurl"
- . toggleQuery('only_with_tag', $sym) . "\">$sym</A>";
+ $ret .= "<a href=\"$fileurl"
+ . toggleQuery('only_with_tag', $sym) . "\">$sym</a>";
}
return $ret."\n";
}
@@ -2853,7 +2853,7 @@
sub checkForbidden($@) {
my($item, @list) = @_;
- for (my $i=0; $i < @list; $i++) {
+ for (my $i = 0; $i < @list; $i++) {
return 1 if $item =~ $list[$i];
}
return 0;
|
|
From: Ken C. <co...@us...> - 2001-12-21 18:50:07
|
coar 01/12/21 10:50:06 Modified: . versionary.cgi Log: Whoops, revert the last commit -- somehow EVERYthing got downcased.. Revision Changes Path 1.8 +614 -614 versionary/versionary.cgi Index: versionary.cgi =================================================================== RCS file: /cvsroot/versionary/versionary/versionary.cgi,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- versionary.cgi 2001/12/21 15:01:17 1.7 +++ versionary.cgi 2001/12/21 18:50:06 1.8 @@ -1,49 +1,49 @@ #! /usr/bin/perl -ws # -# versionary - a cgi interface to cvs trees. +# Versionary - a CGI interface to CVS trees. # -# based on the cvsweb tool originally by bill fenner and then -# modified by others (principally henner zeller) as shown below. +# Based on the cvsweb tool originally by Bill Fenner and then +# modified by others (principally Henner Zeller) as shown below. # -# written in their spare time by -# bill fenner <fe...@fr...> (original work) -# extended by henner zeller <ze...@th...>, -# henrik nordström <hn...@he...> -# ken coar <co...@ap...> -# dick balaska <di...@bu...> -# jens-uwe mager <ju...@he...> +# Written in their spare time by +# Bill Fenner <fe...@Fr...> (original work) +# extended by Henner Zeller <ze...@th...>, +# Henrik Nordström <hn...@he...> +# Ken Coar <co...@Ap...> +# Dick Balaska <di...@bu...> +# Jens-Uwe Mager <ju...@he...> # -# based on: -# * bill fenners cvsweb.cgi revision 1.28 available from: -# http://www.freebsd.org/cgi/cvsweb.cgi/www/en/cgi/cvsweb.cgi +# Based on: +# * Bill Fenners cvsweb.cgi revision 1.28 available from: +# http://www.FreeBSD.org/cgi/cvsweb.cgi/www/en/cgi/cvsweb.cgi # -# copyright (c) 1996-1998 bill fenner -# (c) 1998-1999 henner zeller -# (c) 1999 henrik nordström -# all rights reserved. +# Copyright (c) 1996-1998 Bill Fenner +# (c) 1998-1999 Henner Zeller +# (c) 1999 Henrik Nordström +# All rights reserved. # -# redistribution and use in source and binary forms, with or without +# Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: -# 1. redistributions of source code must retain the above copyright +# 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. -# 2. redistributions in binary form must reproduce the above copyright +# 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # -# this software is provided by the author and contributors ``as is'' and -# any express or implied warranties, including, but not limited to, the -# implied warranties of merchantability and fitness for a particular purpose -# are disclaimed. in no event shall the author or contributors be liable -# for any direct, indirect, incidental, special, exemplary, or consequential -# damages (including, but not limited to, procurement of substitute goods -# or services; loss of use, data, or profits; or business interruption) -# however caused and on any theory of liability, whether in contract, strict -# liability, or tort (including negligence or otherwise) arising in any way -# out of the use of this software, even if advised of the possibility of -# such damage. +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. # -# $id: versionary.cgi,v 1.6 2001/12/20 23:01:35 coar exp $ +# $Id: versionary.cgi,v 1.8 2001/12/21 18:50:06 coar Exp $ # ### require 5.000; @@ -52,64 +52,64 @@ use vars qw ( $config $allow_version_select $verbose - %cvsroot %cvsrootdescr %mirrors %defaultvalue %icons %mtypes + %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES %alltags @tabcolors %fileinfo %tags @branchnames %nameprinted %symrev %revsym @allrevisions %date %author @revdisplayorder @revisions %state %difflines %log %branchpoint @revorder - $checkoutmagic $docheckout $scriptname $scriptwhere - $where $browser $nofilelinks $maycompress @stickyvars + $checkoutMagic $doCheckout $scriptname $scriptwhere + $where $Browser $nofilelinks $maycompress @stickyvars %input $query $barequery $sortby $bydate $byrev $byauthor $bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot - $mimetype $defaulttextplain $defaultviewable $allow_compress - $gzipbin $backicon $diricon $fileicon $fullname $newname + $mimetype $defaultTextPlain $defaultViewable $allow_compress + $GZIPBIN $backicon $diricon $fileicon $fullname $newname $cvstreedefault $body_tag $logo $defaulttitle $address - $backcolor $long_intro $short_instruction $shortloglen - $show_author $dirtable $tablepadding $columnheadercolordefault - $columnheadercolorsorted $hr_breakable $hr_funout $hr_ignwhite - $hr_ignkeysubst $diffcolorheading $diffcolorempty $diffcolorremove - $diffcolorchange $diffcoloradd $diffcolordarkchange $difffontface - $difffontsize $inputtextsize $mime_types $allow_annotate + $backcolor $long_intro $short_instruction $shortLogLen + $show_author $dirtable $tablepadding $columnHeaderColorDefault + $columnHeaderColorSorted $hr_breakable $hr_funout $hr_ignwhite + $hr_ignkeysubst $diffcolorHeading $diffcolorEmpty $diffcolorRemove + $diffcolorChange $diffcolorAdd $diffcolorDarkChange $difffontface + $difffontsize $inputTextSize $mime_types $allow_annotate $allow_markup $use_java_script $open_extern_window $extern_window_width $extern_window_height $edit_option_form $checkout_magic $show_subdir_lastmod $show_log_in_markup $v - $navigationheadercolor $tablebordercolor $markuplogcolor - $tabstop $state $anntable $sel $curbranch @hidemodules @disallowread + $navigationHeaderColor $tableBorderColor $markupLogColor + $tabstop $state $annTable $sel $curbranch @HideModules @DisallowRead $module $use_descriptions %descriptions @mytz $dwhere $moddate $use_moddate $has_zlib $gzip_open ); ##### prototype declarations ######## -sub printdiffselect($); -sub findlastmodifiedsubdirs(@); +sub printDiffSelect($); +sub findLastModifiedSubdirs(@); sub htmlify($); -sub spacedhtmltext($); +sub spacedHtmlText($); sub link($$); sub revcmp($$); sub fatal($$); sub redirect($); sub safeglob($); -sub getmimetypefromsuffix($); -sub doannotate ($$); -sub docheckout($$); -sub versionarymarkup($$$); +sub getMimeTypeFromSuffix($); +sub doAnnotate ($$); +sub doCheckout($$); +sub versionaryMarkup($$$); sub viewable($); -sub dodiff($$$$$$); -sub getdirlogs($$@); -sub readlog($;$); -sub printlog($;$); -sub dolog($); +sub doDiff($$$$$$); +sub getDirLogs($$@); +sub readLog($;$); +sub printLog($;$); +sub doLog($); sub flush_diff_rows ($$$$); sub human_readable_diff($); -sub navigateheader ($$$$$); +sub navigateHeader ($$$$$); sub plural_write ($$); -sub readabletime ($$); -sub clickablepath($$); -sub choosecvsroot(); -sub choosemirror(); -sub filesortcmp(); +sub readableTime ($$); +sub clickablePath($$); +sub chooseCVSRoot(); +sub chooseMirror(); +sub fileSortCmp(); sub download_url($$$); sub download_link($$$$); -sub togglequery($$); +sub toggleQuery($$); sub urlencode($); sub http_header(;$); sub html_header($); @@ -117,61 +117,61 @@ sub link_tags($); sub forbidden_module($); sub forbidden_file($); -sub checkforbidden($@); +sub checkForbidden($@); sub gzipclose(); -sub magic1(); -sub magic2(); -sub oscode(); - -##### start of configuration area ######## -# == edit this == -# user configuration is stored in -$config = $env{'versionary_conf'} +sub MAGIC1(); +sub MAGIC2(); +sub OSCODE(); + +##### Start of Configuration Area ######## +# == EDIT this == +# User configuration is stored in +$config = $ENV{'VERSIONARY_CONF'} || '/usr/local/web/apache/conf/versionary.conf'; -# == configuration defaults == -# defaults for configuration variables that shouldn't need +# == Configuration defaults == +# Defaults for configuration variables that shouldn't need # to be configured.. $allow_version_select = 1; -##### end of configuration area ######## +##### End of Configuration Area ######## -######## configuration variables ######### -# these are defined to allow checking with perl -cw -%cvsroot = %mirrors = %defaultvalue = %icons = %mtypes = +######## Configuration variables ######### +# These are defined to allow checking with perl -cw +%CVSROOT = %MIRRORS = %DEFAULTVALUE = %ICONS = %MTYPES = %tags = %alltags = @tabcolors = %fileinfo = (); $cvstreedefault = $body_tag = $logo = $defaulttitle = $address = -$backcolor = $long_intro = $short_instruction = $shortloglen = -$show_author = $dirtable = $tablepadding = $columnheadercolordefault = -$columnheadercolorsorted = $hr_breakable = $hr_funout = $hr_ignwhite = -$hr_ignkeysubst = $diffcolorheading = $diffcolorempty = $diffcolorremove = -$diffcolorchange = $diffcoloradd = $diffcolordarkchange = $difffontface = -$difffontsize = $inputtextsize = $mime_types = $allow_annotate = +$backcolor = $long_intro = $short_instruction = $shortLogLen = +$show_author = $dirtable = $tablepadding = $columnHeaderColorDefault = +$columnHeaderColorSorted = $hr_breakable = $hr_funout = $hr_ignwhite = +$hr_ignkeysubst = $diffcolorHeading = $diffcolorEmpty = $diffcolorRemove = +$diffcolorChange = $diffcolorAdd = $diffcolorDarkChange = $difffontface = +$difffontsize = $inputTextSize = $mime_types = $allow_annotate = $allow_markup = $use_java_script = $open_extern_window = $extern_window_width = $extern_window_height = $edit_option_form = $checkout_magic = $show_subdir_lastmod = $show_log_in_markup = $v = -$navigationheadercolor = $tablebordercolor = $markuplogcolor = +$navigationHeaderColor = $tableBorderColor = $markupLogColor = $tabstop = $use_moddate = $moddate = $gzip_open = undef; -##### end of configuration variables ##### +##### End of configuration variables ##### -use time::local; -use ipc::open2; +use Time::Local; +use IPC::Open2; -# check if the zlib c library interface is installed, and if yes +# Check if the zlib C library interface is installed, and if yes # we can avoid using the extra gzip process. eval { - require compress::zlib; + require Compress::Zlib; }; $has_zlib = !$@; $verbose = $v; -$checkoutmagic = "~checkout~"; -$where = defined($env{'path_info'}) ? $env{'path_info'} : ""; -$docheckout = ($where =~ /^\/$checkoutmagic/); -$where =~ s|^/($checkoutmagic)?||; +$checkoutMagic = "~checkout~"; +$where = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; +$doCheckout = ($where =~ /^\/$checkoutMagic/); +$where =~ s|^/($checkoutMagic)?||; $where =~ s|/+$||; -($scriptname = $env{'script_name'}) =~ s|^/?|/|; +($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|; $scriptname =~ s|/+$||; if ($where) { $scriptwhere = $scriptname . '/' . urlencode($where); @@ -184,23 +184,23 @@ # in lynx, it it very annoying to have two links # per file, so disable the link at the icon # in this case: -$browser = $env{'http_user_agent'}; -$nofilelinks = ($browser =~ m'^lynx/'); +$Browser = $ENV{'HTTP_USER_AGENT'}; +$nofilelinks = ($Browser =~ m'^Lynx/'); # newer browsers accept gzip content encoding # and state this in a header # (netscape did always but didn't state it) -# it has been reported that these -# braindamaged ms-internet exploders claim that they +# It has been reported that these +# braindamaged MS-Internet Exploders claim that they # accept gzip .. but don't in fact and # display garbage then :-/ -# turn off gzip if running under mod_perl and no zlib is available, +# Turn off gzip if running under mod_perl and no zlib is available, # piping does not work as expected inside the server. -$maycompress = (((defined($env{'http_accept_encoding'}) - && $env{'http_accept_encoding'} =~ m|gzip|) - || $browser =~ m%^mozilla/3%) - && ($browser !~ m/msie/) - && !(defined($env{'mod_perl'}) && !$has_zlib)); +$maycompress = (((defined($ENV{'HTTP_ACCEPT_ENCODING'}) + && $ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip|) + || $Browser =~ m%^Mozilla/3%) + && ($Browser !~ m/MSIE/) + && !(defined($ENV{'MOD_PERL'}) && !$has_zlib)); # put here the variables we need in order # to hold our state - they will be added (with @@ -212,19 +212,19 @@ do "$config"; } else { - &fatal("500 internal error", - 'configuration not found. set the variable <code>$config</code> ' + &fatal("500 Internal Error", + 'Configuration not found. Set the variable <code>$config</code> ' . 'in versionary.cgi, or the environment variable ' - . '<code>versionary_conf</code>, to your <b>versionary.conf</b> ' + . '<code>VERSIONARY_CONF</code>, to your <b>versionary.conf</b> ' . 'configuration file first.'); } undef %input; -if ($query = $env{'query_string'}) { +if ($query = $ENV{'QUERY_STRING'}) { foreach (split(/&/, $query)) { y/+/ /; s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted - if (/(\s+)=(.*)/) { + if (/(\S+)=(.*)/) { $input{$1} = $2 if ($2 ne ""); } else { @@ -233,27 +233,27 @@ } } -# for backwards compability, set only_with_tag to only_on_branch if set. +# For backwards compability, set only_with_tag to only_on_branch if set. $input{only_with_tag} = $input{only_on_branch} if (defined($input{only_on_branch})); -foreach (keys %defaultvalue) { +foreach (keys %DEFAULTVALUE) { # replace not given parameters with the default parameters if (!defined($input{$_}) || $input{$_} eq "") { - # empty checkboxes in forms return -- nothing. so we define a helper + # Empty Checkboxes in forms return -- nothing. So we define a helper # variable in these forms (copt) which indicates that we just set # parameters with a checkbox if (!defined($input{"copt"})) { # 'copt' isn't defined --> empty input is not the result # of empty input checkbox --> set default - $input{$_} = $defaultvalue{$_} if (defined($defaultvalue{$_})); + $input{$_} = $DEFAULTVALUE{$_} if (defined($DEFAULTVALUE{$_})); } else { # 'copt' is defined -> the result of empty input checkbox # -> set to zero (disable) if default is a boolean (0|1). $input{$_} = 0 - if (defined($defaultvalue{$_}) - && ($defaultvalue{$_} eq "0" || $defaultvalue{$_} eq "1")); + if (defined($DEFAULTVALUE{$_}) + && ($DEFAULTVALUE{$_} eq "0" || $DEFAULTVALUE{$_} eq "1")); } } } @@ -262,7 +262,7 @@ foreach (@stickyvars) { # construct a query string with the sticky non default parameters set if (defined($input{$_}) && ($input{$_} ne "") - && (!defined($defaultvalue{$_}) || $input{$_} ne $defaultvalue{$_})) { + && (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) { if ($barequery) { $barequery = $barequery . "&"; } @@ -307,28 +307,28 @@ $logsort = $input{"logsort"}; -## default cvs-tree -if (!defined($cvsroot{$cvstreedefault})) { - &fatal("500 internal error", +## Default CVS-Tree +if (!defined($CVSROOT{$cvstreedefault})) { + &fatal("500 Internal Error", "<code>\$cvstreedefault</code> points to a repository " - . "($cvstreedefault) not defined in <code>%cvsroot</code> " + . "($cvstreedefault) not defined in <code>%CVSROOT</code> " . "(edit your configuration file $config)"); } $cvstree = $cvstreedefault; -$cvsroot = $cvsroot{"$cvstree"}; +$cvsroot = $CVSROOT{"$cvstree"}; -# alternate cvs-tree, configured in versionary.conf +# alternate CVS-Tree, configured in versionary.conf if ($input{'cvsroot'}) { - if ($cvsroot{$input{'cvsroot'}}) { + if ($CVSROOT{$input{'cvsroot'}}) { $cvstree = $input{'cvsroot'}; - $cvsroot = $cvsroot{"$cvstree"}; + $cvsroot = $CVSROOT{"$cvstree"}; } } # create icons out of description -foreach my $k (keys %icons) { +foreach my $k (keys %ICONS) { no strict 'refs'; - my ($itxt, $ipath, $iwidth, $iheight) = @{$icons{$k}}; + my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}}; if ($ipath) { ${"${k}icon"} = "<img src=\"$ipath\" alt=\"$itxt\" " . "border=\"0\" width=\"$iwidth\" height=\"$iheight\">"; @@ -338,23 +338,23 @@ } } -# do some special configuration for cvstrees +# Do some special configuration for cvstrees do "$config-$cvstree" if (-f "$config-$cvstree"); $fullname = $cvsroot . '/' . $where; -$mimetype = &getmimetypefromsuffix ($fullname); -$defaulttextplain = ($mimetype eq "text/plain"); -$defaultviewable = $allow_markup && viewable($mimetype); - -# search for gzip if compression allowed -# we've to find out if the gzip-binary exists .. otherwise -# ge get an internal server error if we try to pipe the +$mimetype = &getMimeTypeFromSuffix ($fullname); +$defaultTextPlain = ($mimetype eq "text/plain"); +$defaultViewable = $allow_markup && viewable($mimetype); + +# search for GZIP if compression allowed +# We've to find out if the GZIP-binary exists .. otherwise +# ge get an Internal Server Error if we try to pipe the # output through the nonexistent gzip .. # any more elegant ways to prevent this are welcome! if ($allow_compress && $maycompress && !$has_zlib) { - foreach (split(/:/, $env{path})) { + foreach (split(/:/, $ENV{PATH})) { if (-x "$_/gzip") { - $gzipbin = "$_/gzip"; + $GZIPBIN = "$_/gzip"; last; } } @@ -363,9 +363,9 @@ if (-d $fullname) { # # ensure, that directories always end with (exactly) one '/' - # to allow relative url's. if they're not, make a redirect. + # to allow relative URL's. If they're not, make a redirect. ## - my $pathinfo = defined($env{'path_info'}) ? $env{'path_info'} : ""; + my $pathinfo = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; if (!($pathinfo =~ m|/$|) || ($pathinfo =~ m |/{2,}$|)) { redirect ($scriptwhere . '/' . $query); } @@ -376,31 +376,31 @@ } if (!-d $cvsroot) { - &fatal("500 internal error", - "<p>\n" . '$cvsroot not found!' . "\n</p>\n" - . "<p>\nthe server on which the cvs tree lives is probably down. " - . "please try again in a few minutes.\n</p>\n"); + &fatal("500 Internal Error", + "<p>\n" . '$CVSROOT not found!' . "\n</p>\n" + . "<p>\nThe server on which the CVS tree lives is probably down. " + . "Please try again in a few minutes.\n</p>\n"); } # -# see if the module is in our forbidden list. +# See if the module is in our forbidden list. # $where =~ m:([^/]*):; $module = $1; if ($module && &forbidden_module($module)) { - &fatal("403 forbidden", "access to $where forbidden."); + &fatal("403 Forbidden", "Access to $where forbidden."); } ############################## -# view a directory +# View a directory ############################### elsif (-d $fullname) { - my $dh = do {local(*dh);}; - opendir($dh, $fullname) || &fatal("404 not found", "$where: $!"); + my $dh = do {local(*DH);}; + opendir($dh, $fullname) || &fatal("404 Not Found", "$where: $!"); my @dir = readdir($dh); closedir($dh); - my @sublevelfiles = findlastmodifiedsubdirs(@dir) + my @subLevelFiles = findLastModifiedSubdirs(@dir) if ($show_subdir_lastmod); - getdirlogs($cvsroot, $where, @sublevelfiles); + getDirLogs($cvsroot, $where, @subLevelFiles); if ($where eq '/') { html_header("$defaulttitle"); @@ -412,10 +412,10 @@ } my $descriptions; - if (($use_descriptions) && open (desc, "<$cvsroot/cvsroot/descriptions")) { - while (<desc>) { + if (($use_descriptions) && open (DESC, "<$cvsroot/CVSROOT/descriptions")) { + while (<DESC>) { chomp; - my ($dir, $description) = /(\s+)\s+(.*)/; + my ($dir, $description) = /(\S+)\s+(.*)/; $descriptions{$dir} = $description; } } @@ -423,40 +423,40 @@ print "<p>\n<a name=\"dirlist\"></a>\n"; # give direct access to dirs if ($where eq '/') { - choosemirror(); - choosecvsroot(); + chooseMirror(); + chooseCVSRoot(); } else { - print "<p>\ncurrent directory: <b>", &clickablepath($where, 0), + print "<p>\nCurrent directory: <b>", &clickablePath($where, 0), "</b>\n"; - print "<p>\ncurrent tag: <b>", $input{only_with_tag}, "</b>\n" if + print "<p>\nCurrent tag: <b>", $input{only_with_tag}, "</b>\n" if $input{only_with_tag}; } print "<hr noshade>\n"; - # using <menu> in this manner violates the html2.0 spec but - # provides the results that i want in most browsers. another - # case of layout spooging up html. + # Using <MENU> in this manner violates the HTML2.0 spec but + # provides the results that I want in most browsers. Another + # case of layout spooging up HTML. my $infocols = 0; if ($dirtable) { - if (defined($tablebordercolor)) { - # can't this be done by defining the border for the inner table? + if (defined($tableBorderColor)) { + # Can't this be done by defining the border for the inner table? print "<table border=\"0\" cellpadding=\"0\" " - . "width=\"100%\"><tr><td bgcolor=\"$tablebordercolor\">"; + . "width=\"100%\"><tr><td bgcolor=\"$tableBorderColor\">"; } print "<table width=\"100%\" border=\"0\" cellspacing=\"1\" " . "cellpadding=\"$tablepadding\">\n"; $infocols++; print "<tr><th align=\"left\" bgcolor=\"" . (($byfile) ? - $columnheadercolorsorted : - $columnheadercolordefault) . "\">"; - print "<a href=\"./" . &togglequery("sortby", "file") . + $columnHeaderColorSorted : + $columnHeaderColorDefault) . "\">"; + print "<a href=\"./" . &toggleQuery("sortby", "file") . "#dirlist\">" if (!$byfile); - print "file"; + print "File"; print "</a>" if (!$byfile); print "</th>"; # do not display the other column-headers, if we do not have any files @@ -464,45 +464,45 @@ if (scalar(%fileinfo)) { $infocols++; print "<th align=\"left\" bgcolor=\"" . (($byrev) ? - $columnheadercolorsorted : - $columnheadercolordefault) . "\">"; - print "<a href=\"./" . &togglequery ("sortby", "rev") . + $columnHeaderColorSorted : + $columnHeaderColorDefault) . "\">"; + print "<a href=\"./" . &toggleQuery ("sortby", "rev") . "#dirlist\">" if (!$byrev); - print "rev."; + print "Rev."; print "</a>" if (!$byrev); print "</th>"; $infocols++; print "<th align=\"left\" bgcolor=\"" . (($bydate) ? - $columnheadercolorsorted : - $columnheadercolordefault) . "\">"; - print "<a href=\"./" . &togglequery ("sortby", "date") . + $columnHeaderColorSorted : + $columnHeaderColorDefault) . "\">"; + print "<a href=\"./" . &toggleQuery ("sortby", "date") . "#dirlist\">" if (!$bydate); - print "age"; + print "Age"; print "</a>" if (!$bydate); print "</th>"; if ($show_author) { $infocols++; print "<th align=\"left\" bgcolor=\"" . (($byauthor) ? - $columnheadercolorsorted : - $columnheadercolordefault) . "\">"; - print "<a href=\"./" . &togglequery ("sortby", "author") . + $columnHeaderColorSorted : + $columnHeaderColorDefault) . "\">"; + print "<a href=\"./" . &toggleQuery ("sortby", "author") . "#dirlist\">" if (!$byauthor); - print "author"; + print "Author"; print "</a>" if (!$byauthor); print "</th>"; } $infocols++; print "<th align=\"left\" bgcolor=\"" . (($bylog) ? - $columnheadercolorsorted : - $columnheadercolordefault) . "\">"; - print "<a href=\"./", togglequery("sortby", "log"), "#dirlist\">" if (!$bylog); - print "last log entry"; + $columnHeaderColorSorted : + $columnHeaderColorDefault) . "\">"; + print "<a href=\"./", toggleQuery("sortby", "log"), "#dirlist\">" if (!$bylog); + print "Last log entry"; print "</a>" if (!$bylog); print "</th>"; } elsif ($use_descriptions) { - print "<th align=\"left\" bgcolor=\"". $columnheadercolordefault . "\">"; - print "description"; + print "<th align=\"left\" bgcolor=\"". $columnHeaderColorDefault . "\">"; + print "Description"; $infocols++; } print "</tr>\n"; @@ -515,22 +515,22 @@ my $i; lookingforattic: for ($i = 0; $i <= $#dir; $i++) { - if ($dir[$i] eq "attic") { + if ($dir[$i] eq "Attic") { last lookingforattic; } } if (!$input{'hideattic'} && ($i <= $#dir) && - opendir($dh, $fullname . "/attic")) { + opendir($dh, $fullname . "/Attic")) { splice(@dir, $i, 1, - grep((s|^|attic/|,!m|/\.|), readdir($dh))); + grep((s|^|Attic/|,!m|/\.|), readdir($dh))); closedir($dh); } - my $hideattictogglelink = "<a href=\"./" . - &togglequery ("hideattic") . - "#dirlist\">[hide]</a>" if (!$input{'hideattic'}); + my $hideAtticToggleLink = "<a href=\"./" . + &toggleQuery ("hideattic") . + "#dirlist\">[Hide]</a>" if (!$input{'hideattic'}); - # sort without the attic/ pathname. + # Sort without the Attic/ pathname. # place directories first my $attic; @@ -539,24 +539,24 @@ my $filesexists; my $filesfound; - foreach (sort { &filesortcmp } @dir) { + foreach (sort { &fileSortCmp } @dir) { if ($_ eq '.') { next; } - # ignore cvs lock and stale nfs files + # ignore CVS lock and stale NFS files next if (/^#cvs\.|^,|^\.nfs/); - # check whether to show the cvsroot path - next if ($input{'hidecvsroot'} && ($_ eq 'cvsroot')); + # Check whether to show the CVSROOT path + next if ($input{'hidecvsroot'} && ($_ eq 'CVSROOT')); - # check whether the module is in the restricted list + # Check whether the module is in the restricted list next if ($_ && &forbidden_module($_)); - # ignore non-readable files + # Ignore non-readable files next if ($input{'hidenonreadable'} && !(-r "$fullname/$_")); - if (s|^attic/||) { - $attic = " (in the attic) " . $hideattictogglelink; + if (s|^Attic/||) { + $attic = " (in the Attic) " . $hideAtticToggleLink; } else { $attic = ""; @@ -576,11 +576,11 @@ else { print &link($backicon, $url); } - print " ", &link("previous directory", $url); + print " ", &link("Previous Directory", $url); } else { $url = urlencode($_) . '/' . $query; - print "<a name=\"$_\"></a>"; + print "<a name=\"$_\"></A>"; if ($nofilelinks) { print $diricon; } @@ -588,17 +588,17 @@ print &link($diricon, $url); } print " ", &link($_ . "/", $url), $attic; - if ($_ eq "attic") { + if ($_ eq "Attic") { print " <a href=\"./" . - &togglequery ("hideattic") . - "#dirlist\">[don't hide]</a>"; + &toggleQuery ("hideattic") . + "#dirlist\">[Don't hide]</a>"; } } - # show last change in dir + # Show last change in dir if ($filename) { print "</td><td> </td><td> " if ($dirtable); if ($date) { - print " <i>" . readabletime(time() - $date, 0) + print " <i>" . readableTime(time() - $date, 0) . "</i>"; } if ($show_author) { @@ -611,7 +611,7 @@ print "<br>" if ($dirtable); if ($log) { print " <font size=\"-1\">" - . &htmlify(substr($log, 0, $shortloglen)); + . &htmlify(substr($log, 0, $shortLogLen)); if (length $log > 80) { print "..."; } @@ -642,7 +642,7 @@ $dirrow++; } elsif (s/,v$//) { - $fileurl = ($attic ? "attic/" : "") . urlencode($_); + $fileurl = ($attic ? "Attic/" : "") . urlencode($_); $url = $fileurl . $query; my $rev = ''; my $date = ''; @@ -664,10 +664,10 @@ print "</td><td> " if ($dirtable); download_link($fileurl, $rev, $rev, - $defaultviewable ? "text/x-versionary-markup" : undef); + $defaultViewable ? "text/x-versionary-markup" : undef); print "</td><td> " if ($dirtable); if ($date) { - print " <i>" . readabletime(time() - $date, 0) . "</i>"; + print " <i>" . readableTime(time() - $date, 0) . "</i>"; } if ($show_author) { print "</td><td> " if ($dirtable); @@ -676,7 +676,7 @@ print "</td><td> " if ($dirtable); if ($log) { print " <font size=\"-1\">" - . &htmlify(substr($log, 0, $shortloglen)); + . &htmlify(substr($log, 0, $shortLogLen)); if (length $log > 80) { print "..."; } @@ -688,13 +688,13 @@ } print "\n"; } - if ($dirtable && defined($tablebordercolor)) { + if ($dirtable && defined($tableBorderColor)) { print "</td></tr></table>"; } print "". ($dirtable == 1) ? "</table>" : "</menu>" . "\n"; if ($filesexists && !$filesfound) { - print "<p><b>note:</b> there are $filesexists files, but none matches the current tag ($input{only_with_tag})\n"; + print "<p><b>NOTE:</b> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n"; } if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) { %tags = %alltags @@ -707,20 +707,20 @@ } if (scalar %tags || $input{only_with_tag}) { - print "<form method=\"get\" action=\"./\">\n"; + print "<form method=\"GET\" action=\"./\">\n"; foreach my $var (@stickyvars) { print "<input type=\"hidden\" name=\"$var\" value=\"$input{$var}\">\n" if (defined($input{$var}) - && (!defined($defaultvalue{$var}) - || $input{$var} ne $defaultvalue{$var}) + && (!defined($DEFAULTVALUE{$var}) + || $input{$var} ne $DEFAULTVALUE{$var}) && $input{$var} ne "" && $var ne "only_with_tag"); } - print "show only files with tag:\n"; + print "Show only files with tag:\n"; print "<select name=\"only_with_tag\""; print " onchange=\"submit()\"" if ($use_java_script); print ">"; - print "<option value=\"\">all tags / default branch\n"; + print "<option value=\"\">All tags / default branch\n"; foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) { print "<option", (defined($input{only_with_tag}) @@ -729,77 +729,77 @@ ">$tag\n"; } print "</select>\n"; - print "<input type=\"submit\" value=\"go\">\n"; + print "<input type=\"submit\" value=\"Go\">\n"; print "</form>\n"; } my $formwhere = $scriptwhere; - $formwhere =~ s|attic/?$|| if ($input{'hideattic'}); + $formwhere =~ s|Attic/?$|| if ($input{'hideattic'}); if ($edit_option_form || defined($input{"options"})) { - print "<form method=\"get\" action=\"${formwhere}\">\n"; + print "<form method=\"GET\" action=\"${formwhere}\">\n"; print "<input type=\"hidden\" name=\"copt\" value=\"1\">\n"; if ($cvstree ne $cvstreedefault) { print "<input type=\"hidden\" name=\"cvsroot\" value=\"$cvstree\">\n"; } print "<center><table cellpadding=\"0\" cellspacing=\"0\">"; - print "<tr bgcolor=\"$columnheadercolordefault\"><th colspan=\"2\">preferences</th></tr>"; - print "<tr><td>sort files by <select name=\"sortby\">"; - print "<option value=\"\">file"; - print "<option", ($bydate ? " selected" : ""), " value=\"date\">age"; + print "<tr bgcolor=\"$columnHeaderColorDefault\"><th colspan=\"2\">Preferences</th></tr>"; + print "<tr><td>Sort files by <select name=\"sortby\">"; + print "<option value=\"\">File"; + print "<option", ($bydate ? " selected" : ""), " value=\"date\">Age"; print "<option", ($byauthor ? " selected" : ""), - " value=\"author\">author" + " value=\"author\">Author" if ($show_author); print "<option", ($byrev ? " selected" : ""), - " value=\"rev\">revision"; + " value=\"rev\">Revision"; print "<option", ($bylog ? " selected" : ""), - " value=\"log\">log message"; + " value=\"log\">Log message"; print "</select></td>"; print "<td>revisions by: \n"; print "<select name=\"logsort\">\n"; - print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">not sorted"; - print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">commit date"; - print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">revision"; + print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">Not sorted"; + print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">Commit date"; + print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">Revision"; print "</select></td></tr>"; - print "<tr><td>diff format: "; - printdiffselect(0); + print "<tr><td>Diff format: "; + printDiffSelect(0); print "</td>"; - print "<td>show attic files: "; + print "<td>Show Attic files: "; print "<input name=\"hideattic\" type=\"checkbox\"", $input{'hideattic'}?" checked":"", "></td></tr>\n"; - print "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"change options\">"; + print "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Change Options\">"; print "</td></tr></table></center></form>\n"; } print &html_footer; - print "</body></html>\n"; + print "</BODY></HTML>\n"; } ############################### -# view files +# View Files ############################### elsif (-f $fullname . ',v') { - if (defined($input{'rev'}) || $docheckout) { - &docheckout($fullname, $input{'rev'}); + if (defined($input{'rev'}) || $doCheckout) { + &doCheckout($fullname, $input{'rev'}); gzipclose(); exit; } if (defined($input{'annotate'}) && $allow_annotate) { - &doannotate($input{'annotate'}); + &doAnnotate($input{'annotate'}); gzipclose(); exit; } if (defined($input{'r1'}) && defined($input{'r2'})) { - &dodiff($fullname, $input{'r1'}, $input{'tr1'}, + &doDiff($fullname, $input{'r1'}, $input{'tr1'}, $input{'r2'}, $input{'tr2'}, $input{'f'}); gzipclose(); exit; } print("going to dolog($fullname)\n") if ($verbose); - &dolog($fullname); + &doLog($fullname); ############################## -# view diff +# View Diff ############################## } elsif ($fullname =~ s/\.diff$// && -f $fullname . ",v" && @@ -810,66 +810,66 @@ # rcsdiff does (-w and -p), so it is disabled # $where =~ s/\.diff$//; - # allow diffs using the ".diff" extension - # so that browsers that default to the url + # Allow diffs using the ".diff" extension + # so that browsers that default to the URL # for a save filename don't save diff's as # e.g. foo.c - &dodiff($fullname, $input{'r1'}, $input{'tr1'}, + &doDiff($fullname, $input{'r1'}, $input{'tr1'}, $input{'r2'}, $input{'tr2'}, $input{'f'}); gzipclose(); exit; } - elsif (($newname = $fullname) =~ s|/([^/]+)$|/attic/$1| && + elsif (($newname = $fullname) =~ s|/([^/]+)$|/Attic/$1| && -f $newname . ",v") { - # the file has been removed and is in the attic. - # send a redirect pointing to the file in the attic. - (my $newplace = $scriptwhere) =~ s|/([^/]+)$|/attic/$1|; - &redirect($newplace . "?" . $env{query_string}); + # The file has been removed and is in the Attic. + # Send a redirect pointing to the file in the Attic. + (my $newplace = $scriptwhere) =~ s|/([^/]+)$|/Attic/$1|; + &redirect($newplace . "?" . $ENV{QUERY_STRING}); exit; } elsif (0 && (my @files = &safeglob($fullname . ",v"))) { http_header("text/plain"); - print "you matched the following files:\n"; + print "You matched the following files:\n"; print join("\n", @files); - # find the tags from each file - # display a form offering diffs between said tags + # Find the tags from each file + # Display a form offering diffs between said tags } else { - my $fh = do {local(*fh);}; + my $fh = do {local(*FH);}; my ($xtra, $module); - # assume it's a module name with a potential path following it. + # Assume it's a module name with a potential path following it. $xtra = $& if (($module = $where) =~ s|/.*||); - # is there an indexed version of modules? - if (open($fh, "$cvsroot/cvsroot/modules")) { + # Is there an indexed version of modules? + if (open($fh, "$cvsroot/CVSROOT/modules")) { while (<$fh>) { - if (/^(\s+)\s+(\s+)/o && $module eq $1 + if (/^(\S+)\s+(\S+)/o && $module eq $1 && -d "${cvsroot}/$2" && $module ne $2) { &redirect($scriptname . '/' . $2 . $xtra); } } } - &fatal("404 not found", "$where: no such file or directory"); + &fatal("404 Not Found", "$where: no such file or directory"); } gzipclose(); -## end main +## End MAIN -sub printdiffselect($) { +sub printDiffSelect($) { my ($use_java_script) = @_; $use_java_script = 0 if (!defined($use_java_script)); my ($f) = $input{'f'}; print "<select name=\"f\""; print " onchange=\"submit()\"" if ($use_java_script); print ">\n"; - print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">colored diff"; - print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">long colored diff"; - print "<option value=\"u\"", $f eq "u" ? " selected" : "", ">unidiff"; - print "<option value=\"c\"", $f eq "c" ? " selected" : "", ">context diff"; - #print "<option value=\"s\"", $f eq "s" ? " selected" : "", ">side by side"; + print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">Colored Diff"; + print "<option value=\"H\"", $f eq "H" ? " selected" : "", ">Long Colored Diff"; + print "<option value=\"u\"", $f eq "u" ? " selected" : "", ">Unidiff"; + print "<option value=\"c\"", $f eq "c" ? " selected" : "", ">Context Diff"; + #print "<option value=\"s\"", $f eq "s" ? " selected" : "", ">Side by Side"; print "</select>"; } -sub findlastmodifiedsubdirs(@) { +sub findLastModifiedSubdirs(@) { my (@dirs) = @_; my ($dirname, @files); @@ -881,7 +881,7 @@ my ($lastmod) = undef; my ($lastmodtime) = undef; - my $dh = do {local(*dh);}; + my $dh = do {local(*DH);}; opendir($dh, $dir) || next; my (@filenames) = readdir($dh); @@ -892,7 +892,7 @@ my ($file) = "$fullname/$filename"; next if ($filename !~ /,v$/ || !-f $file); $filename =~ s/,v$//; - my $modtime = -m $file; + my $modtime = -M $file; if (!defined($lastmod) || $modtime < $lastmodtime) { $lastmod = $filename; $lastmodtime = $modtime; @@ -906,27 +906,27 @@ sub htmlify($) { my($string) = @_; - # special characters; rfc 1866 + # Special Characters; RFC 1866 $string =~ s/&/&/g; $string =~ s/\"/"/g; $string =~ s/</</g; $string =~ s/>/>/g; - # get url's as link .. - $string =~ s§(http|ftp|https)(://[-a-za-z0-9%.~:_/]+)([?&]([-a-za-z0-9%.~:_]+)=([-a-za-z0-9%.~:_])+)*§<a href="$1$2$3">$1$2$3</a>§; + # get URL's as link .. + $string =~ s§(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*§<a href="$1$2$3">$1$2$3</a>§; # get e-mails as link - $string =~ s§([-a-za-z0-9_.]+@([-a-za-z0-9]+\.)+[a-za-z]{2,4})§<a href="mailto:$1">$1</a>§; + $string =~ s§([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})§<a href="mailto:$1">$1</a>§; return $string; } -sub spacedhtmltext($) { +sub spacedHtmlText($) { my($string) = @_; - # cut trailing spaces + # Cut trailing spaces s/\s+$//; - # expand tabs + # Expand tabs $string =~ s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e if (defined($tabstop)); @@ -977,30 +977,30 @@ sub fatal($$) { my($errcode, $errmsg) = @_; - if (defined($env{'mod_perl'})) { - apache->request->status((split(/ /, $errcode))[0]); + if (defined($ENV{'MOD_PERL'})) { + Apache->request->status((split(/ /, $errcode))[0]); } else { - print "status: $errcode\n"; + print "Status: $errcode\n"; } - html_header("error"); - print "error: $errmsg\n"; + html_header("Error"); + print "Error: $errmsg\n"; print &html_footer; exit(1); } sub redirect($) { my($url) = @_; - if (defined($env{'mod_perl'})) { - apache->request->status(301); - apache->request->header_out(location => $url); + if (defined($ENV{'MOD_PERL'})) { + Apache->request->status(301); + Apache->request->header_out(Location => $url); } else { - print "status: 301 moved\r\n"; - print "location: $url\r\n"; + print "Status: 301 Moved\r\n"; + print "Location: $url\r\n"; } - html_header("moved"); - print "this document is located <a href=\"$url\">here</a>.\n"; + html_header("Moved"); + print "This document is located <a href=\"$url\">here</a>.\n"; print &html_footer; exit(1); } @@ -1009,7 +1009,7 @@ my ($filename) = @_; my ($dirname); my (@results); - my $dh = do {local(*dh);}; + my $dh = do {local(*DH);}; ($dirname = $filename) =~ s|/[^/]+$||; $filename =~ s|.*/||; @@ -1017,7 +1017,7 @@ if (opendir($dh, $dirname)) { my $glob = $filename; my $t; - # transform filename from glob to regex. deal with: + # transform filename from glob to regex. Deal with: # [, {, ?, * as glob chars # make sure to escape all other regex chars $glob =~ s/([\.\(\)\|\+])/\\$1/g; @@ -1035,21 +1035,21 @@ @results; } -sub getmimetypefromsuffix($) { +sub getMimeTypeFromSuffix($) { my ($fullname) = @_; my ($mimetype, $suffix); - my $fh = do {local(*fh);}; + my $fh = do {local(*FH);}; ($suffix = $fullname) =~ s/^.*\.([^.]*)$/$1/; - $mimetype = $mtypes{$suffix}; - $mimetype = $mtypes{'*'} if (!$mimetype); + $mimetype = $MTYPES{$suffix}; + $mimetype = $MTYPES{'*'} if (!$mimetype); if (!$mimetype && -f $mime_types) { # okey, this is something special - search the # mime.types database open ($fh, "<$mime_types"); while (<$fh>) { - if ($_ =~ /^\s*(\s+\/\s+).*\b$suffix\b/) { + if ($_ =~ /^\s*(\S+\/\S+).*\b$suffix\b/) { $mimetype = $1; last; } @@ -1058,114 +1058,114 @@ } # okey, didn't find anything useful .. - if (!($mimetype =~ /\s\/\s/)) { + if (!($mimetype =~ /\S\/\S/)) { $mimetype = "text/plain"; } return $mimetype; } ############################### -# show annotation +# show Annotation ############################### -sub doannotate ($$) { +sub doAnnotate ($$) { my ($rev) = @_; my ($pid); my ($pathname, $filename); - my $reader = do {local(*fh);}; - my $writer = do {local(*fh);}; + my $reader = do {local(*FH);}; + my $writer = do {local(*FH);}; # make sure the revisions are wellformed, for security # reasons .. if (!($rev =~ /^[\d\.]+$/)) { - &fatal("404 not found", - "malformed query \"$env{'query_string'}\""); + &fatal("404 Not Found", + "Malformed query \"$ENV{'QUERY_STRING'}\""); } if (&forbidden_file($fullname)) { - &fatal("403 forbidden", "access forbidden. this file is mentioned in \@disallowread"); + &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead"); return; } - ($pathname = $where) =~ s/(attic\/)?[^\/]*$//; + ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; ($filename = $where) =~ s/^.*\///; http_header(); - navigateheader ($scriptwhere, $pathname, $filename, $rev, "annotate"); - print "<h3 align=\"center\">annotation of $pathname$filename, revision $rev</h3>\n"; + navigateHeader ($scriptwhere, $pathname, $filename, $rev, "annotate"); + print "<h3 align=\"center\">Annotation of $pathname$filename, Revision $rev</h3>\n"; # this seems to be necessary - $| = 1; $| = 0; # flush + $| = 1; $| = 0; # Flush # this annotate version is based on the - # cvs annotate-demo perl script by cyclic software - # it was written by cyclic software, http://www.cyclic.com/, and is in + # cvs annotate-demo Perl script by Cyclic Software + # It was written by Cyclic Software, http://www.cyclic.com/, and is in # the public domain. # we could abandon the use of rlog, rcsdiff and co using # the cvsserver in a similiar way one day (..after rewrite) - $pid = open2($reader, $writer, "cvs server") || fatal ("500 internal error", - "fatal error - unable to open cvs for annotation"); + $pid = open2($reader, $writer, "cvs server") || fatal ("500 Internal Error", + "Fatal Error - unable to open cvs for annotation"); - # ok, first send the request to the server. a simplified example is: - # root /home/kingdon/zwork/cvsroot - # argument foo/xx - # directory foo + # OK, first send the request to the server. A simplified example is: + # Root /home/kingdon/zwork/cvsroot + # Argument foo/xx + # Directory foo # /home/kingdon/zwork/cvsroot/foo - # directory . + # Directory . # /home/kingdon/zwork/cvsroot # annotate # although as you can see there are a few more details. - print $writer "root $cvsroot\n"; - print $writer "valid-responses ok error valid-requests checked-in updated merged removed m e\n"; - # don't worry about sending valid-requests, the server just needs to + print $writer "Root $cvsroot\n"; + print $writer "Valid-responses ok error Valid-requests Checked-in Updated Merged Removed M E\n"; + # Don't worry about sending valid-requests, the server just needs to # support "annotate" and if it doesn't, there isn't anything to be done. - print $writer "useunchanged\n"; - print $writer "argument -r\n"; - print $writer "argument $rev\n"; - print $writer "argument $where\n"; + print $writer "UseUnchanged\n"; + print $writer "Argument -r\n"; + print $writer "Argument $rev\n"; + print $writer "Argument $where\n"; - # the protocol requires us to fully fake a working directory (at + # The protocol requires us to fully fake a working directory (at # least to the point of including the directories down to the one # containing the file in question). - # so if $where is "dir/sdir/file", then @dirs will be + # So if $where is "dir/sdir/file", then @dirs will be # ("dir", "sdir", "file") my @dirs = split('/', $where); my $path = ""; foreach (@dirs) { if ($path eq "") { - # in our example, $_ is "dir". + # In our example, $_ is "dir". $path = $_; } else { - print $writer "directory $path\n"; + print $writer "Directory $path\n"; print $writer "$cvsroot/$path\n"; - # in our example, $_ is "sdir" and $path becomes "dir/sdir" - # and the next time, "file" and "dir/sdir/file" (which then gets - # ignored, because we don't need to send directory for the file). + # In our example, $_ is "sdir" and $path becomes "dir/sdir" + # And the next time, "file" and "dir/sdir/file" (which then gets + # ignored, because we don't need to send Directory for the file). $path .= "/$_"; } } - # and the last "directory" before "annotate" is the top level. - print $writer "directory .\n"; + # And the last "Directory" before "annotate" is the top level. + print $writer "Directory .\n"; print $writer "$cvsroot\n"; print $writer "annotate\n"; - # ok, we've sent our command to the server. thing to do is to - # close the writer side and get all the responses. if "cvs server" - # were nicer about buffering, then we could just leave it open, i think. + # OK, we've sent our command to the server. Thing to do is to + # close the writer side and get all the responses. If "cvs server" + # were nicer about buffering, then we could just leave it open, I think. close ($writer) || die "cannot close: $!"; - # ready to get the responses from the server. - # for example: - # e annotations for foo/xx - # e *************** - # m 1.3 (kingdon 06-sep-97): hello + # Ready to get the responses from the server. + # For example: + # E Annotations for foo/xx + # E *************** + # M 1.3 (kingdon 06-Sep-97): hello # ok - my ($linenr) = 0; - my ($oldlrev, $oldlusr) = ("", ""); + my ($lineNr) = 0; + my ($oldLrev, $oldLusr) = ("", ""); my ($revprint, $usrprint); - if ($anntable) { + if ($annTable) { print "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; } else { @@ -1173,49 +1173,49 @@ } while (<$reader>) { my @words = split; - # adding one is for the (single) space which follows $words[0]. + # Adding one is for the (single) space which follows $words[0]. my $rest = substr ($_, length ($words[0]) + 1); - if ($words[0] eq "e") { + if ($words[0] eq "E") { next; } - elsif ($words[0] eq "m") { - $linenr++; + elsif ($words[0] eq "M") { + $lineNr++; my $lrev = substr ($_, 2, 13); my $lusr = substr ($_, 16, 9); my $line = substr ($_, 36); # we should parse the date here .. - if ($lrev eq $oldlrev) { + if ($lrev eq $oldLrev) { $revprint = " "; } else { - $revprint = $lrev; $oldlusr = ""; + $revprint = $lrev; $oldLusr = ""; } - if ($lusr eq $oldlusr) { + if ($lusr eq $oldLusr) { $usrprint = " "; } else { $usrprint = $lusr; } - $oldlrev = $lrev; - $oldlusr = $lusr; + $oldLrev = $lrev; + $oldLusr = $lusr; # is there a less timeconsuming way to strip spaces ? ($lrev = $lrev) =~ s/\s+//g; - my $iscurrentrev = ("$rev" eq "$lrev"); + my $isCurrentRev = ("$rev" eq "$lrev"); - print "<b>" if ($iscurrentrev); - printf ("%8s%s%8s %4d:", $revprint, ($iscurrentrev ? "|" : " "), $usrprint, $linenr); - print spacedhtmltext($line); - print "</b>" if ($iscurrentrev); + print "<b>" if ($isCurrentRev); + printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr); + print spacedHtmlText($line); + print "</b>" if ($isCurrentRev); } elsif ($words[0] eq "ok") { - # we could complain about any text received after this, like the - # cvs command line client. but for simplicity, we don't. + # We could complain about any text received after this, like the + # CVS command line client. But for simplicity, we don't. } elsif ($words[0] eq "error") { - fatal ("500 internal error", "error occured during annotate: <b>$_</b>"); + fatal ("500 Internal Error", "Error occured during annotate: <b>$_</b>"); } } - if ($anntable) { + if ($annTable) { print "</table>"; } else { @@ -1226,49 +1226,49 @@ } ############################### -# make checkout +# make Checkout ############################### -sub docheckout($$) { +sub doCheckout($$) { my ($fullname, $rev) = @_; my ($mimetype, $revopt); - my $fh = do {local(*fh);}; + my $fh = do {local(*FH);}; - if ($rev eq 'head' || $rev eq '.') { + if ($rev eq 'HEAD' || $rev eq '.') { $rev = undef; } # make sure the revisions a wellformed, for security # reasons .. if (defined($rev) && !($rev =~ /^[\d\.]+$/)) { - &fatal("404 not found", - "malformed query \"$env{'query_string'}\""); + &fatal("404 Not Found", + "Malformed query \"$ENV{'QUERY_STRING'}\""); } if (&forbidden_file($fullname)) { - &fatal("403 forbidden", "access forbidden. this file is mentioned in \@disallowread"); + &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead"); return; } # get mimetype - if (defined($input{"content-type"}) && ($input{"content-type"} =~ /\s\/\s/)) { + if (defined($input{"content-type"}) && ($input{"content-type"} =~ /\S\/\S/)) { $mimetype = $input{"content-type"} } else { - $mimetype = &getmimetypefromsuffix($fullname); + $mimetype = &getMimeTypeFromSuffix($fullname); } if (defined($rev)) { $revopt = "-r$rev"; if ($use_moddate) { - readlog($fullname, $rev); + readLog($fullname, $rev); $moddate=$date{$rev}; } } else { - $revopt = "-rhead"; + $revopt = "-rHEAD"; if ($use_moddate) { - readlog($fullname); - $moddate=$date{$symrev{head}}; + readLog($fullname); + $moddate=$date{$symrev{HEAD}}; } } @@ -1277,43 +1277,43 @@ ### directories/files having spaces in it; ### this is an issue that should be resolved on cvs's side # - # safely for a child process to read from. + # Safely for a child process to read from. if (! open($fh, "-|")) { # child my $nohist = ($logactions ? "" : "l"); - open(stderr, ">&stdout"); # redirect stderr to stdout + open(STDERR, ">&STDOUT"); # Redirect stderr to stdout exec("cvs", "-d$nohist", "$cvsroot", "co", "-p", "$revopt", "$where"); } #=================================================================== -#checking out squid/src/ftp.c -#rcs: /usr/src/cvs/squid/src/ftp.c,v -#vers: 1.1.1.28.6.2 +#Checking out squid/src/ftp.c +#RCS: /usr/src/CVS/squid/src/ftp.c,v +#VERS: 1.1.1.28.6.2 #*************** - # parse cvs header + # Parse CVS header my ($revision, $filename, $cvsheader); $filename = ""; while(<$fh>) { last if (/^\*\*\*\*/); - $revision = $1 if (/^vers: (.*)$/); - if (/^checking out (.*)$/) { + $revision = $1 if (/^VERS: (.*)$/); + if (/^Checking out (.*)$/) { $filename = $1; $filename =~ s/^\.\/*//; } $cvsheader .= $_; } if ($filename ne $where) { - &fatal("500 internal error", - "unexpected output from cvs co: $cvsheader" - . "<p><b>check whether the directory $cvsroot/cvsroot exists " - . "and the script has write-access to the cvsroot/history " + &fatal("500 Internal Error", + "Unexpected output from cvs co: $cvsheader" + . "<p><b>Check whether the directory $cvsroot/CVSROOT exists " + . "and the script has write-access to the CVSROOT/history " . "file if it exists." - . "<br>the script needs to place lock files in the " + . "<br>The script needs to place lock files in the " . "directory the file is in as well.</b>"); } $| = 1; if ($mimetype eq "text/x-versionary-markup") { - &versionarymarkup($fh, $fullname, $revision); + &versionaryMarkup($fh, $fullname, $revision); } else { http_header($mimetype); @@ -1322,35 +1322,35 @@ close($fh); } -sub versionarymarkup($$$) { +sub versionaryMarkup($$$) { my ($filehandle, $fullname, $revision) = @_; my ($pathname, $filename); - ($pathname = $where) =~ s/(attic\/)?[^\/]*$//; + ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; ($filename = $where) =~ s/^.*\///; my ($fileurl) = urlencode($filename); http_header(); - navigateheader ($scriptwhere, $pathname, $filename, $revision, "view"); + navigateHeader ($scriptwhere, $pathname, $filename, $revision, "view"); print "<hr noshade>"; - print "<table width=\"100%\"><tr><td bgcolor=\"$markuplogcolor\">"; - print "file: ", &clickablepath($where, 1); + print "<table width=\"100%\"><tr><td bgcolor=\"$markupLogColor\">"; + print "File: ", &clickablePath($where, 1); print " "; &download_link(urlencode($fileurl), $revision, "(download)"); - if (!$defaulttextplain) { + if (!$defaultTextPlain) { print " "; &download_link(urlencode($fileurl), $revision, "(as text)", "text/plain"); } print "<br>\n"; if ($show_log_in_markup) { - readlog($fullname); #,$revision); - printlog($revision, 0); + readLog($fullname); #,$revision); + printLog($revision, 0); } else { - print "version: <b>$revision</b><br>\n"; - print "tag: <b>", $input{only_with_tag}, "</b><br>\n" if + print "Version: <b>$revision</b><br>\n"; + print "Tag: <b>", $input{only_with_tag}, "</b><br>\n" if $input{only_with_tag}; } print "</td></tr></table>"; @@ -1366,7 +1366,7 @@ else { print "<pre>"; foreach (@content) { - print spacedhtmltext($_); + print spacedHtmlText($_); } print "</pre>"; } @@ -1382,15 +1382,15 @@ } ############################### -# show colored diff +# Show Colored Diff ############################### -sub dodiff($$$$$$) { +sub doDiff($$$$$$) { my($fullname, $r1, $tr1, $r2, $tr2, $f) = @_; - my $fh = do {local(*fh);}; + my $f... [truncated message content] |
|
From: Ken C. <co...@us...> - 2001-12-21 15:01:20
|
coar 01/12/21 07:01:18 Modified: . versionary.cgi Log: More HTML cleanups.. Revision Changes Path 1.7 +616 -616 versionary/versionary.cgi Index: versionary.cgi =================================================================== RCS file: /cvsroot/versionary/versionary/versionary.cgi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- versionary.cgi 2001/12/20 23:01:35 1.6 +++ versionary.cgi 2001/12/21 15:01:17 1.7 @@ -1,49 +1,49 @@ #! /usr/bin/perl -ws # -# Versionary - a CGI interface to CVS trees. +# versionary - a cgi interface to cvs trees. # -# Based on the cvsweb tool originally by Bill Fenner and then -# modified by others (principally Henner Zeller) as shown below. +# based on the cvsweb tool originally by bill fenner and then +# modified by others (principally henner zeller) as shown below. # -# Written in their spare time by -# Bill Fenner <fe...@Fr...> (original work) -# extended by Henner Zeller <ze...@th...>, -# Henrik Nordström <hn...@he...> -# Ken Coar <co...@Ap...> -# Dick Balaska <di...@bu...> -# Jens-Uwe Mager <ju...@he...> +# written in their spare time by +# bill fenner <fe...@fr...> (original work) +# extended by henner zeller <ze...@th...>, +# henrik nordström <hn...@he...> +# ken coar <co...@ap...> +# dick balaska <di...@bu...> +# jens-uwe mager <ju...@he...> # -# Based on: -# * Bill Fenners cvsweb.cgi revision 1.28 available from: -# http://www.FreeBSD.org/cgi/cvsweb.cgi/www/en/cgi/cvsweb.cgi +# based on: +# * bill fenners cvsweb.cgi revision 1.28 available from: +# http://www.freebsd.org/cgi/cvsweb.cgi/www/en/cgi/cvsweb.cgi # -# Copyright (c) 1996-1998 Bill Fenner -# (c) 1998-1999 Henner Zeller -# (c) 1999 Henrik Nordström -# All rights reserved. +# copyright (c) 1996-1998 bill fenner +# (c) 1998-1999 henner zeller +# (c) 1999 henrik nordström +# all rights reserved. # -# Redistribution and use in source and binary forms, with or without +# redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: -# 1. Redistributions of source code must retain the above copyright +# 1. redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright +# 2. redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. +# this software is provided by the author and contributors ``as is'' and +# any express or implied warranties, including, but not limited to, the +# implied warranties of merchantability and fitness for a particular purpose +# are disclaimed. in no event shall the author or contributors be liable +# for any direct, indirect, incidental, special, exemplary, or consequential +# damages (including, but not limited to, procurement of substitute goods +# or services; loss of use, data, or profits; or business interruption) +# however caused and on any theory of liability, whether in contract, strict +# liability, or tort (including negligence or otherwise) arising in any way +# out of the use of this software, even if advised of the possibility of +# such damage. # -# $Id: versionary.cgi,v 1.6 2001/12/20 23:01:35 coar Exp $ +# $id: versionary.cgi,v 1.6 2001/12/20 23:01:35 coar exp $ # ### require 5.000; @@ -52,64 +52,64 @@ use vars qw ( $config $allow_version_select $verbose - %CVSROOT %CVSROOTdescr %MIRRORS %DEFAULTVALUE %ICONS %MTYPES + %cvsroot %cvsrootdescr %mirrors %defaultvalue %icons %mtypes %alltags @tabcolors %fileinfo %tags @branchnames %nameprinted %symrev %revsym @allrevisions %date %author @revdisplayorder @revisions %state %difflines %log %branchpoint @revorder - $checkoutMagic $doCheckout $scriptname $scriptwhere - $where $Browser $nofilelinks $maycompress @stickyvars + $checkoutmagic $docheckout $scriptname $scriptwhere + $where $browser $nofilelinks $maycompress @stickyvars %input $query $barequery $sortby $bydate $byrev $byauthor $bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot - $mimetype $defaultTextPlain $defaultViewable $allow_compress - $GZIPBIN $backicon $diricon $fileicon $fullname $newname + $mimetype $defaulttextplain $defaultviewable $allow_compress + $gzipbin $backicon $diricon $fileicon $fullname $newname $cvstreedefault $body_tag $logo $defaulttitle $address - $backcolor $long_intro $short_instruction $shortLogLen - $show_author $dirtable $tablepadding $columnHeaderColorDefault - $columnHeaderColorSorted $hr_breakable $hr_funout $hr_ignwhite - $hr_ignkeysubst $diffcolorHeading $diffcolorEmpty $diffcolorRemove - $diffcolorChange $diffcolorAdd $diffcolorDarkChange $difffontface - $difffontsize $inputTextSize $mime_types $allow_annotate + $backcolor $long_intro $short_instruction $shortloglen + $show_author $dirtable $tablepadding $columnheadercolordefault + $columnheadercolorsorted $hr_breakable $hr_funout $hr_ignwhite + $hr_ignkeysubst $diffcolorheading $diffcolorempty $diffcolorremove + $diffcolorchange $diffcoloradd $diffcolordarkchange $difffontface + $difffontsize $inputtextsize $mime_types $allow_annotate $allow_markup $use_java_script $open_extern_window $extern_window_width $extern_window_height $edit_option_form $checkout_magic $show_subdir_lastmod $show_log_in_markup $v - $navigationHeaderColor $tableBorderColor $markupLogColor - $tabstop $state $annTable $sel $curbranch @HideModules @DisallowRead + $navigationheadercolor $tablebordercolor $markuplogcolor + $tabstop $state $anntable $sel $curbranch @hidemodules @disallowread $module $use_descriptions %descriptions @mytz $dwhere $moddate $use_moddate $has_zlib $gzip_open ); ##### prototype declarations ######## -sub printDiffSelect($); -sub findLastModifiedSubdirs(@); +sub printdiffselect($); +sub findlastmodifiedsubdirs(@); sub htmlify($); -sub spacedHtmlText($); +sub spacedhtmltext($); sub link($$); sub revcmp($$); sub fatal($$); sub redirect($); sub safeglob($); -sub getMimeTypeFromSuffix($); -sub doAnnotate ($$); -sub doCheckout($$); -sub versionaryMarkup($$$); +sub getmimetypefromsuffix($); +sub doannotate ($$); +sub docheckout($$); +sub versionarymarkup($$$); sub viewable($); -sub doDiff($$$$$$); -sub getDirLogs($$@); -sub readLog($;$); -sub printLog($;$); -sub doLog($); +sub dodiff($$$$$$); +sub getdirlogs($$@); +sub readlog($;$); +sub printlog($;$); +sub dolog($); sub flush_diff_rows ($$$$); sub human_readable_diff($); -sub navigateHeader ($$$$$); +sub navigateheader ($$$$$); sub plural_write ($$); -sub readableTime ($$); -sub clickablePath($$); -sub chooseCVSRoot(); -sub chooseMirror(); -sub fileSortCmp(); +sub readabletime ($$); +sub clickablepath($$); +sub choosecvsroot(); +sub choosemirror(); +sub filesortcmp(); sub download_url($$$); sub download_link($$$$); -sub toggleQuery($$); +sub togglequery($$); sub urlencode($); sub http_header(;$); sub html_header($); @@ -117,61 +117,61 @@ sub link_tags($); sub forbidden_module($); sub forbidden_file($); -sub checkForbidden($@); +sub checkforbidden($@); sub gzipclose(); -sub MAGIC1(); -sub MAGIC2(); -sub OSCODE(); - -##### Start of Configuration Area ######## -# == EDIT this == -# User configuration is stored in -$config = $ENV{'VERSIONARY_CONF'} +sub magic1(); +sub magic2(); +sub oscode(); + +##### start of configuration area ######## +# == edit this == +# user configuration is stored in +$config = $env{'versionary_conf'} || '/usr/local/web/apache/conf/versionary.conf'; -# == Configuration defaults == -# Defaults for configuration variables that shouldn't need +# == configuration defaults == +# defaults for configuration variables that shouldn't need # to be configured.. $allow_version_select = 1; -##### End of Configuration Area ######## +##### end of configuration area ######## -######## Configuration variables ######### -# These are defined to allow checking with perl -cw -%CVSROOT = %MIRRORS = %DEFAULTVALUE = %ICONS = %MTYPES = +######## configuration variables ######### +# these are defined to allow checking with perl -cw +%cvsroot = %mirrors = %defaultvalue = %icons = %mtypes = %tags = %alltags = @tabcolors = %fileinfo = (); $cvstreedefault = $body_tag = $logo = $defaulttitle = $address = -$backcolor = $long_intro = $short_instruction = $shortLogLen = -$show_author = $dirtable = $tablepadding = $columnHeaderColorDefault = -$columnHeaderColorSorted = $hr_breakable = $hr_funout = $hr_ignwhite = -$hr_ignkeysubst = $diffcolorHeading = $diffcolorEmpty = $diffcolorRemove = -$diffcolorChange = $diffcolorAdd = $diffcolorDarkChange = $difffontface = -$difffontsize = $inputTextSize = $mime_types = $allow_annotate = +$backcolor = $long_intro = $short_instruction = $shortloglen = +$show_author = $dirtable = $tablepadding = $columnheadercolordefault = +$columnheadercolorsorted = $hr_breakable = $hr_funout = $hr_ignwhite = +$hr_ignkeysubst = $diffcolorheading = $diffcolorempty = $diffcolorremove = +$diffcolorchange = $diffcoloradd = $diffcolordarkchange = $difffontface = +$difffontsize = $inputtextsize = $mime_types = $allow_annotate = $allow_markup = $use_java_script = $open_extern_window = $extern_window_width = $extern_window_height = $edit_option_form = $checkout_magic = $show_subdir_lastmod = $show_log_in_markup = $v = -$navigationHeaderColor = $tableBorderColor = $markupLogColor = +$navigationheadercolor = $tablebordercolor = $markuplogcolor = $tabstop = $use_moddate = $moddate = $gzip_open = undef; -##### End of configuration variables ##### +##### end of configuration variables ##### -use Time::Local; -use IPC::Open2; +use time::local; +use ipc::open2; -# Check if the zlib C library interface is installed, and if yes +# check if the zlib c library interface is installed, and if yes # we can avoid using the extra gzip process. eval { - require Compress::Zlib; + require compress::zlib; }; $has_zlib = !$@; $verbose = $v; -$checkoutMagic = "~checkout~"; -$where = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; -$doCheckout = ($where =~ /^\/$checkoutMagic/); -$where =~ s|^/($checkoutMagic)?||; +$checkoutmagic = "~checkout~"; +$where = defined($env{'path_info'}) ? $env{'path_info'} : ""; +$docheckout = ($where =~ /^\/$checkoutmagic/); +$where =~ s|^/($checkoutmagic)?||; $where =~ s|/+$||; -($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|; +($scriptname = $env{'script_name'}) =~ s|^/?|/|; $scriptname =~ s|/+$||; if ($where) { $scriptwhere = $scriptname . '/' . urlencode($where); @@ -184,23 +184,23 @@ # in lynx, it it very annoying to have two links # per file, so disable the link at the icon # in this case: -$Browser = $ENV{'HTTP_USER_AGENT'}; -$nofilelinks = ($Browser =~ m'^Lynx/'); +$browser = $env{'http_user_agent'}; +$nofilelinks = ($browser =~ m'^lynx/'); # newer browsers accept gzip content encoding # and state this in a header # (netscape did always but didn't state it) -# It has been reported that these -# braindamaged MS-Internet Exploders claim that they +# it has been reported that these +# braindamaged ms-internet exploders claim that they # accept gzip .. but don't in fact and # display garbage then :-/ -# Turn off gzip if running under mod_perl and no zlib is available, +# turn off gzip if running under mod_perl and no zlib is available, # piping does not work as expected inside the server. -$maycompress = (((defined($ENV{'HTTP_ACCEPT_ENCODING'}) - && $ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip|) - || $Browser =~ m%^Mozilla/3%) - && ($Browser !~ m/MSIE/) - && !(defined($ENV{'MOD_PERL'}) && !$has_zlib)); +$maycompress = (((defined($env{'http_accept_encoding'}) + && $env{'http_accept_encoding'} =~ m|gzip|) + || $browser =~ m%^mozilla/3%) + && ($browser !~ m/msie/) + && !(defined($env{'mod_perl'}) && !$has_zlib)); # put here the variables we need in order # to hold our state - they will be added (with @@ -212,19 +212,19 @@ do "$config"; } else { - &fatal("500 Internal Error", - 'Configuration not found. Set the variable <code>$config</code> ' + &fatal("500 internal error", + 'configuration not found. set the variable <code>$config</code> ' . 'in versionary.cgi, or the environment variable ' - . '<code>VERSIONARY_CONF</code>, to your <b>versionary.conf</b> ' + . '<code>versionary_conf</code>, to your <b>versionary.conf</b> ' . 'configuration file first.'); } undef %input; -if ($query = $ENV{'QUERY_STRING'}) { +if ($query = $env{'query_string'}) { foreach (split(/&/, $query)) { y/+/ /; s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted - if (/(\S+)=(.*)/) { + if (/(\s+)=(.*)/) { $input{$1} = $2 if ($2 ne ""); } else { @@ -233,27 +233,27 @@ } } -# For backwards compability, set only_with_tag to only_on_branch if set. +# for backwards compability, set only_with_tag to only_on_branch if set. $input{only_with_tag} = $input{only_on_branch} if (defined($input{only_on_branch})); -foreach (keys %DEFAULTVALUE) { +foreach (keys %defaultvalue) { # replace not given parameters with the default parameters if (!defined($input{$_}) || $input{$_} eq "") { - # Empty Checkboxes in forms return -- nothing. So we define a helper + # empty checkboxes in forms return -- nothing. so we define a helper # variable in these forms (copt) which indicates that we just set # parameters with a checkbox if (!defined($input{"copt"})) { # 'copt' isn't defined --> empty input is not the result # of empty input checkbox --> set default - $input{$_} = $DEFAULTVALUE{$_} if (defined($DEFAULTVALUE{$_})); + $input{$_} = $defaultvalue{$_} if (defined($defaultvalue{$_})); } else { # 'copt' is defined -> the result of empty input checkbox # -> set to zero (disable) if default is a boolean (0|1). $input{$_} = 0 - if (defined($DEFAULTVALUE{$_}) - && ($DEFAULTVALUE{$_} eq "0" || $DEFAULTVALUE{$_} eq "1")); + if (defined($defaultvalue{$_}) + && ($defaultvalue{$_} eq "0" || $defaultvalue{$_} eq "1")); } } } @@ -262,7 +262,7 @@ foreach (@stickyvars) { # construct a query string with the sticky non default parameters set if (defined($input{$_}) && ($input{$_} ne "") - && (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) { + && (!defined($defaultvalue{$_}) || $input{$_} ne $defaultvalue{$_})) { if ($barequery) { $barequery = $barequery . "&"; } @@ -307,28 +307,28 @@ $logsort = $input{"logsort"}; -## Default CVS-Tree -if (!defined($CVSROOT{$cvstreedefault})) { - &fatal("500 Internal Error", +## default cvs-tree +if (!defined($cvsroot{$cvstreedefault})) { + &fatal("500 internal error", "<code>\$cvstreedefault</code> points to a repository " - . "($cvstreedefault) not defined in <code>%CVSROOT</code> " + . "($cvstreedefault) not defined in <code>%cvsroot</code> " . "(edit your configuration file $config)"); } $cvstree = $cvstreedefault; -$cvsroot = $CVSROOT{"$cvstree"}; +$cvsroot = $cvsroot{"$cvstree"}; -# alternate CVS-Tree, configured in versionary.conf +# alternate cvs-tree, configured in versionary.conf if ($input{'cvsroot'}) { - if ($CVSROOT{$input{'cvsroot'}}) { + if ($cvsroot{$input{'cvsroot'}}) { $cvstree = $input{'cvsroot'}; - $cvsroot = $CVSROOT{"$cvstree"}; + $cvsroot = $cvsroot{"$cvstree"}; } } # create icons out of description -foreach my $k (keys %ICONS) { +foreach my $k (keys %icons) { no strict 'refs'; - my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}}; + my ($itxt, $ipath, $iwidth, $iheight) = @{$icons{$k}}; if ($ipath) { ${"${k}icon"} = "<img src=\"$ipath\" alt=\"$itxt\" " . "border=\"0\" width=\"$iwidth\" height=\"$iheight\">"; @@ -338,23 +338,23 @@ } } -# Do some special configuration for cvstrees +# do some special configuration for cvstrees do "$config-$cvstree" if (-f "$config-$cvstree"); $fullname = $cvsroot . '/' . $where; -$mimetype = &getMimeTypeFromSuffix ($fullname); -$defaultTextPlain = ($mimetype eq "text/plain"); -$defaultViewable = $allow_markup && viewable($mimetype); - -# search for GZIP if compression allowed -# We've to find out if the GZIP-binary exists .. otherwise -# ge get an Internal Server Error if we try to pipe the +$mimetype = &getmimetypefromsuffix ($fullname); +$defaulttextplain = ($mimetype eq "text/plain"); +$defaultviewable = $allow_markup && viewable($mimetype); + +# search for gzip if compression allowed +# we've to find out if the gzip-binary exists .. otherwise +# ge get an internal server error if we try to pipe the # output through the nonexistent gzip .. # any more elegant ways to prevent this are welcome! if ($allow_compress && $maycompress && !$has_zlib) { - foreach (split(/:/, $ENV{PATH})) { + foreach (split(/:/, $env{path})) { if (-x "$_/gzip") { - $GZIPBIN = "$_/gzip"; + $gzipbin = "$_/gzip"; last; } } @@ -363,9 +363,9 @@ if (-d $fullname) { # # ensure, that directories always end with (exactly) one '/' - # to allow relative URL's. If they're not, make a redirect. + # to allow relative url's. if they're not, make a redirect. ## - my $pathinfo = defined($ENV{'PATH_INFO'}) ? $ENV{'PATH_INFO'} : ""; + my $pathinfo = defined($env{'path_info'}) ? $env{'path_info'} : ""; if (!($pathinfo =~ m|/$|) || ($pathinfo =~ m |/{2,}$|)) { redirect ($scriptwhere . '/' . $query); } @@ -376,31 +376,31 @@ } if (!-d $cvsroot) { - &fatal("500 Internal Error", - "<p>\n" . '$CVSROOT not found!' . "\n</p>\n" - . "<p>\nThe server on which the CVS tree lives is probably down. " - . "Please try again in a few minutes.\n</p>\n"); + &fatal("500 internal error", + "<p>\n" . '$cvsroot not found!' . "\n</p>\n" + . "<p>\nthe server on which the cvs tree lives is probably down. " + . "please try again in a few minutes.\n</p>\n"); } # -# See if the module is in our forbidden list. +# see if the module is in our forbidden list. # $where =~ m:([^/]*):; $module = $1; if ($module && &forbidden_module($module)) { - &fatal("403 Forbidden", "Access to $where forbidden."); + &fatal("403 forbidden", "access to $where forbidden."); } ############################## -# View a directory +# view a directory ############################### elsif (-d $fullname) { - my $dh = do {local(*DH);}; - opendir($dh, $fullname) || &fatal("404 Not Found", "$where: $!"); + my $dh = do {local(*dh);}; + opendir($dh, $fullname) || &fatal("404 not found", "$where: $!"); my @dir = readdir($dh); closedir($dh); - my @subLevelFiles = findLastModifiedSubdirs(@dir) + my @sublevelfiles = findlastmodifiedsubdirs(@dir) if ($show_subdir_lastmod); - getDirLogs($cvsroot, $where, @subLevelFiles); + getdirlogs($cvsroot, $where, @sublevelfiles); if ($where eq '/') { html_header("$defaulttitle"); @@ -412,10 +412,10 @@ } my $descriptions; - if (($use_descriptions) && open (DESC, "<$cvsroot/CVSROOT/descriptions")) { - while (<DESC>) { + if (($use_descriptions) && open (desc, "<$cvsroot/cvsroot/descriptions")) { + while (<desc>) { chomp; - my ($dir, $description) = /(\S+)\s+(.*)/; + my ($dir, $description) = /(\s+)\s+(.*)/; $descriptions{$dir} = $description; } } @@ -423,40 +423,40 @@ print "<p>\n<a name=\"dirlist\"></a>\n"; # give direct access to dirs if ($where eq '/') { - chooseMirror(); - chooseCVSRoot(); + choosemirror(); + choosecvsroot(); } else { - print "<p>\nCurrent directory: <b>", &clickablePath($where, 0), + print "<p>\ncurrent directory: <b>", &clickablepath($where, 0), "</b>\n"; - print "<p>\nCurrent tag: <b>", $input{only_with_tag}, "</b>\n" if + print "<p>\ncurrent tag: <b>", $input{only_with_tag}, "</b>\n" if $input{only_with_tag}; } print "<hr noshade>\n"; - # Using <MENU> in this manner violates the HTML2.0 spec but - # provides the results that I want in most browsers. Another - # case of layout spooging up HTML. + # using <menu> in this manner violates the html2.0 spec but + # provides the results that i want in most browsers. another + # case of layout spooging up html. my $infocols = 0; if ($dirtable) { - if (defined($tableBorderColor)) { - # Can't this be done by defining the border for the inner table? + if (defined($tablebordercolor)) { + # can't this be done by defining the border for the inner table? print "<table border=\"0\" cellpadding=\"0\" " - . "width=\"100%\"><tr><td bgcolor=\"$tableBorderColor\">"; + . "width=\"100%\"><tr><td bgcolor=\"$tablebordercolor\">"; } print "<table width=\"100%\" border=\"0\" cellspacing=\"1\" " . "cellpadding=\"$tablepadding\">\n"; $infocols++; print "<tr><th align=\"left\" bgcolor=\"" . (($byfile) ? - $columnHeaderColorSorted : - $columnHeaderColorDefault) . "\">"; - print "<a href=\"./" . &toggleQuery("sortby", "file") . + $columnheadercolorsorted : + $columnheadercolordefault) . "\">"; + print "<a href=\"./" . &togglequery("sortby", "file") . "#dirlist\">" if (!$byfile); - print "File"; + print "file"; print "</a>" if (!$byfile); print "</th>"; # do not display the other column-headers, if we do not have any files @@ -464,45 +464,45 @@ if (scalar(%fileinfo)) { $infocols++; print "<th align=\"left\" bgcolor=\"" . (($byrev) ? - $columnHeaderColorSorted : - $columnHeaderColorDefault) . "\">"; - print "<a href=\"./" . &toggleQuery ("sortby", "rev") . + $columnheadercolorsorted : + $columnheadercolordefault) . "\">"; + print "<a href=\"./" . &togglequery ("sortby", "rev") . "#dirlist\">" if (!$byrev); - print "Rev."; + print "rev."; print "</a>" if (!$byrev); print "</th>"; $infocols++; print "<th align=\"left\" bgcolor=\"" . (($bydate) ? - $columnHeaderColorSorted : - $columnHeaderColorDefault) . "\">"; - print "<a href=\"./" . &toggleQuery ("sortby", "date") . + $columnheadercolorsorted : + $columnheadercolordefault) . "\">"; + print "<a href=\"./" . &togglequery ("sortby", "date") . "#dirlist\">" if (!$bydate); - print "Age"; + print "age"; print "</a>" if (!$bydate); print "</th>"; if ($show_author) { $infocols++; print "<th align=\"left\" bgcolor=\"" . (($byauthor) ? - $columnHeaderColorSorted : - $columnHeaderColorDefault) . "\">"; - print "<a href=\"./" . &toggleQuery ("sortby", "author") . + $columnheadercolorsorted : + $columnheadercolordefault) . "\">"; + print "<a href=\"./" . &togglequery ("sortby", "author") . "#dirlist\">" if (!$byauthor); - print "Author"; + print "author"; print "</a>" if (!$byauthor); print "</th>"; } $infocols++; print "<th align=\"left\" bgcolor=\"" . (($bylog) ? - $columnHeaderColorSorted : - $columnHeaderColorDefault) . "\">"; - print "<a href=\"./", toggleQuery("sortby", "log"), "#dirlist\">" if (!$bylog); - print "Last log entry"; + $columnheadercolorsorted : + $columnheadercolordefault) . "\">"; + print "<a href=\"./", togglequery("sortby", "log"), "#dirlist\">" if (!$bylog); + print "last log entry"; print "</a>" if (!$bylog); print "</th>"; } elsif ($use_descriptions) { - print "<th align=\"left\" bgcolor=\"". $columnHeaderColorDefault . "\">"; - print "Description"; + print "<th align=\"left\" bgcolor=\"". $columnheadercolordefault . "\">"; + print "description"; $infocols++; } print "</tr>\n"; @@ -515,22 +515,22 @@ my $i; lookingforattic: for ($i = 0; $i <= $#dir; $i++) { - if ($dir[$i] eq "Attic") { + if ($dir[$i] eq "attic") { last lookingforattic; } } if (!$input{'hideattic'} && ($i <= $#dir) && - opendir($dh, $fullname . "/Attic")) { + opendir($dh, $fullname . "/attic")) { splice(@dir, $i, 1, - grep((s|^|Attic/|,!m|/\.|), readdir($dh))); + grep((s|^|attic/|,!m|/\.|), readdir($dh))); closedir($dh); } - my $hideAtticToggleLink = "<a href=\"./" . - &toggleQuery ("hideattic") . - "#dirlist\">[Hide]</a>" if (!$input{'hideattic'}); + my $hideattictogglelink = "<a href=\"./" . + &togglequery ("hideattic") . + "#dirlist\">[hide]</a>" if (!$input{'hideattic'}); - # Sort without the Attic/ pathname. + # sort without the attic/ pathname. # place directories first my $attic; @@ -539,24 +539,24 @@ my $filesexists; my $filesfound; - foreach (sort { &fileSortCmp } @dir) { + foreach (sort { &filesortcmp } @dir) { if ($_ eq '.') { next; } - # ignore CVS lock and stale NFS files + # ignore cvs lock and stale nfs files next if (/^#cvs\.|^,|^\.nfs/); - # Check whether to show the CVSROOT path - next if ($input{'hidecvsroot'} && ($_ eq 'CVSROOT')); + # check whether to show the cvsroot path + next if ($input{'hidecvsroot'} && ($_ eq 'cvsroot')); - # Check whether the module is in the restricted list + # check whether the module is in the restricted list next if ($_ && &forbidden_module($_)); - # Ignore non-readable files + # ignore non-readable files next if ($input{'hidenonreadable'} && !(-r "$fullname/$_")); - if (s|^Attic/||) { - $attic = " (in the Attic) " . $hideAtticToggleLink; + if (s|^attic/||) { + $attic = " (in the attic) " . $hideattictogglelink; } else { $attic = ""; @@ -576,11 +576,11 @@ else { print &link($backicon, $url); } - print " ", &link("Previous Directory", $url); + print " ", &link("previous directory", $url); } else { $url = urlencode($_) . '/' . $query; - print "<a name=\"$_\"></A>"; + print "<a name=\"$_\"></a>"; if ($nofilelinks) { print $diricon; } @@ -588,17 +588,17 @@ print &link($diricon, $url); } print " ", &link($_ . "/", $url), $attic; - if ($_ eq "Attic") { + if ($_ eq "attic") { print " <a href=\"./" . - &toggleQuery ("hideattic") . - "#dirlist\">[Don't hide]</a>"; + &togglequery ("hideattic") . + "#dirlist\">[don't hide]</a>"; } } - # Show last change in dir + # show last change in dir if ($filename) { print "</td><td> </td><td> " if ($dirtable); if ($date) { - print " <i>" . readableTime(time() - $date, 0) + print " <i>" . readabletime(time() - $date, 0) . "</i>"; } if ($show_author) { @@ -611,7 +611,7 @@ print "<br>" if ($dirtable); if ($log) { print " <font size=\"-1\">" - . &htmlify(substr($log, 0, $shortLogLen)); + . &htmlify(substr($log, 0, $shortloglen)); if (length $log > 80) { print "..."; } @@ -642,7 +642,7 @@ $dirrow++; } elsif (s/,v$//) { - $fileurl = ($attic ? "Attic/" : "") . urlencode($_); + $fileurl = ($attic ? "attic/" : "") . urlencode($_); $url = $fileurl . $query; my $rev = ''; my $date = ''; @@ -664,10 +664,10 @@ print "</td><td> " if ($dirtable); download_link($fileurl, $rev, $rev, - $defaultViewable ? "text/x-versionary-markup" : undef); + $defaultviewable ? "text/x-versionary-markup" : undef); print "</td><td> " if ($dirtable); if ($date) { - print " <i>" . readableTime(time() - $date, 0) . "</i>"; + print " <i>" . readabletime(time() - $date, 0) . "</i>"; } if ($show_author) { print "</td><td> " if ($dirtable); @@ -676,7 +676,7 @@ print "</td><td> " if ($dirtable); if ($log) { print " <font size=\"-1\">" - . &htmlify(substr($log, 0, $shortLogLen)); + . &htmlify(substr($log, 0, $shortloglen)); if (length $log > 80) { print "..."; } @@ -688,13 +688,13 @@ } print "\n"; } - if ($dirtable && defined($tableBorderColor)) { + if ($dirtable && defined($tablebordercolor)) { print "</td></tr></table>"; } print "". ($dirtable == 1) ? "</table>" : "</menu>" . "\n"; if ($filesexists && !$filesfound) { - print "<p><b>NOTE:</b> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n"; + print "<p><b>note:</b> there are $filesexists files, but none matches the current tag ($input{only_with_tag})\n"; } if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) { %tags = %alltags @@ -707,20 +707,20 @@ } if (scalar %tags || $input{only_with_tag}) { - print "<form method=\"GET\" action=\"./\">\n"; + print "<form method=\"get\" action=\"./\">\n"; foreach my $var (@stickyvars) { print "<input type=\"hidden\" name=\"$var\" value=\"$input{$var}\">\n" if (defined($input{$var}) - && (!defined($DEFAULTVALUE{$var}) - || $input{$var} ne $DEFAULTVALUE{$var}) + && (!defined($defaultvalue{$var}) + || $input{$var} ne $defaultvalue{$var}) && $input{$var} ne "" && $var ne "only_with_tag"); } - print "Show only files with tag:\n"; + print "show only files with tag:\n"; print "<select name=\"only_with_tag\""; print " onchange=\"submit()\"" if ($use_java_script); print ">"; - print "<option value=\"\">All tags / default branch\n"; + print "<option value=\"\">all tags / default branch\n"; foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) { print "<option", (defined($input{only_with_tag}) @@ -729,77 +729,77 @@ ">$tag\n"; } print "</select>\n"; - print "<input type=\"submit\" value=\"Go\">\n"; + print "<input type=\"submit\" value=\"go\">\n"; print "</form>\n"; } my $formwhere = $scriptwhere; - $formwhere =~ s|Attic/?$|| if ($input{'hideattic'}); + $formwhere =~ s|attic/?$|| if ($input{'hideattic'}); if ($edit_option_form || defined($input{"options"})) { - print "<form method=\"GET\" action=\"${formwhere}\">\n"; + print "<form method=\"get\" action=\"${formwhere}\">\n"; print "<input type=\"hidden\" name=\"copt\" value=\"1\">\n"; if ($cvstree ne $cvstreedefault) { print "<input type=\"hidden\" name=\"cvsroot\" value=\"$cvstree\">\n"; } print "<center><table cellpadding=\"0\" cellspacing=\"0\">"; - print "<tr bgcolor=\"$columnHeaderColorDefault\"><th colspan=\"2\">Preferences</th></tr>"; - print "<tr><td>Sort files by <select name=\"sortby\">"; - print "<option value=\"\">File"; - print "<option", ($bydate ? " selected" : ""), " value=\"date\">Age"; + print "<tr bgcolor=\"$columnheadercolordefault\"><th colspan=\"2\">preferences</th></tr>"; + print "<tr><td>sort files by <select name=\"sortby\">"; + print "<option value=\"\">file"; + print "<option", ($bydate ? " selected" : ""), " value=\"date\">age"; print "<option", ($byauthor ? " selected" : ""), - " value=\"author\">Author" + " value=\"author\">author" if ($show_author); print "<option", ($byrev ? " selected" : ""), - " value=\"rev\">Revision"; + " value=\"rev\">revision"; print "<option", ($bylog ? " selected" : ""), - " value=\"log\">Log message"; + " value=\"log\">log message"; print "</select></td>"; print "<td>revisions by: \n"; print "<select name=\"logsort\">\n"; - print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">Not sorted"; - print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">Commit date"; - print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">Revision"; + print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">not sorted"; + print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">commit date"; + print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">revision"; print "</select></td></tr>"; - print "<tr><td>Diff format: "; - printDiffSelect(0); + print "<tr><td>diff format: "; + printdiffselect(0); print "</td>"; - print "<td>Show Attic files: "; + print "<td>show attic files: "; print "<input name=\"hideattic\" type=\"checkbox\"", $input{'hideattic'}?" checked":"", "></td></tr>\n"; - print "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Change Options\">"; + print "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"change options\">"; print "</td></tr></table></center></form>\n"; } print &html_footer; - print "</BODY></HTML>\n"; + print "</body></html>\n"; } ############################### -# View Files +# view files ############################### elsif (-f $fullname . ',v') { - if (defined($input{'rev'}) || $doCheckout) { - &doCheckout($fullname, $input{'rev'}); + if (defined($input{'rev'}) || $docheckout) { + &docheckout($fullname, $input{'rev'}); gzipclose(); exit; } if (defined($input{'annotate'}) && $allow_annotate) { - &doAnnotate($input{'annotate'}); + &doannotate($input{'annotate'}); gzipclose(); exit; } if (defined($input{'r1'}) && defined($input{'r2'})) { - &doDiff($fullname, $input{'r1'}, $input{'tr1'}, + &dodiff($fullname, $input{'r1'}, $input{'tr1'}, $input{'r2'}, $input{'tr2'}, $input{'f'}); gzipclose(); exit; } print("going to dolog($fullname)\n") if ($verbose); - &doLog($fullname); + &dolog($fullname); ############################## -# View Diff +# view diff ############################## } elsif ($fullname =~ s/\.diff$// && -f $fullname . ",v" && @@ -810,66 +810,66 @@ # rcsdiff does (-w and -p), so it is disabled # $where =~ s/\.diff$//; - # Allow diffs using the ".diff" extension - # so that browsers that default to the URL + # allow diffs using the ".diff" extension + # so that browsers that default to the url # for a save filename don't save diff's as # e.g. foo.c - &doDiff($fullname, $input{'r1'}, $input{'tr1'}, + &dodiff($fullname, $input{'r1'}, $input{'tr1'}, $input{'r2'}, $input{'tr2'}, $input{'f'}); gzipclose(); exit; } - elsif (($newname = $fullname) =~ s|/([^/]+)$|/Attic/$1| && + elsif (($newname = $fullname) =~ s|/([^/]+)$|/attic/$1| && -f $newname . ",v") { - # The file has been removed and is in the Attic. - # Send a redirect pointing to the file in the Attic. - (my $newplace = $scriptwhere) =~ s|/([^/]+)$|/Attic/$1|; - &redirect($newplace . "?" . $ENV{QUERY_STRING}); + # the file has been removed and is in the attic. + # send a redirect pointing to the file in the attic. + (my $newplace = $scriptwhere) =~ s|/([^/]+)$|/attic/$1|; + &redirect($newplace . "?" . $env{query_string}); exit; } elsif (0 && (my @files = &safeglob($fullname . ",v"))) { http_header("text/plain"); - print "You matched the following files:\n"; + print "you matched the following files:\n"; print join("\n", @files); - # Find the tags from each file - # Display a form offering diffs between said tags + # find the tags from each file + # display a form offering diffs between said tags } else { - my $fh = do {local(*FH);}; + my $fh = do {local(*fh);}; my ($xtra, $module); - # Assume it's a module name with a potential path following it. + # assume it's a module name with a potential path following it. $xtra = $& if (($module = $where) =~ s|/.*||); - # Is there an indexed version of modules? - if (open($fh, "$cvsroot/CVSROOT/modules")) { + # is there an indexed version of modules? + if (open($fh, "$cvsroot/cvsroot/modules")) { while (<$fh>) { - if (/^(\S+)\s+(\S+)/o && $module eq $1 + if (/^(\s+)\s+(\s+)/o && $module eq $1 && -d "${cvsroot}/$2" && $module ne $2) { &redirect($scriptname . '/' . $2 . $xtra); } } } - &fatal("404 Not Found", "$where: no such file or directory"); + &fatal("404 not found", "$where: no such file or directory"); } gzipclose(); -## End MAIN +## end main -sub printDiffSelect($) { +sub printdiffselect($) { my ($use_java_script) = @_; $use_java_script = 0 if (!defined($use_java_script)); my ($f) = $input{'f'}; print "<select name=\"f\""; print " onchange=\"submit()\"" if ($use_java_script); print ">\n"; - print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">Colored Diff"; - print "<option value=\"H\"", $f eq "H" ? " selected" : "", ">Long Colored Diff"; - print "<option value=\"u\"", $f eq "u" ? " selected" : "", ">Unidiff"; - print "<option value=\"c\"", $f eq "c" ? " selected" : "", ">Context Diff"; - #print "<option value=\"s\"", $f eq "s" ? " selected" : "", ">Side by Side"; + print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">colored diff"; + print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">long colored diff"; + print "<option value=\"u\"", $f eq "u" ? " selected" : "", ">unidiff"; + print "<option value=\"c\"", $f eq "c" ? " selected" : "", ">context diff"; + #print "<option value=\"s\"", $f eq "s" ? " selected" : "", ">side by side"; print "</select>"; } -sub findLastModifiedSubdirs(@) { +sub findlastmodifiedsubdirs(@) { my (@dirs) = @_; my ($dirname, @files); @@ -881,7 +881,7 @@ my ($lastmod) = undef; my ($lastmodtime) = undef; - my $dh = do {local(*DH);}; + my $dh = do {local(*dh);}; opendir($dh, $dir) || next; my (@filenames) = readdir($dh); @@ -892,7 +892,7 @@ my ($file) = "$fullname/$filename"; next if ($filename !~ /,v$/ || !-f $file); $filename =~ s/,v$//; - my $modtime = -M $file; + my $modtime = -m $file; if (!defined($lastmod) || $modtime < $lastmodtime) { $lastmod = $filename; $lastmodtime = $modtime; @@ -906,27 +906,27 @@ sub htmlify($) { my($string) = @_; - # Special Characters; RFC 1866 + # special characters; rfc 1866 $string =~ s/&/&/g; $string =~ s/\"/"/g; $string =~ s/</</g; $string =~ s/>/>/g; - # get URL's as link .. - $string =~ s§(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*§<a href="$1$2$3">$1$2$3</a>§; + # get url's as link .. + $string =~ s§(http|ftp|https)(://[-a-za-z0-9%.~:_/]+)([?&]([-a-za-z0-9%.~:_]+)=([-a-za-z0-9%.~:_])+)*§<a href="$1$2$3">$1$2$3</a>§; # get e-mails as link - $string =~ s§([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})§<a href="mailto:$1">$1</a>§; + $string =~ s§([-a-za-z0-9_.]+@([-a-za-z0-9]+\.)+[a-za-z]{2,4})§<a href="mailto:$1">$1</a>§; return $string; } -sub spacedHtmlText($) { +sub spacedhtmltext($) { my($string) = @_; - # Cut trailing spaces + # cut trailing spaces s/\s+$//; - # Expand tabs + # expand tabs $string =~ s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e if (defined($tabstop)); @@ -977,30 +977,30 @@ sub fatal($$) { my($errcode, $errmsg) = @_; - if (defined($ENV{'MOD_PERL'})) { - Apache->request->status((split(/ /, $errcode))[0]); + if (defined($env{'mod_perl'})) { + apache->request->status((split(/ /, $errcode))[0]); } else { - print "Status: $errcode\n"; + print "status: $errcode\n"; } - html_header("Error"); - print "Error: $errmsg\n"; + html_header("error"); + print "error: $errmsg\n"; print &html_footer; exit(1); } sub redirect($) { my($url) = @_; - if (defined($ENV{'MOD_PERL'})) { - Apache->request->status(301); - Apache->request->header_out(Location => $url); + if (defined($env{'mod_perl'})) { + apache->request->status(301); + apache->request->header_out(location => $url); } else { - print "Status: 301 Moved\r\n"; - print "Location: $url\r\n"; + print "status: 301 moved\r\n"; + print "location: $url\r\n"; } - html_header("Moved"); - print "This document is located <a href=\"$url\">here</a>.\n"; + html_header("moved"); + print "this document is located <a href=\"$url\">here</a>.\n"; print &html_footer; exit(1); } @@ -1009,7 +1009,7 @@ my ($filename) = @_; my ($dirname); my (@results); - my $dh = do {local(*DH);}; + my $dh = do {local(*dh);}; ($dirname = $filename) =~ s|/[^/]+$||; $filename =~ s|.*/||; @@ -1017,7 +1017,7 @@ if (opendir($dh, $dirname)) { my $glob = $filename; my $t; - # transform filename from glob to regex. Deal with: + # transform filename from glob to regex. deal with: # [, {, ?, * as glob chars # make sure to escape all other regex chars $glob =~ s/([\.\(\)\|\+])/\\$1/g; @@ -1035,21 +1035,21 @@ @results; } -sub getMimeTypeFromSuffix($) { +sub getmimetypefromsuffix($) { my ($fullname) = @_; my ($mimetype, $suffix); - my $fh = do {local(*FH);}; + my $fh = do {local(*fh);}; ($suffix = $fullname) =~ s/^.*\.([^.]*)$/$1/; - $mimetype = $MTYPES{$suffix}; - $mimetype = $MTYPES{'*'} if (!$mimetype); + $mimetype = $mtypes{$suffix}; + $mimetype = $mtypes{'*'} if (!$mimetype); if (!$mimetype && -f $mime_types) { # okey, this is something special - search the # mime.types database open ($fh, "<$mime_types"); while (<$fh>) { - if ($_ =~ /^\s*(\S+\/\S+).*\b$suffix\b/) { + if ($_ =~ /^\s*(\s+\/\s+).*\b$suffix\b/) { $mimetype = $1; last; } @@ -1058,114 +1058,114 @@ } # okey, didn't find anything useful .. - if (!($mimetype =~ /\S\/\S/)) { + if (!($mimetype =~ /\s\/\s/)) { $mimetype = "text/plain"; } return $mimetype; } ############################### -# show Annotation +# show annotation ############################### -sub doAnnotate ($$) { +sub doannotate ($$) { my ($rev) = @_; my ($pid); my ($pathname, $filename); - my $reader = do {local(*FH);}; - my $writer = do {local(*FH);}; + my $reader = do {local(*fh);}; + my $writer = do {local(*fh);}; # make sure the revisions are wellformed, for security # reasons .. if (!($rev =~ /^[\d\.]+$/)) { - &fatal("404 Not Found", - "Malformed query \"$ENV{'QUERY_STRING'}\""); + &fatal("404 not found", + "malformed query \"$env{'query_string'}\""); } if (&forbidden_file($fullname)) { - &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead"); + &fatal("403 forbidden", "access forbidden. this file is mentioned in \@disallowread"); return; } - ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; + ($pathname = $where) =~ s/(attic\/)?[^\/]*$//; ($filename = $where) =~ s/^.*\///; http_header(); - navigateHeader ($scriptwhere, $pathname, $filename, $rev, "annotate"); - print "<h3 align=\"center\">Annotation of $pathname$filename, Revision $rev</h3>\n"; + navigateheader ($scriptwhere, $pathname, $filename, $rev, "annotate"); + print "<h3 align=\"center\">annotation of $pathname$filename, revision $rev</h3>\n"; # this seems to be necessary - $| = 1; $| = 0; # Flush + $| = 1; $| = 0; # flush # this annotate version is based on the - # cvs annotate-demo Perl script by Cyclic Software - # It was written by Cyclic Software, http://www.cyclic.com/, and is in + # cvs annotate-demo perl script by cyclic software + # it was written by cyclic software, http://www.cyclic.com/, and is in # the public domain. # we could abandon the use of rlog, rcsdiff and co using # the cvsserver in a similiar way one day (..after rewrite) - $pid = open2($reader, $writer, "cvs server") || fatal ("500 Internal Error", - "Fatal Error - unable to open cvs for annotation"); + $pid = open2($reader, $writer, "cvs server") || fatal ("500 internal error", + "fatal error - unable to open cvs for annotation"); - # OK, first send the request to the server. A simplified example is: - # Root /home/kingdon/zwork/cvsroot - # Argument foo/xx - # Directory foo + # ok, first send the request to the server. a simplified example is: + # root /home/kingdon/zwork/cvsroot + # argument foo/xx + # directory foo # /home/kingdon/zwork/cvsroot/foo - # Directory . + # directory . # /home/kingdon/zwork/cvsroot # annotate # although as you can see there are a few more details. - print $writer "Root $cvsroot\n"; - print $writer "Valid-responses ok error Valid-requests Checked-in Updated Merged Removed M E\n"; - # Don't worry about sending valid-requests, the server just needs to + print $writer "root $cvsroot\n"; + print $writer "valid-responses ok error valid-requests checked-in updated merged removed m e\n"; + # don't worry about sending valid-requests, the server just needs to # support "annotate" and if it doesn't, there isn't anything to be done. - print $writer "UseUnchanged\n"; - print $writer "Argument -r\n"; - print $writer "Argument $rev\n"; - print $writer "Argument $where\n"; + print $writer "useunchanged\n"; + print $writer "argument -r\n"; + print $writer "argument $rev\n"; + print $writer "argument $where\n"; - # The protocol requires us to fully fake a working directory (at + # the protocol requires us to fully fake a working directory (at # least to the point of including the directories down to the one # containing the file in question). - # So if $where is "dir/sdir/file", then @dirs will be + # so if $where is "dir/sdir/file", then @dirs will be # ("dir", "sdir", "file") my @dirs = split('/', $where); my $path = ""; foreach (@dirs) { if ($path eq "") { - # In our example, $_ is "dir". + # in our example, $_ is "dir". $path = $_; } else { - print $writer "Directory $path\n"; + print $writer "directory $path\n"; print $writer "$cvsroot/$path\n"; - # In our example, $_ is "sdir" and $path becomes "dir/sdir" - # And the next time, "file" and "dir/sdir/file" (which then gets - # ignored, because we don't need to send Directory for the file). + # in our example, $_ is "sdir" and $path becomes "dir/sdir" + # and the next time, "file" and "dir/sdir/file" (which then gets + # ignored, because we don't need to send directory for the file). $path .= "/$_"; } } - # And the last "Directory" before "annotate" is the top level. - print $writer "Directory .\n"; + # and the last "directory" before "annotate" is the top level. + print $writer "directory .\n"; print $writer "$cvsroot\n"; print $writer "annotate\n"; - # OK, we've sent our command to the server. Thing to do is to - # close the writer side and get all the responses. If "cvs server" - # were nicer about buffering, then we could just leave it open, I think. + # ok, we've sent our command to the server. thing to do is to + # close the writer side and get all the responses. if "cvs server" + # were nicer about buffering, then we could just leave it open, i think. close ($writer) || die "cannot close: $!"; - # Ready to get the responses from the server. - # For example: - # E Annotations for foo/xx - # E *************** - # M 1.3 (kingdon 06-Sep-97): hello + # ready to get the responses from the server. + # for example: + # e annotations for foo/xx + # e *************** + # m 1.3 (kingdon 06-sep-97): hello # ok - my ($lineNr) = 0; - my ($oldLrev, $oldLusr) = ("", ""); + my ($linenr) = 0; + my ($oldlrev, $oldlusr) = ("", ""); my ($revprint, $usrprint); - if ($annTable) { + if ($anntable) { print "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; } else { @@ -1173,49 +1173,49 @@ } while (<$reader>) { my @words = split; - # Adding one is for the (single) space which follows $words[0]. + # adding one is for the (single) space which follows $words[0]. my $rest = substr ($_, length ($words[0]) + 1); - if ($words[0] eq "E") { + if ($words[0] eq "e") { next; } - elsif ($words[0] eq "M") { - $lineNr++; + elsif ($words[0] eq "m") { + $linenr++; my $lrev = substr ($_, 2, 13); my $lusr = substr ($_, 16, 9); my $line = substr ($_, 36); # we should parse the date here .. - if ($lrev eq $oldLrev) { + if ($lrev eq $oldlrev) { $revprint = " "; } else { - $revprint = $lrev; $oldLusr = ""; + $revprint = $lrev; $oldlusr = ""; } - if ($lusr eq $oldLusr) { + if ($lusr eq $oldlusr) { $usrprint = " "; } else { $usrprint = $lusr; } - $oldLrev = $lrev; - $oldLusr = $lusr; + $oldlrev = $lrev; + $oldlusr = $lusr; # is there a less timeconsuming way to strip spaces ? ($lrev = $lrev) =~ s/\s+//g; - my $isCurrentRev = ("$rev" eq "$lrev"); + my $iscurrentrev = ("$rev" eq "$lrev"); - print "<b>" if ($isCurrentRev); - printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr); - print spacedHtmlText($line); - print "</b>" if ($isCurrentRev); + print "<b>" if ($iscurrentrev); + printf ("%8s%s%8s %4d:", $revprint, ($iscurrentrev ? "|" : " "), $usrprint, $linenr); + print spacedhtmltext($line); + print "</b>" if ($iscurrentrev); } elsif ($words[0] eq "ok") { - # We could complain about any text received after this, like the - # CVS command line client. But for simplicity, we don't. + # we could complain about any text received after this, like the + # cvs command line client. but for simplicity, we don't. } elsif ($words[0] eq "error") { - fatal ("500 Internal Error", "Error occured during annotate: <b>$_</b>"); + fatal ("500 internal error", "error occured during annotate: <b>$_</b>"); } } - if ($annTable) { + if ($anntable) { print "</table>"; } else { @@ -1226,49 +1226,49 @@ } ############################### -# make Checkout +# make checkout ############################### -sub doCheckout($$) { +sub docheckout($$) { my ($fullname, $rev) = @_; my ($mimetype, $revopt); - my $fh = do {local(*FH);}; + my $fh = do {local(*fh);}; - if ($rev eq 'HEAD' || $rev eq '.') { + if ($rev eq 'head' || $rev eq '.') { $rev = undef; } # make sure the revisions a wellformed, for security # reasons .. if (defined($rev) && !($rev =~ /^[\d\.]+$/)) { - &fatal("404 Not Found", - "Malformed query \"$ENV{'QUERY_STRING'}\""); + &fatal("404 not found", + "malformed query \"$env{'query_string'}\""); } if (&forbidden_file($fullname)) { - &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead"); + &fatal("403 forbidden", "access forbidden. this file is mentioned in \@disallowread"); return; } # get mimetype - if (defined($input{"content-type"}) && ($input{"content-type"} =~ /\S\/\S/)) { + if (defined($input{"content-type"}) && ($input{"content-type"} =~ /\s\/\s/)) { $mimetype = $input{"content-type"} } else { - $mimetype = &getMimeTypeFromSuffix($fullname); + $mimetype = &getmimetypefromsuffix($fullname); } if (defined($rev)) { $revopt = "-r$rev"; if ($use_moddate) { - readLog($fullname, $rev); + readlog($fullname, $rev); $moddate=$date{$rev}; } } else { - $revopt = "-rHEAD"; + $revopt = "-rhead"; if ($use_moddate) { - readLog($fullname); - $moddate=$date{$symrev{HEAD}}; + readlog($fullname); + $moddate=$date{$symrev{head}}; } } @@ -1277,43 +1277,43 @@ ### directories/files having spaces in it; ### this is an issue that should be resolved on cvs's side # - # Safely for a child process to read from. + # safely for a child process to read from. if (! open($fh, "-|")) { # child my $nohist = ($logactions ? "" : "l"); - open(STDERR, ">&STDOUT"); # Redirect stderr to stdout + open(stderr, ">&stdout"); # redirect stderr to stdout exec("cvs", "-d$nohist", "$cvsroot", "co", "-p", "$revopt", "$where"); } #=================================================================== -#Checking out squid/src/ftp.c -#RCS: /usr/src/CVS/squid/src/ftp.c,v -#VERS: 1.1.1.28.6.2 +#checking out squid/src/ftp.c +#rcs: /usr/src/cvs/squid/src/ftp.c,v +#vers: 1.1.1.28.6.2 #*************** - # Parse CVS header + # parse cvs header my ($revision, $filename, $cvsheader); $filename = ""; while(<$fh>) { last if (/^\*\*\*\*/); - $revision = $1 if (/^VERS: (.*)$/); - if (/^Checking out (.*)$/) { + $revision = $1 if (/^vers: (.*)$/); + if (/^checking out (.*)$/) { $filename = $1; $filename =~ s/^\.\/*//; } $cvsheader .= $_; } if ($filename ne $where) { - &fatal("500 Internal Error", - "Unexpected output from cvs co: $cvsheader" - . "<p><b>Check whether the directory $cvsroot/CVSROOT exists " - . "and the script has write-access to the CVSROOT/history " + &fatal("500 internal error", + "unexpected output from cvs co: $cvsheader" + . "<p><b>check whether the directory $cvsroot/cvsroot exists " + . "and the script has write-access to the cvsroot/history " . "file if it exists." - . "<br>The script needs to place lock files in the " + . "<br>the script needs to place lock files in the " . "directory the file is in as well.</b>"); } $| = 1; if ($mimetype eq "text/x-versionary-markup") { - &versionaryMarkup($fh, $fullname, $revision); + &versionarymarkup($fh, $fullname, $revision); } else { http_header($mimetype); @@ -1322,35 +1322,35 @@ close($fh); } -sub versionaryMarkup($$$) { +sub versionarymarkup($$$) { my ($filehandle, $fullname, $revision) = @_; my ($pathname, $filename); - ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//; + ($pathname = $where) =~ s/(attic\/)?[^\/]*$//; ($filename = $where) =~ s/^.*\///; my ($fileurl) = urlencode($filename); http_header(); - navigateHeader ($scriptwhere, $pathname, $filename, $revision, "view"); + navigateheader ($scriptwhere, $pathname, $filename, $revision, "view"); print "<hr noshade>"; - print "<table width=\"100%\"><tr><td bgcolor=\"$markupLogColor\">"; - print "File: ", &clickablePath($where, 1); + print "<table width=\"100%\"><tr><td bgcolor=\"$markuplogcolor\">"; + print "file: ", &clickablepath($where, 1); print " "; &download_link(urlencode($fileurl), $revision, "(download)"); - if (!$defaultTextPlain) { + if (!$defaulttextplain) { print " "; &download_link(urlencode($fileurl), $revision, "(as text)", "text/plain"); } print "<br>\n"; if ($show_log_in_markup) { - readLog($fullname); #,$revision); - printLog($revision, 0); + readlog($fullname); #,$revision); + printlog($revision, 0); } else { - print "Version: <b>$revision</b><br>\n"; - print "Tag: <b>", $input{only_with_tag}, "</b><br>\n" if + print "version: <b>$revision</b><br>\n"; + print "tag: <b>", $input{only_with_tag}, "</b><br>\n" if $input{only_with_tag}; } print "</td></tr></table>"; @@ -1366,7 +1366,7 @@ else { print "<pre>"; foreach (@content) { - print spacedHtmlText($_); + print spacedhtmltext($_); } print "</pre>"; } @@ -1382,15 +1382,15 @@ } ############################### -# Show Colored Diff +# show colored diff ############################### -sub doDiff($$$$$$) { +sub dodiff($$$$$$) { my($fullname, $r1, $tr1, $r2, $tr2, $f) = @_; - my $fh = do {local(*FH);}; + my $fh = do {local(*fh);}; my ($rev1, $rev2, $sym... [truncated message content] |
|
From: Ken C. <co...@us...> - 2001-12-20 23:01:39
|
coar 01/12/20 15:01:36
Modified: . versionary.cgi
Log:
First pass at cleaning up HTML (downcasing, quoting attributes, ...)
Revision Changes Path
1.6 +119 -117 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- versionary.cgi 2001/12/20 22:39:59 1.5
+++ versionary.cgi 2001/12/20 23:01:35 1.6
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.5 2001/12/20 22:39:59 coar Exp $
+# $Id: versionary.cgi,v 1.6 2001/12/20 23:01:35 coar Exp $
#
###
require 5.000;
@@ -330,8 +330,8 @@
no strict 'refs';
my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}};
if ($ipath) {
- ${"${k}icon"} = "<IMG SRC=\"$ipath\" ALT=\"$itxt\" "
- . "BORDER=\"0\" WIDTH=\"$iwidth\" HEIGHT=\"$iheight\">";
+ ${"${k}icon"} = "<img src=\"$ipath\" alt=\"$itxt\" "
+ . "border=\"0\" width=\"$iwidth\" height=\"$iheight\">";
}
else {
${"${k}icon"} = $itxt;
@@ -377,9 +377,9 @@
if (!-d $cvsroot) {
&fatal("500 Internal Error",
- '$CVSROOT not found!'
- . '<P>The server on which the CVS tree lives is probably down. '
- . 'Please try again in a few minutes.');
+ "<p>\n" . '$CVSROOT not found!' . "\n</p>\n"
+ . "<p>\nThe server on which the CVS tree lives is probably down. "
+ . "Please try again in a few minutes.\n</p>\n");
}
#
@@ -420,23 +420,23 @@
}
}
- print "<P><a name=\"dirlist\"></a>\n";
+ print "<p>\n<a name=\"dirlist\"></a>\n";
# give direct access to dirs
if ($where eq '/') {
chooseMirror();
chooseCVSRoot();
}
else {
- print "<p>Current directory: <b>", &clickablePath($where, 0),
+ print "<p>\nCurrent directory: <b>", &clickablePath($where, 0),
"</b>\n";
- print "<P>Current tag: <B>", $input{only_with_tag}, "</b>\n" if
+ print "<p>\nCurrent tag: <b>", $input{only_with_tag}, "</b>\n" if
$input{only_with_tag};
}
- print "<HR NOSHADE>\n";
+ print "<hr noshade>\n";
# Using <MENU> in this manner violates the HTML2.0 spec but
# provides the results that I want in most browsers. Another
# case of layout spooging up HTML.
@@ -445,11 +445,13 @@
if ($dirtable) {
if (defined($tableBorderColor)) {
# Can't this be done by defining the border for the inner table?
- print "<table border=0 cellpadding=0 width=\"100%\"><tr><td bgcolor=\"$tableBorderColor\">";
+ print "<table border=\"0\" cellpadding=\"0\" "
+ . "width=\"100%\"><tr><td bgcolor=\"$tableBorderColor\">";
}
- print "<table width=\"100%\" border=0 cellspacing=1 cellpadding=$tablepadding>\n";
+ print "<table width=\"100%\" border=\"0\" cellspacing=\"1\" "
+ . "cellpadding=\"$tablepadding\">\n";
$infocols++;
- print "<tr><th align=left bgcolor=\"" . (($byfile) ?
+ print "<tr><th align=\"left\" bgcolor=\"" . (($byfile) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
print "<a href=\"./" . &toggleQuery("sortby", "file") .
@@ -461,7 +463,7 @@
# with revision information:
if (scalar(%fileinfo)) {
$infocols++;
- print "<th align=left bgcolor=\"" . (($byrev) ?
+ print "<th align=\"left\" bgcolor=\"" . (($byrev) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
print "<a href=\"./" . &toggleQuery ("sortby", "rev") .
@@ -470,7 +472,7 @@
print "</a>" if (!$byrev);
print "</th>";
$infocols++;
- print "<th align=left bgcolor=\"" . (($bydate) ?
+ print "<th align=\"left\" bgcolor=\"" . (($bydate) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
print "<a href=\"./" . &toggleQuery ("sortby", "date") .
@@ -480,7 +482,7 @@
print "</th>";
if ($show_author) {
$infocols++;
- print "<th align=left bgcolor=\"" . (($byauthor) ?
+ print "<th align=\"left\" bgcolor=\"" . (($byauthor) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
print "<a href=\"./" . &toggleQuery ("sortby", "author") .
@@ -490,7 +492,7 @@
print "</th>";
}
$infocols++;
- print "<th align=left bgcolor=\"" . (($bylog) ?
+ print "<th align=\"left\" bgcolor=\"" . (($bylog) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
print "<a href=\"./", toggleQuery("sortby", "log"), "#dirlist\">" if (!$bylog);
@@ -499,7 +501,7 @@
print "</th>";
}
elsif ($use_descriptions) {
- print "<th align=left bgcolor=\"". $columnHeaderColorDefault . "\">";
+ print "<th align=\"left\" bgcolor=\"". $columnHeaderColorDefault . "\">";
print "Description";
$infocols++;
}
@@ -578,7 +580,7 @@
}
else {
$url = urlencode($_) . '/' . $query;
- print "<A NAME=\"$_\"></A>";
+ print "<a name=\"$_\"></A>";
if ($nofilelinks) {
print $diricon;
}
@@ -606,9 +608,9 @@
print "</td><td> " if ($dirtable);
$filename =~ s%^[^/]+/%%;
print "$filename/$rev";
- print "<BR>" if ($dirtable);
+ print "<br>" if ($dirtable);
if ($log) {
- print " <font size=-1>"
+ print " <font size=\"-1\">"
. &htmlify(substr($log, 0, $shortLogLen));
if (length $log > 80) {
print "...";
@@ -619,7 +621,7 @@
else {
my ($dwhere) = ($where ne "/" ? $where : "") . $_;
if ($use_descriptions && defined $descriptions{$dwhere}) {
- print "<TD COLSPAN=" . ($infocols-1) . "> " if $dirtable;
+ print "<td colspan=\"" . ($infocols-1) . "\"> " if $dirtable;
print $descriptions{$dwhere};
} elsif ($dirtable && $infocols > 1) {
# close the row with the appropriate number of
@@ -651,7 +653,7 @@
($rev, $date, $log, $author) = @{$fileinfo{$_}};
$filesfound++;
print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);
- print "<A NAME=\"$_\"></A>";
+ print "<a name=\"$_\"></a>";
if ($nofilelinks) {
print $fileicon;
}
@@ -673,7 +675,7 @@
}
print "</td><td> " if ($dirtable);
if ($log) {
- print " <font size=-1>"
+ print " <font size=\"-1\">"
. &htmlify(substr($log, 0, $shortLogLen));
if (length $log > 80) {
print "...";
@@ -692,7 +694,7 @@
print "". ($dirtable == 1) ? "</table>" : "</menu>" . "\n";
if ($filesexists && !$filesfound) {
- print "<P><B>NOTE:</B> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n";
+ print "<p><b>NOTE:</b> There are $filesexists files, but none matches the current tag ($input{only_with_tag})\n";
}
if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) {
%tags = %alltags
@@ -701,13 +703,13 @@
|| $input{only_with_tag}
|| $edit_option_form
|| defined($input{"options"})) {
- print "<hr size=1 NOSHADE>";
+ print "<hr size=\"1\" noshade>";
}
if (scalar %tags || $input{only_with_tag}) {
- print "<FORM METHOD=\"GET\" ACTION=\"./\">\n";
+ print "<form method=\"GET\" action=\"./\">\n";
foreach my $var (@stickyvars) {
- print "<INPUT TYPE=HIDDEN NAME=\"$var\" VALUE=\"$input{$var}\">\n"
+ print "<input type=\"hidden\" name=\"$var\" value=\"$input{$var}\">\n"
if (defined($input{$var})
&& (!defined($DEFAULTVALUE{$var})
|| $input{$var} ne $DEFAULTVALUE{$var})
@@ -715,60 +717,60 @@
&& $var ne "only_with_tag");
}
print "Show only files with tag:\n";
- print "<SELECT NAME=only_with_tag";
+ print "<select name=\"only_with_tag\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">";
- print "<OPTION VALUE=\"\">All tags / default branch\n";
+ print "<option value=\"\">All tags / default branch\n";
foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) {
- print "<OPTION",
+ print "<option",
(defined($input{only_with_tag})
&& ($input{only_with_tag} eq $tag)
- ? " SELECTED" : "",
+ ? " selected" : "",
">$tag\n";
}
- print "</SELECT>\n";
- print "<INPUT TYPE=SUBMIT VALUE=\"Go\">\n";
- print "</FORM>\n";
+ print "</select>\n";
+ print "<input type=\"submit\" value=\"Go\">\n";
+ print "</form>\n";
}
my $formwhere = $scriptwhere;
$formwhere =~ s|Attic/?$|| if ($input{'hideattic'});
if ($edit_option_form || defined($input{"options"})) {
- print "<FORM METHOD=\"GET\" ACTION=\"${formwhere}\">\n";
- print "<INPUT TYPE=HIDDEN NAME=\"copt\" VALUE=\"1\">\n";
+ print "<form method=\"GET\" action=\"${formwhere}\">\n";
+ print "<input type=\"hidden\" name=\"copt\" value=\"1\">\n";
if ($cvstree ne $cvstreedefault) {
- print "<INPUT TYPE=HIDDEN NAME=\"cvsroot\" VALUE=\"$cvstree\">\n";
+ print "<input type=\"hidden\" name=\"cvsroot\" value=\"$cvstree\">\n";
}
- print "<center><table cellpadding=0 cellspacing=0>";
- print "<tr bgcolor=\"$columnHeaderColorDefault\"><th colspan=2>Preferences</th></tr>";
- print "<tr><td>Sort files by <SELECT name=\"sortby\">";
- print "<OPTION VALUE=\"\">File";
- print "<OPTION", ($bydate ? " SELECTED" : ""), " VALUE=date>Age";
- print "<OPTION",
- ($byauthor ? " SELECTED" : ""),
- " VALUE=author>Author"
+ print "<center><table cellpadding=\"0\" cellspacing=\"0\">";
+ print "<tr bgcolor=\"$columnHeaderColorDefault\"><th colspan=\"2\">Preferences</th></tr>";
+ print "<tr><td>Sort files by <select name=\"sortby\">";
+ print "<option value=\"\">File";
+ print "<option", ($bydate ? " selected" : ""), " value=\"date\">Age";
+ print "<option",
+ ($byauthor ? " selected" : ""),
+ " value=\"author\">Author"
if ($show_author);
- print "<OPTION",
- ($byrev ? " SELECTED" : ""),
- " VALUE=rev>Revision";
- print "<OPTION",
- ($bylog ? " SELECTED" : ""),
- " VALUE=log>Log message";
- print "</SELECT></td>";
+ print "<option",
+ ($byrev ? " selected" : ""),
+ " value=\"rev\">Revision";
+ print "<option",
+ ($bylog ? " selected" : ""),
+ " value=\"log\">Log message";
+ print "</select></td>";
print "<td>revisions by: \n";
- print "<SELECT NAME=logsort>\n";
- print "<OPTION VALUE=cvs", $logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
- print "<OPTION VALUE=date", $logsort eq "date" ? " SELECTED" : "", ">Commit date";
- print "<OPTION VALUE=rev", $logsort eq "rev" ? " SELECTED" : "", ">Revision";
- print "</SELECT></td></tr>";
+ print "<select name=\"logsort\">\n";
+ print "<option value=\"cvs\"", $logsort eq "cvs" ? " selected" : "", ">Not sorted";
+ print "<option value=\"date\"", $logsort eq "date" ? " selected" : "", ">Commit date";
+ print "<option value=\"rev\"", $logsort eq "rev" ? " selected" : "", ">Revision";
+ print "</select></td></tr>";
print "<tr><td>Diff format: ";
printDiffSelect(0);
print "</td>";
print "<td>Show Attic files: ";
- print "<INPUT NAME=hideattic TYPE=CHECKBOX", $input{'hideattic'}?" CHECKED":"",
+ print "<input name=\"hideattic\" type=\"checkbox\"", $input{'hideattic'}?" checked":"",
"></td></tr>\n";
- print "<tr><td align=center colspan=2><input type=submit value=\"Change Options\">";
- print "</td></tr></table></center></FORM>\n";
+ print "<tr><td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Change Options\">";
+ print "</td></tr></table></center></form>\n";
}
print &html_footer;
print "</BODY></HTML>\n";
@@ -856,15 +858,15 @@
my ($use_java_script) = @_;
$use_java_script = 0 if (!defined($use_java_script));
my ($f) = $input{'f'};
- print "<SELECT NAME=\"f\"";
+ print "<select name=\"f\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">\n";
- print "<OPTION VALUE=h", $f eq "h" ? " SELECTED" : "", ">Colored Diff";
- print "<OPTION VALUE=H", $f eq "H" ? " SELECTED" : "", ">Long Colored Diff";
- print "<OPTION VALUE=u", $f eq "u" ? " SELECTED" : "", ">Unidiff";
- print "<OPTION VALUE=c", $f eq "c" ? " SELECTED" : "", ">Context Diff";
- #print "<OPTION VALUE=s", $f eq "s" ? " SELECTED" : "", ">Side by Side";
- print "</SELECT>";
+ print "<option value=\"h\"", $f eq "h" ? " selected" : "", ">Colored Diff";
+ print "<option value=\"H\"", $f eq "H" ? " selected" : "", ">Long Colored Diff";
+ print "<option value=\"u\"", $f eq "u" ? " selected" : "", ">Unidiff";
+ print "<option value=\"c\"", $f eq "c" ? " selected" : "", ">Context Diff";
+ #print "<option value=\"s\"", $f eq "s" ? " selected" : "", ">Side by Side";
+ print "</select>";
}
sub findLastModifiedSubdirs(@) {
@@ -911,9 +913,9 @@
$string =~ s/>/>/g;
# get URL's as link ..
- $string =~ s§(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*§<A HREF="$1$2$3">$1$2$3</A>§;
+ $string =~ s§(http|ftp|https)(://[-a-zA-Z0-9%.~:_/]+)([?&]([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*§<a href="$1$2$3">$1$2$3</a>§;
# get e-mails as link
- $string =~ s§([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})§<A HREF="mailto:$1">$1</A>§;
+ $string =~ s§([-a-zA-Z0-9_.]+@([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})§<a href="mailto:$1">$1</a>§;
return $string;
}
@@ -954,7 +956,7 @@
sub link($$) {
my($name, $where) = @_;
- return "<A HREF=\"$where\">$name</A>\n";
+ return "<a href=\"$where\">$name</a>\n";
}
sub revcmp($$) {
@@ -998,7 +1000,7 @@
print "Location: $url\r\n";
}
html_header("Moved");
- print "This document is located <A HREF=$url>here</A>.\n";
+ print "This document is located <a href=\"$url\">here</a>.\n";
print &html_footer;
exit(1);
}
@@ -1090,7 +1092,7 @@
http_header();
navigateHeader ($scriptwhere, $pathname, $filename, $rev, "annotate");
- print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";
+ print "<h3 align=\"center\">Annotation of $pathname$filename, Revision $rev</h3>\n";
# this seems to be necessary
$| = 1; $| = 0; # Flush
@@ -1164,7 +1166,7 @@
my ($oldLrev, $oldLusr) = ("", "");
my ($revprint, $usrprint);
if ($annTable) {
- print "<table border=0 cellspacing=0 cellpadding=0>\n";
+ print "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
}
else {
print "<pre>";
@@ -1331,7 +1333,7 @@
http_header();
navigateHeader ($scriptwhere, $pathname, $filename, $revision, "view");
- print "<HR noshade>";
+ print "<hr noshade>";
print "<table width=\"100%\"><tr><td bgcolor=\"$markupLogColor\">";
print "File: ", &clickablePath($where, 1);
print " ";
@@ -1341,32 +1343,32 @@
&download_link(urlencode($fileurl), $revision, "(as text)",
"text/plain");
}
- print "<BR>\n";
+ print "<br>\n";
if ($show_log_in_markup) {
readLog($fullname); #,$revision);
printLog($revision, 0);
}
else {
- print "Version: <B>$revision</B><BR>\n";
- print "Tag: <B>", $input{only_with_tag}, "</b><br>\n" if
+ print "Version: <b>$revision</b><br>\n";
+ print "Tag: <b>", $input{only_with_tag}, "</b><br>\n" if
$input{only_with_tag};
}
print "</td></tr></table>";
my @content = <$filehandle>;
my $url = download_url($fileurl, $revision, $mimetype);
- print "<HR noshade>";
+ print "<hr noshade>";
if ($mimetype =~ /^image/) {
- print "<IMG SRC=\"$url$barequery\"><BR>";
+ print "<img src=\"$url$barequery\"><br>";
}
elsif ($mimetype =~ m%^application/pdf%) {
- print "<EMBED SRC=\"$url$barequery\" WIDTH=\"100%\"><BR>";
+ print "<embed src=\"$url$barequery\" width=\"100%\"><br>";
}
else {
- print "<PRE>";
+ print "<pre>";
foreach (@content) {
print spacedHtmlText($_);
}
- print "</PRE>";
+ print "</pre>";
}
}
@@ -1893,7 +1895,7 @@
}
$revsym{$rev} .= ", " if ($revsym{$rev});
$revsym{$rev} .= $_;
- $sel .= "<OPTION VALUE=\"${rev}:${_}\">$_\n";
+ $sel .= "<option value=\"${rev}:${_}\">$_\n";
}
print "Done associating revisions with branches\n" if ($verbose);
@@ -1988,7 +1990,7 @@
# Plus a select link if enabled, and this version isn't selected
if ($allow_version_select) {
if ((!defined($input{"r1"}) || $input{"r1"} ne $_)) {
- print " - <A HREF=\"${scriptwhere}?r1=$_$barequery" .
+ print " - <a href=\"${scriptwhere}?r1=$_$barequery" .
"\">[select for diffs]</A>\n";
}
else {
@@ -1997,7 +1999,7 @@
}
}
else {
- print "Revision <B>$_</B>";
+ print "Revision <b>$_</b>";
}
if (/^1\.1\.1\.\d+$/) {
print " <i>(vendor branch)</i>";
@@ -2011,15 +2013,15 @@
print readableTime(time() - $date{$_}, 1) . " ago)";
print " by ";
print "<i>" . $author{$_} . "</i>\n";
- print "<BR>Branch: <b>",
+ print "<br>Branch: <b>",
($link ? link_tags($revsym{$br}) : $revsym{$br}),
"</b>\n"
if ($revsym{$br});
- print "<BR>CVS Tags: <b>",
+ print "<br>CVS Tags: <b>",
($link ? link_tags($revsym{$_}) : $revsym{$_}),
"</b>"
if ($revsym{$_});
- print "<BR>Branch point for: <b>",
+ print "<br>Branch point for: <b>",
($link ? link_tags($branchpoint{$_}) : $branchpoint{$_}),
"</b>\n"
if ($branchpoint{$_});
@@ -2035,25 +2037,25 @@
} until (defined($date{$prev}) || $prev eq "");
if ($prev ne "") {
if ($difflines{$_}) {
- print "<BR>Changes since <b>$prev: $difflines{$_} lines</b>";
+ print "<br>Changes since <b>$prev: $difflines{$_} lines</b>";
}
}
if ($isDead) {
- print "<BR><B><I>FILE REMOVED</I></B>\n";
+ print "<br><b><i>FILE REMOVED</i></b>\n";
}
elsif ($link) {
my %diffrev = ();
$diffrev{$_} = 1;
$diffrev{""} = 1;
- print "<BR>Diff";
+ print "<br>Diff";
#
# Offer diff to previous revision
if ($prev) {
$diffrev{$prev} = 1;
- print " to previous <A HREF=\"${scriptwhere}.diff?r1=$prev";
+ print " to previous <a href=\"${scriptwhere}.diff?r1=$prev";
print "&r2=$_" . $barequery . "\">$prev</A>\n";
if (!$hr_default) { # offer a human readable version if not default
- print "(<A HREF=\"${scriptwhere}.diff?r1=$prev";
+ print "(<a href=\"${scriptwhere}.diff?r1=$prev";
print "&r2=$_" . $barequery . "&f=h\">colored</A>)\n";
}
}
@@ -2061,10 +2063,10 @@
# Plus, if it's on a branch, and it's not a vendor branch,
# offer a diff with the branch point.
if ($revsym{$brp} && !/^1\.1\.1\.\d+$/ && !defined($diffrev{$brp})) {
- print " to branchpoint <A HREF=\"${scriptwhere}.diff?r1=$brp";
+ print " to branchpoint <a href=\"${scriptwhere}.diff?r1=$brp";
print "&r2=$_" . $barequery . "\">$brp</A>\n";
if (!$hr_default) { # offer a human readable version if not default
- print "(<A HREF=\"${scriptwhere}.diff?r1=$brp";
+ print "(<a href=\"${scriptwhere}.diff?r1=$brp";
print "&r2=$_" . $barequery . "&f=h\">colored</A>)\n";
}
}
@@ -2091,11 +2093,11 @@
}
if (!defined($diffrev{$nextmain})) {
$diffrev{$nextmain} = 1;
- print " next main <A HREF=\"${scriptwhere}.diff?r1=$nextmain";
+ print " next main <a href=\"${scriptwhere}.diff?r1=$nextmain";
print "&r2=$_" . $barequery .
"\">$nextmain</A>\n";
if (!$hr_default) { # offer a human readable version if not default
- print "(<A HREF=\"${scriptwhere}.diff?r1=$nextmain";
+ print "(<a href=\"${scriptwhere}.diff?r1=$nextmain";
print "&r2=$_" . $barequery .
"&f=h\">colored</A>)\n";
}
@@ -2105,18 +2107,18 @@
# to make a diff to that revision
if (defined($input{"r1"}) && !defined($diffrev{$input{"r1"}})) {
$diffrev{$input{"r1"}} = 1;
- print " to selected <A HREF=\"${scriptwhere}.diff?"
+ print " to selected <a href=\"${scriptwhere}.diff?"
. "r1=$input{'r1'}&r2=$_" . $barequery
. "\">$input{'r1'}</A>\n";
if (!$hr_default) { # offer a human readable version if not default
- print "(<A HREF=\"${scriptwhere}.diff?r1=$input{'r1'}";
+ print "(<a href=\"${scriptwhere}.diff?r1=$input{'r1'}";
print "&r2=$_" . $barequery .
"&f=h\">colored</A>)\n";
}
}
}
- print "<PRE>\n";
+ print "<pre>\n";
print &htmlify($log{$_});
print "</PRE>\n";
}
@@ -2133,8 +2135,8 @@
$backurl = $scriptname . "/" . urlencode($upwhere) . $query;
print &link($backicon, "$backurl#$filename"),
" <b>Up to ", &clickablePath($upwhere, 1), "</b><p>\n";
- print "<A HREF=\"#diff\">Request diff between arbitrary revisions</A>\n";
- print "<HR NOSHADE>\n";
+ print "<a href=\"#diff\">Request diff between arbitrary revisions</A>\n";
+ print "<hr noshade>\n";
if ($curbranch) {
print "Default branch: ";
print ($revsym{$curbranch} || $curbranch);
@@ -2142,43 +2144,43 @@
else {
print "No default branch";
}
- print "<BR>\n";
+ print "<br>\n";
if ($input{only_with_tag}) {
- print "Current tag: $input{only_with_tag}<BR>\n";
+ print "Current tag: $input{only_with_tag}<br>\n";
}
undef %nameprinted;
for (my $i = 0; $i <= $#revdisplayorder; $i++) {
- print "<HR size=1 NOSHADE>";
+ print "<hr size=\"1\" noshade>";
printLog($revdisplayorder[$i]);
}
- print "<HR NOSHADE>";
- print "<A NAME=diff>\n";
+ print "<hr noshade>";
+ print "<a name=\"diff\">\n";
print "This form allows you to request diff's between any two\n";
print "revisions of a file. You may select a symbolic revision\n";
print "name using the selection box or you may type in a numeric\n";
print "name using the type-in text box.\n";
- print "</A><P>\n";
- print "<FORM METHOD=\"GET\" ACTION=\"${scriptwhere}.diff\" NAME=\"diff_select\">\n";
+ print "</a><p>\n";
+ print "<form method=\"GET\" action=\"${scriptwhere}.diff\" name=\"diff_select\">\n";
foreach (@stickyvars) {
- print "<INPUT TYPE=HIDDEN NAME=\"$_\" VALUE=\"$input{$_}\">\n"
+ print "<input type=\"hidden\" name=\"$_\" value=\"$input{$_}\">\n"
if (defined($input{$_})
&& ((!defined($DEFAULTVALUE{$_})
|| $input{$_} ne $DEFAULTVALUE{$_})
&& $input{$_} ne ""));
}
print "Diffs between \n";
- print "<SELECT NAME=\"r1\">\n";
- print "<OPTION VALUE=\"text\" SELECTED>Use Text Field\n";
+ print "<select name=\"r1\">\n";
+ print "<option value=\"text\" selected>Use Text Field\n";
print $sel;
print "</SELECT>\n";
$diffrev = $revdisplayorder[$#revdisplayorder];
$diffrev = $input{"r1"} if (defined($input{"r1"}));
- print "<INPUT TYPE=\"TEXT\" SIZE=\"$inputTextSize\" NAME=\"tr1\" VALUE=\"$diffrev\" onChange='document.diff_select.r1.selectedIndex=0'>\n";
+ print "<input type=\"text\" size=\"$inputTextSize\" name=\"tr1\" value=\"$diffrev\" onChange='document.diff_select.r1.selectedIndex=0'>\n";
print " and \n";
- print "<SELECT NAME=\"r2\">\n";
+ print "<select name=\"r2\">\n";
print "<OPTION VALUE=\"text\" SELECTED>Use Text Field\n";
print $sel;
print "</SELECT>\n";
@@ -2442,7 +2444,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<HTML>\n<HEAD>\n";
- print '<!-- Versionary $Revision: 1.5 $ -->';
+ print '<!-- Versionary $Revision: 1.6 $ -->';
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$backcolor\">\n";
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
@@ -2800,7 +2802,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.5 $';
+ my $version = '$Revision: 1.6 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
From: Ken C. <co...@us...> - 2001-12-20 22:39:59
|
coar 01/12/20 14:39:59
Modified: . versionary.cgi
Log:
Try to defend against the 'nothing matches tag ()' errors
Revision Changes Path
1.5 +33 -16 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- versionary.cgi 2001/12/20 22:29:06 1.4
+++ versionary.cgi 2001/12/20 22:39:59 1.5
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.4 2001/12/20 22:29:06 coar Exp $
+# $Id: versionary.cgi,v 1.5 2001/12/20 22:39:59 coar Exp $
#
###
require 5.000;
@@ -161,7 +161,7 @@
# Check if the zlib C library interface is installed, and if yes
# we can avoid using the extra gzip process.
eval {
- require Compress::Zlib;
+ require Compress::Zlib;
};
$has_zlib = !$@;
@@ -197,10 +197,10 @@
# Turn off gzip if running under mod_perl and no zlib is available,
# piping does not work as expected inside the server.
$maycompress = (((defined($ENV{'HTTP_ACCEPT_ENCODING'})
- && $ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip|)
- || $Browser =~ m%^Mozilla/3%)
- && ($Browser !~ m/MSIE/)
- && !(defined($ENV{'MOD_PERL'}) && !$has_zlib));
+ && $ENV{'HTTP_ACCEPT_ENCODING'} =~ m|gzip|)
+ || $Browser =~ m%^Mozilla/3%)
+ && ($Browser !~ m/MSIE/)
+ && !(defined($ENV{'MOD_PERL'}) && !$has_zlib));
# put here the variables we need in order
# to hold our state - they will be added (with
@@ -237,8 +237,7 @@
$input{only_with_tag} = $input{only_on_branch}
if (defined($input{only_on_branch}));
-foreach (keys %DEFAULTVALUE)
-{
+foreach (keys %DEFAULTVALUE) {
# replace not given parameters with the default parameters
if (!defined($input{$_}) || $input{$_} eq "") {
# Empty Checkboxes in forms return -- nothing. So we define a helper
@@ -262,8 +261,8 @@
$barequery = "";
foreach (@stickyvars) {
# construct a query string with the sticky non default parameters set
- if (defined($input{$_}) && ($input{$_} ne "") &&
- (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) {
+ if (defined($input{$_}) && ($input{$_} ne "")
+ && (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) {
if ($barequery) {
$barequery = $barequery . "&";
}
@@ -311,8 +310,8 @@
## Default CVS-Tree
if (!defined($CVSROOT{$cvstreedefault})) {
&fatal("500 Internal Error",
- "<code>\$cvstreedefault</code> points to a repository ($cvstreedefault)"
- . "not defined in <code>%CVSROOT</code> "
+ "<code>\$cvstreedefault</code> points to a repository "
+ . "($cvstreedefault) not defined in <code>%CVSROOT</code> "
. "(edit your configuration file $config)");
}
$cvstree = $cvstreedefault;
@@ -1464,8 +1463,26 @@
}
}
if (! open($fh, "-|")) { # child
- open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
- exec("rcsdiff", @difftype, "-r$rev1", "-r$rev2", $fullname);
+ #
+ # We'll display anomalous results if we exec rcsdiff and it
+ # isn't in the path.. defend against such nonsense.
+ #
+ my $rcsdiff;
+ foreach (split(/:/, $ENV{PATH})) {
+ if (-x "$_/rcsdiff") {
+ $rcsdiff = "$_/rcsdiff";
+ last;
+ }
+ }
+ if (! $rcsdiff) {
+ &fatal("500 Internal Server Error",
+ "<p>\n<code>rcsdiff</code> not found in "
+ . "<code>" . $ENV{'PATH'} . "</code>\n</p>\n");
+ }
+ else {
+ open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
+ exec("rcsdiff", @difftype, "-r$rev1", "-r$rev2", $fullname);
+ }
}
if ($human_readable) {
http_header();
@@ -2425,7 +2442,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<HTML>\n<HEAD>\n";
- print '<!-- Versionary $Revision: 1.4 $ -->';
+ print '<!-- Versionary $Revision: 1.5 $ -->';
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$backcolor\">\n";
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
@@ -2783,7 +2800,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.4 $';
+ my $version = '$Revision: 1.5 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
From: Ken C. <co...@us...> - 2001-12-20 22:29:07
|
coar 01/12/20 14:29:06
Modified: . versionary.cgi
Log:
Spaces after commas..
Revision Changes Path
1.4 +129 -107 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- versionary.cgi 2001/12/10 22:16:26 1.3
+++ versionary.cgi 2001/12/20 22:29:06 1.4
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.3 2001/12/10 22:16:26 coar Exp $
+# $Id: versionary.cgi,v 1.4 2001/12/20 22:29:06 coar Exp $
#
###
require 5.000;
@@ -329,12 +329,13 @@
# create icons out of description
foreach my $k (keys %ICONS) {
no strict 'refs';
- my ($itxt,$ipath,$iwidth,$iheight) = @{$ICONS{$k}};
+ my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}};
if ($ipath) {
- $ {"${k}icon"} = "<IMG SRC=\"$ipath\" ALT=\"$itxt\" BORDER=\"0\" WIDTH=\"$iwidth\" HEIGHT=\"$iheight\">";
+ ${"${k}icon"} = "<IMG SRC=\"$ipath\" ALT=\"$itxt\" "
+ . "BORDER=\"0\" WIDTH=\"$iwidth\" HEIGHT=\"$iheight\">";
}
else {
- $ {"${k}icon"} = $itxt;
+ ${"${k}icon"} = $itxt;
}
}
@@ -376,7 +377,10 @@
}
if (!-d $cvsroot) {
- &fatal("500 Internal Error",'$CVSROOT not found!<P>The server on which the CVS tree lives is probably down. Please try again in a few minutes.');
+ &fatal("500 Internal Error",
+ '$CVSROOT not found!'
+ . '<P>The server on which the CVS tree lives is probably down. '
+ . 'Please try again in a few minutes.');
}
#
@@ -392,12 +396,12 @@
###############################
elsif (-d $fullname) {
my $dh = do {local(*DH);};
- opendir($dh, $fullname) || &fatal("404 Not Found","$where: $!");
+ opendir($dh, $fullname) || &fatal("404 Not Found", "$where: $!");
my @dir = readdir($dh);
closedir($dh);
my @subLevelFiles = findLastModifiedSubdirs(@dir)
if ($show_subdir_lastmod);
- getDirLogs($cvsroot,$where,@subLevelFiles);
+ getDirLogs($cvsroot, $where, @subLevelFiles);
if ($where eq '/') {
html_header("$defaulttitle");
@@ -412,7 +416,7 @@
if (($use_descriptions) && open (DESC, "<$cvsroot/CVSROOT/descriptions")) {
while (<DESC>) {
chomp;
- my ($dir,$description) = /(\S+)\s+(.*)/;
+ my ($dir, $description) = /(\S+)\s+(.*)/;
$descriptions{$dir} = $description;
}
}
@@ -424,7 +428,8 @@
chooseCVSRoot();
}
else {
- print "<p>Current directory: <b>", &clickablePath($where,0), "</b>\n";
+ print "<p>Current directory: <b>", &clickablePath($where, 0),
+ "</b>\n";
print "<P>Current tag: <B>", $input{only_with_tag}, "</b>\n" if
$input{only_with_tag};
@@ -448,7 +453,7 @@
print "<tr><th align=left bgcolor=\"" . (($byfile) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery("sortby","file") .
+ print "<a href=\"./" . &toggleQuery("sortby", "file") .
"#dirlist\">" if (!$byfile);
print "File";
print "</a>" if (!$byfile);
@@ -460,7 +465,7 @@
print "<th align=left bgcolor=\"" . (($byrev) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby","rev") .
+ print "<a href=\"./" . &toggleQuery ("sortby", "rev") .
"#dirlist\">" if (!$byrev);
print "Rev.";
print "</a>" if (!$byrev);
@@ -469,7 +474,7 @@
print "<th align=left bgcolor=\"" . (($bydate) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby","date") .
+ print "<a href=\"./" . &toggleQuery ("sortby", "date") .
"#dirlist\">" if (!$bydate);
print "Age";
print "</a>" if (!$bydate);
@@ -479,7 +484,7 @@
print "<th align=left bgcolor=\"" . (($byauthor) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
- print "<a href=\"./" . &toggleQuery ("sortby","author") .
+ print "<a href=\"./" . &toggleQuery ("sortby", "author") .
"#dirlist\">" if (!$byauthor);
print "Author";
print "</a>" if (!$byauthor);
@@ -489,7 +494,7 @@
print "<th align=left bgcolor=\"" . (($bylog) ?
$columnHeaderColorSorted :
$columnHeaderColorDefault) . "\">";
- print "<a href=\"./", toggleQuery("sortby","log"), "#dirlist\">" if (!$bylog);
+ print "<a href=\"./", toggleQuery("sortby", "log"), "#dirlist\">" if (!$bylog);
print "Last log entry";
print "</a>" if (!$bylog);
print "</th>";
@@ -558,8 +563,8 @@
if ($_ eq '..' || -d "$fullname/$_") {
next if ($_ eq '..' && $where eq '/');
- my ($rev,$date,$log,$author,$filename);
- ($rev,$date,$log,$author,$filename) = @{$fileinfo{$_}}
+ my ($rev, $date, $log, $author, $filename);
+ ($rev, $date, $log, $author, $filename) = @{$fileinfo{$_}}
if (defined($fileinfo{$_}));
print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);
if ($_ eq '..') {
@@ -568,9 +573,9 @@
print $backicon;
}
else {
- print &link($backicon,$url);
+ print &link($backicon, $url);
}
- print " ", &link("Previous Directory",$url);
+ print " ", &link("Previous Directory", $url);
}
else {
$url = urlencode($_) . '/' . $query;
@@ -579,7 +584,7 @@
print $diricon;
}
else {
- print &link($diricon,$url);
+ print &link($diricon, $url);
}
print " ", &link($_ . "/", $url), $attic;
if ($_ eq "Attic") {
@@ -592,7 +597,8 @@
if ($filename) {
print "</td><td> </td><td> " if ($dirtable);
if ($date) {
- print " <i>" . readableTime(time() - $date,0) . "</i>";
+ print " <i>" . readableTime(time() - $date, 0)
+ . "</i>";
}
if ($show_author) {
print "</td><td> " if ($dirtable);
@@ -604,7 +610,7 @@
print "<BR>" if ($dirtable);
if ($log) {
print " <font size=-1>"
- . &htmlify(substr($log,0,$shortLogLen));
+ . &htmlify(substr($log, 0, $shortLogLen));
if (length $log > 80) {
print "...";
}
@@ -643,7 +649,7 @@
my $author = '';
$filesexists++;
next if (!defined($fileinfo{$_}));
- ($rev,$date,$log,$author) = @{$fileinfo{$_}};
+ ($rev, $date, $log, $author) = @{$fileinfo{$_}};
$filesfound++;
print "<tr bgcolor=\"" . @tabcolors[$dirrow%2] . "\"><td>" if ($dirtable);
print "<A NAME=\"$_\"></A>";
@@ -651,7 +657,7 @@
print $fileicon;
}
else {
- print &link($fileicon,$url);
+ print &link($fileicon, $url);
}
print " ", &link($_, $url), $attic;
print "</td><td> " if ($dirtable);
@@ -660,7 +666,7 @@
$defaultViewable ? "text/x-versionary-markup" : undef);
print "</td><td> " if ($dirtable);
if ($date) {
- print " <i>" . readableTime(time() - $date,0) . "</i>";
+ print " <i>" . readableTime(time() - $date, 0) . "</i>";
}
if ($show_author) {
print "</td><td> " if ($dirtable);
@@ -668,7 +674,8 @@
}
print "</td><td> " if ($dirtable);
if ($log) {
- print " <font size=-1>" . &htmlify(substr($log,0,$shortLogLen));
+ print " <font size=-1>"
+ . &htmlify(substr($log, 0, $shortLogLen));
if (length $log > 80) {
print "...";
}
@@ -714,9 +721,11 @@
print ">";
print "<OPTION VALUE=\"\">All tags / default branch\n";
foreach my $tag (reverse sort { lc $a cmp lc $b } keys %tags) {
- print "<OPTION",defined($input{only_with_tag}) &&
- $input{only_with_tag} eq $tag ? " SELECTED":"",
- ">$tag\n";
+ print "<OPTION",
+ (defined($input{only_with_tag})
+ && ($input{only_with_tag} eq $tag)
+ ? " SELECTED" : "",
+ ">$tag\n";
}
print "</SELECT>\n";
print "<INPUT TYPE=SUBMIT VALUE=\"Go\">\n";
@@ -735,17 +744,23 @@
print "<tr bgcolor=\"$columnHeaderColorDefault\"><th colspan=2>Preferences</th></tr>";
print "<tr><td>Sort files by <SELECT name=\"sortby\">";
print "<OPTION VALUE=\"\">File";
- print "<OPTION",$bydate ? " SELECTED" : ""," VALUE=date>Age";
- print "<OPTION",$byauthor ? " SELECTED" : ""," VALUE=author>Author"
+ print "<OPTION", ($bydate ? " SELECTED" : ""), " VALUE=date>Age";
+ print "<OPTION",
+ ($byauthor ? " SELECTED" : ""),
+ " VALUE=author>Author"
if ($show_author);
- print "<OPTION",$byrev ? " SELECTED" : ""," VALUE=rev>Revision";
- print "<OPTION",$bylog ? " SELECTED" : ""," VALUE=log>Log message";
+ print "<OPTION",
+ ($byrev ? " SELECTED" : ""),
+ " VALUE=rev>Revision";
+ print "<OPTION",
+ ($bylog ? " SELECTED" : ""),
+ " VALUE=log>Log message";
print "</SELECT></td>";
print "<td>revisions by: \n";
print "<SELECT NAME=logsort>\n";
- print "<OPTION VALUE=cvs",$logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
- print "<OPTION VALUE=date",$logsort eq "date" ? " SELECTED" : "", ">Commit date";
- print "<OPTION VALUE=rev",$logsort eq "rev" ? " SELECTED" : "", ">Revision";
+ print "<OPTION VALUE=cvs", $logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
+ print "<OPTION VALUE=date", $logsort eq "date" ? " SELECTED" : "", ">Commit date";
+ print "<OPTION VALUE=rev", $logsort eq "rev" ? " SELECTED" : "", ">Revision";
print "</SELECT></td></tr>";
print "<tr><td>Diff format: ";
printDiffSelect(0);
@@ -832,7 +847,7 @@
}
}
}
- &fatal("404 Not Found","$where: no such file or directory");
+ &fatal("404 Not Found", "$where: no such file or directory");
}
gzipclose();
@@ -845,11 +860,11 @@
print "<SELECT NAME=\"f\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">\n";
- print "<OPTION VALUE=h",$f eq "h" ? " SELECTED" : "", ">Colored Diff";
- print "<OPTION VALUE=H",$f eq "H" ? " SELECTED" : "", ">Long Colored Diff";
- print "<OPTION VALUE=u",$f eq "u" ? " SELECTED" : "", ">Unidiff";
- print "<OPTION VALUE=c",$f eq "c" ? " SELECTED" : "", ">Context Diff";
- #print "<OPTION VALUE=s",$f eq "s" ? " SELECTED" : "", ">Side by Side";
+ print "<OPTION VALUE=h", $f eq "h" ? " SELECTED" : "", ">Colored Diff";
+ print "<OPTION VALUE=H", $f eq "H" ? " SELECTED" : "", ">Long Colored Diff";
+ print "<OPTION VALUE=u", $f eq "u" ? " SELECTED" : "", ">Unidiff";
+ print "<OPTION VALUE=c", $f eq "c" ? " SELECTED" : "", ">Context Diff";
+ #print "<OPTION VALUE=s", $f eq "s" ? " SELECTED" : "", ">Side by Side";
print "</SELECT>";
}
@@ -867,7 +882,7 @@
my ($lastmodtime) = undef;
my $dh = do {local(*DH);};
- opendir($dh,$dir) || next;
+ opendir($dh, $dir) || next;
my (@filenames) = readdir($dh);
closedir($dh);
@@ -947,7 +962,7 @@
my($rev1, $rev2) = @_;
my(@r1) = split(/\./, $rev1);
my(@r2) = split(/\./, $rev2);
- my($a,$b);
+ my($a, $b);
while (($a = shift(@r1)) && ($b = shift(@r2))) {
if ($a != $b) {
@@ -1075,7 +1090,7 @@
http_header();
- navigateHeader ($scriptwhere,$pathname,$filename,$rev, "annotate");
+ navigateHeader ($scriptwhere, $pathname, $filename, $rev, "annotate");
print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";
# this seems to be necessary
@@ -1112,7 +1127,8 @@
# The protocol requires us to fully fake a working directory (at
# least to the point of including the directories down to the one
# containing the file in question).
- # So if $where is "dir/sdir/file", then @dirs will be ("dir","sdir","file")
+ # So if $where is "dir/sdir/file", then @dirs will be
+ # ("dir", "sdir", "file")
my @dirs = split('/', $where);
my $path = "";
foreach (@dirs) {
@@ -1213,7 +1229,7 @@
###############################
sub doCheckout($$) {
my ($fullname, $rev) = @_;
- my ($mimetype,$revopt);
+ my ($mimetype, $revopt);
my $fh = do {local(*FH);};
if ($rev eq 'HEAD' || $rev eq '.') {
@@ -1243,7 +1259,7 @@
if (defined($rev)) {
$revopt = "-r$rev";
if ($use_moddate) {
- readLog($fullname,$rev);
+ readLog($fullname, $rev);
$moddate=$date{$rev};
}
}
@@ -1306,7 +1322,7 @@
}
sub versionaryMarkup($$$) {
- my ($filehandle,$fullname,$revision) = @_;
+ my ($filehandle, $fullname, $revision) = @_;
my ($pathname, $filename);
($pathname = $where) =~ s/(Attic\/)?[^\/]*$//;
@@ -1329,7 +1345,7 @@
print "<BR>\n";
if ($show_log_in_markup) {
readLog($fullname); #,$revision);
- printLog($revision,0);
+ printLog($revision, 0);
}
else {
print "Version: <B>$revision</B><BR>\n";
@@ -1403,7 +1419,7 @@
# rev1 and rev2 are now both numeric revisions.
# Thus we do a DWIM here and swap them if rev1 is after rev2.
# XXX should we warn about the fact that we do this?
- if (&revcmp($rev1,$rev2) > 0) {
+ if (&revcmp($rev1, $rev2) > 0) {
my ($tmp1, $tmp2) = ($rev1, $sym1);
($rev1, $sym1) = ($rev2, $sym2);
($rev2, $sym2) = ($tmp1, $tmp2);
@@ -1449,7 +1465,7 @@
}
if (! open($fh, "-|")) { # child
open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
- exec("rcsdiff",@difftype,"-r$rev1","-r$rev2",$fullname);
+ exec("rcsdiff", @difftype, "-r$rev1", "-r$rev2", $fullname);
}
if ($human_readable) {
http_header();
@@ -1509,8 +1525,8 @@
# Show Logs ..
###############################
sub getDirLogs($$@) {
- my ($cvsroot,$dirname,@otherFiles) = @_;
- my ($state,$otherFiles,$tag, $file, $date, $branchpoint, $branch, $log);
+ my ($cvsroot, $dirname, @otherFiles) = @_;
+ my ($state, $otherFiles, $tag, $file, $date, $branchpoint, $branch, $log);
my ($rev, $revision, $revwanted, $filename, $head, $author);
$tag = $input{only_with_tag};
@@ -1534,14 +1550,14 @@
#can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog..
if (! open($fh, "-|")) {
open(STDERR, "> /dev/null"); # rlog may complain; ignore.
- exec("rlog",@files);
+ exec("rlog", @files);
}
}
else {
my $kidpid = open($fh, "-|");
if (! $kidpid) {
open(STDERR, "> /dev/null"); # rlog may complain; ignore.
- exec("rlog","-r",@files);
+ exec("rlog", "-r", @files);
}
}
$state = "start";
@@ -1633,7 +1649,7 @@
defined($branchpoint) ? $rev eq $branchpoint :
0 && ($rev eq $head)) { # Don't think head is needed here..
print "File info $rev found for $filename\n" if ($verbose);
- my @finfo = ($rev,$date,$log,$author,$filename);
+ my @finfo = ($rev, $date, $log, $author, $filename);
my ($name);
($name = $filename) =~ s%/.*%%;
$fileinfo{$name} = [ @finfo ];
@@ -1649,7 +1665,7 @@
if ($yr > 100) {
$yr -= 1900;
}
- $date = &Time::Local::timegm($6,$5,$4,$3,$2 - 1,$yr);
+ $date = &Time::Local::timegm($6, $5, $4, $3, $2 - 1, $yr);
($author) = /author: ([^;]+)/;
$state = "log";
$log = '';
@@ -1676,7 +1692,7 @@
}
sub readLog($;$) {
- my($fullname,$revision) = @_;
+ my($fullname, $revision) = @_;
my ($symnames, $head, $rev, $br, $brp, $branch, $branchrev);
my $fh = do {local(*FH);};
@@ -1699,10 +1715,10 @@
print("Going to rlog '$fullname'\n") if ($verbose);
if (! open($fh, "-|")) { # child
if ($revision ne '') {
- exec("rlog",$revision,$fullname);
+ exec("rlog", $revision, $fullname);
}
else {
- exec("rlog",$fullname);
+ exec("rlog", $fullname);
}
}
while (<$fh>) {
@@ -1743,7 +1759,7 @@
print "R:", $_ if ($verbose);
if (/^revision ([\d\.]+)/) {
$rev = $1;
- unshift(@allrevisions,$rev);
+ unshift(@allrevisions, $rev);
}
elsif (/^========/ || /^----------------------------$/) {
next logentry;
@@ -1757,7 +1773,7 @@
# these lines since we don't know what revision they go with
# any more.
next logentry;
-# &fatal("500 Internal Error","Error parsing RCS output: $_");
+# &fatal("500 Internal Error", "Error parsing RCS output: $_");
}
$_ = <$fh>;
print "D:", $_ if ($verbose);
@@ -1767,7 +1783,7 @@
if ($yr > 100) {
$yr -= 1900;
}
- $date{$rev} = &Time::Local::timegm($6,$5,$4,$3,$2 - 1,$yr);
+ $date{$rev} = &Time::Local::timegm($6, $5, $4, $3, $2 - 1, $yr);
$author{$rev} = $7;
$state{$rev} = $8;
$difflines{$rev} = $10;
@@ -1787,8 +1803,8 @@
close($fh);
print "Done reading RCS file\n" if ($verbose);
- @revorder = reverse sort {revcmp($a,$b)} @allrevisions;
- print "Done sorting revisions",join(" ",@revorder),"\n" if ($verbose);
+ @revorder = reverse sort {revcmp($a, $b)} @allrevisions;
+ print "Done sorting revisions", join(" ", @revorder), "\n" if ($verbose);
#
# HEAD is an artificial tag which is simply the highest tag number on the main
@@ -1874,7 +1890,7 @@
$onlybranchpoint = $onlyonbranch;
}
if (!defined($onlyonbranch) || $onlybranchpoint eq "") {
- fatal("404 Tag not found","Tag $input{'only_with_tag'} not defined");
+ fatal("404 Tag not found", "Tag $input{'only_with_tag'} not defined");
}
}
@@ -1885,7 +1901,7 @@
($brp = $br) =~ s/\.\d+$//;
next if ($onlyonbranch && $br ne $onlyonbranch &&
$_ ne $onlybranchpoint);
- unshift(@revisions,$_);
+ unshift(@revisions, $_);
}
if ($logsort eq "date") {
@@ -1896,7 +1912,7 @@
}
elsif ($logsort eq "rev") {
# Sort the revisions in revision order, highest first
- @revdisplayorder = reverse sort {revcmp($a,$b)} @revisions;
+ @revdisplayorder = reverse sort {revcmp($a, $b)} @revisions;
}
else {
# No sorting. Present in the same order as rlog / cvs log
@@ -1907,7 +1923,7 @@
sub printLog($;$) {
my ($link, $br, $brp);
- ($_,$link) = @_;
+ ($_, $link) = @_;
($br = $_) =~ s/\.\d+$//;
($brp = $br) =~ s/\.?\d+$//;
my ($isDead, $prev);
@@ -1975,14 +1991,20 @@
} else {
print ", <i>" . scalar gmtime($date{$_}) . " UTC</i> (";
}
- print readableTime(time() - $date{$_},1) . " ago)";
+ print readableTime(time() - $date{$_}, 1) . " ago)";
print " by ";
print "<i>" . $author{$_} . "</i>\n";
- print "<BR>Branch: <b>",$link?link_tags($revsym{$br}):$revsym{$br},"</b>\n"
+ print "<BR>Branch: <b>",
+ ($link ? link_tags($revsym{$br}) : $revsym{$br}),
+ "</b>\n"
if ($revsym{$br});
- print "<BR>CVS Tags: <b>",$link?link_tags($revsym{$_}):$revsym{$_},"</b>"
+ print "<BR>CVS Tags: <b>",
+ ($link ? link_tags($revsym{$_}) : $revsym{$_}),
+ "</b>"
if ($revsym{$_});
- print "<BR>Branch point for: <b>",$link?link_tags($branchpoint{$_}):$branchpoint{$_},"</b>\n"
+ print "<BR>Branch point for: <b>",
+ ($link ? link_tags($branchpoint{$_}) : $branchpoint{$_}),
+ "</b>\n"
if ($branchpoint{$_});
# Find the previous revision
my @prevrev = split(/\./, $_);
@@ -2035,7 +2057,7 @@
# (e.g. change gets committed and then brought
# over to -stable)
if (/^\d+\.\d+\.\d+/ && !/^1\.1\.1\.\d+$/) {
- my ($i,$nextmain);
+ my ($i, $nextmain);
for ($i = 0; $i < $#revorder && $revorder[$i] ne $_; $i++){}
my (@tmp2) = split(/\./, $_);
for ($nextmain = ""; $i > 0; $i--) {
@@ -2047,8 +2069,8 @@
}
# Only the highest version on a branch should have
# a diff for the "next main".
- last if ($#tmp1 == $#tmp2 && join(".",@tmp1[0..$#tmp1-1])
- eq join(".",@tmp2[0..$#tmp1-1]));
+ last if ($#tmp1 == $#tmp2 && join(".", @tmp1[0..$#tmp1-1])
+ eq join(".", @tmp2[0..$#tmp1-1]));
}
if (!defined($diffrev{$nextmain})) {
$diffrev{$nextmain} = 1;
@@ -2196,9 +2218,9 @@
print "<SELECT NAME=\"logsort\"";
print " onchange=\"submit()\"" if ($use_java_script);
print ">\n";
- print "<OPTION VALUE=cvs",$logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
- print "<OPTION VALUE=date",$logsort eq "date" ? " SELECTED" : "", ">Commit date";
- print "<OPTION VALUE=rev",$logsort eq "rev" ? " SELECTED" : "", ">Revision";
+ print "<OPTION VALUE=cvs", $logsort eq "cvs" ? " SELECTED" : "", ">Not sorted";
+ print "<OPTION VALUE=date", $logsort eq "date" ? " SELECTED" : "", ">Commit date";
+ print "<OPTION VALUE=rev", $logsort eq "rev" ? " SELECTED" : "", ">Revision";
print "</SELECT>\n";
print "<INPUT TYPE=SUBMIT VALUE=\" Sort \">\n";
print "</FORM>\n";
@@ -2209,7 +2231,7 @@
sub flush_diff_rows ($$$$)
{
my $j;
- my ($leftColRef,$rightColRef,$leftRow,$rightRow) = @_;
+ my ($leftColRef, $rightColRef, $leftRow, $rightRow) = @_;
if (!defined($state)) {
return;
@@ -2247,7 +2269,7 @@
# human_readable_diff(String revision_to_return_to);
##
sub human_readable_diff($){
- my ($i,$difftxt, $where_nd, $filename, $pathname, $scriptwhere_nd);
+ my ($i, $difftxt, $where_nd, $filename, $pathname, $scriptwhere_nd);
my ($fh, $rev) = @_;
my ($date1, $date2, $r1d, $r2d, $r1r, $r2r, $rev1, $rev2, $sym1, $sym2);
my (@rightCol, @leftCol);
@@ -2261,8 +2283,8 @@
# Read header to pick up read revision and date, if possible
while (<$fh>) {
- ($r1d,$r1r) = /\t(.*)\t(.*)$/ if (/^--- /);
- ($r2d,$r2r) = /\t(.*)\t(.*)$/ if (/^\+\+\+ /);
+ ($r1d, $r1r) = /\t(.*)\t(.*)$/ if (/^--- /);
+ ($r2d, $r2r) = /\t(.*)\t(.*)$/ if (/^\+\+\+ /);
last if (/^\+\+\+ /);
}
if (defined($r1r) && $r1r =~ /^(\d+\.)+\d+$/) {
@@ -2305,7 +2327,7 @@
$difftxt = $_;
if ($difftxt =~ /^@@/) {
- ($oldline,$newline,$funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/;
+ ($oldline, $newline, $funname) = $difftxt =~ /@@ \-([0-9]+).*\+([0-9]+).*@@(.*)/;
print "<tr bgcolor=\"$diffcolorHeading\"><td width=\"50%\">";
print "<table width=\"100%\" border=1 cellpadding=5><tr><td><b>Line $oldline</b>";
print " <font size=-1>$funname</font></td></tr></table>";
@@ -2318,7 +2340,7 @@
$rightRow = 0;
}
else {
- ($diffcode,$rest) = $difftxt =~ /^([-+ ])(.*)/;
+ ($diffcode, $rest) = $difftxt =~ /^([-+ ])(.*)/;
$_ = spacedHtmlText ($rest);
# Add fontface, size
@@ -2386,8 +2408,8 @@
next if ($var eq "f");
next if (defined($DEFAULTVALUE{$var})
&& $DEFAULTVALUE{$var} eq $input{$var});
- print "<INPUT TYPE=HIDDEN NAME=\"",urlencode($var),"\" VALUE=\"",
- urlencode($input{$var}),"\">\n";
+ print "<INPUT TYPE=HIDDEN NAME=\"", urlencode($var), "\" VALUE=\"",
+ urlencode($input{$var}), "\">\n";
}
printDiffSelect($use_java_script);
print "<INPUT TYPE=SUBMIT VALUE=\"Show\">\n";
@@ -2398,18 +2420,18 @@
}
sub navigateHeader ($$$$$) {
- my ($swhere,$path,$filename,$rev,$title) = @_;
+ my ($swhere, $path, $filename, $rev, $title) = @_;
$swhere = "" if ($swhere eq $scriptwhere);
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<HTML>\n<HEAD>\n";
- print '<!-- Versionary $Revision: 1.3 $ -->';
+ print '<!-- Versionary $Revision: 1.4 $ -->';
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$backcolor\">\n";
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
print "<tr valign=bottom><td>";
print "<a href=\"$swhere$query#rev$rev\">$backicon";
- print "</a> <b>Return to ", &link("$filename","$swhere$query#rev$rev")," CVS log";
+ print "</a> <b>Return to ", &link("$filename", "$swhere$query#rev$rev"), " CVS log";
print "</b> $fileicon</td>";
print "<td align=right>$diricon <b>Up to ", &clickablePath($path, 1), "</b></td>";
@@ -2418,7 +2440,7 @@
sub plural_write ($$)
{
- my ($num,$text) = @_;
+ my ($num, $text) = @_;
if ($num != 1) {
$text = $text . "s";
}
@@ -2437,7 +2459,7 @@
##
sub readableTime($$) {
my ($i, $break, $retval);
- my ($secs,$long) = @_;
+ my ($secs, $long) = @_;
# this function works correct for time >= 2 seconds
if ($secs < 2) {
@@ -2482,7 +2504,7 @@
# basename (last directory/file) is a link as well
##
sub clickablePath($$) {
- my ($pathname,$clickLast) = @_;
+ my ($pathname, $clickLast) = @_;
my $retval = '';
if ($pathname eq '/') {
@@ -2554,7 +2576,7 @@
}
sub chooseMirror() {
- my ($mirror,$moremirrors);
+ my ($mirror, $moremirrors);
$moremirrors = 0;
# This code comes from the original BSD-cvsweb
# and may not be useful for your site; If you don't
@@ -2574,13 +2596,13 @@
sub fileSortCmp() {
my ($comp) = 0;
- my ($c,$d,$af,$bf);
+ my ($c, $d, $af, $bf);
($af = $a) =~ s/,v$//;
($bf = $b) =~ s/,v$//;
- my ($rev1,$date1,$log1,$author1,$filename1) = @{$fileinfo{$af}}
+ my ($rev1, $date1, $log1, $author1, $filename1) = @{$fileinfo{$af}}
if (defined($fileinfo{$af}));
- my ($rev2,$date2,$log2,$author2,$filename2) = @{$fileinfo{$bf}}
+ my ($rev2, $date2, $log2, $author2, $filename2) = @{$fileinfo{$bf}}
if (defined($fileinfo{$bf}));
if (defined($filename1) && defined($filename2) && $af eq $filename1 && $bf eq $filename2) {
@@ -2604,7 +2626,7 @@
# make A url for downloading
sub download_url($$$) {
- my ($url,$revision,$mimetype) = @_;
+ my ($url, $revision, $mimetype) = @_;
$revision =~ s/\.0\././;
@@ -2623,8 +2645,8 @@
# Presents a link to download the
# selected revision
sub download_link($$$$) {
- my ($url,$revision,$textlink,$mimetype) = @_;
- my ($fullurl) = download_url($url,$revision,$mimetype);
+ my ($url, $revision, $textlink, $mimetype) = @_;
+ my ($fullurl) = download_url($url, $revision, $mimetype);
my ($paren) = $textlink =~ /^\(/;
$textlink =~ s/^\(// if ($paren);
$textlink =~ s/\)$// if ($paren);
@@ -2669,8 +2691,8 @@
# Returns a Query string with the
# specified parameter toggled
sub toggleQuery($$) {
- my ($toggle,$value) = @_;
- my ($newquery,$var);
+ my ($toggle, $value) = @_;
+ my ($newquery, $var);
my (%vars);
%vars = %input;
if (defined($value)) {
@@ -2761,7 +2783,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.3 $';
+ my $version = '$Revision: 1.4 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
@@ -2783,7 +2805,7 @@
{
my ($tags) = @_;
my ($ret) = "";
- my ($fileurl,$filename);
+ my ($fileurl, $filename);
($filename = $where) =~ s/^.*\///;
$fileurl = urlencode($filename);
@@ -2791,7 +2813,7 @@
foreach my $sym (split(", ", $tags)) {
$ret .= ",\n" if ($ret ne "");
$ret .= "<A HREF=\"$fileurl"
- . toggleQuery('only_with_tag',$sym) . "\">$sym</A>";
+ . toggleQuery('only_with_tag', $sym) . "\">$sym</A>";
}
return $ret."\n";
}
@@ -2846,14 +2868,14 @@
crc => 0,
len => 0,
};
- my ($header) = pack("c10", MAGIC1, MAGIC2, Compress::Zlib::Z_DEFLATED(), 0,0,0,0,0,0, OSCODE);
+ my ($header) = pack("c10", MAGIC1, MAGIC2, Compress::Zlib::Z_DEFLATED(), 0, 0, 0, 0, 0, 0, OSCODE);
print {$o->{handle}} $header;
return bless($o, $class);
}
sub PRINT {
my ($o) = shift;
- my ($buf) = join(defined $, ? $, : "",@_);
+ my ($buf) = join(defined $, ? $, : "", @_);
my ($len) = length($buf);
my ($compressed, $status) = $o->{dh}->deflate($buf);
print {$o->{handle}} $compressed if defined($compressed);
|
|
From: Ken C. <co...@us...> - 2001-12-20 22:13:55
|
coar 01/12/20 14:13:54
Modified: . versionary.conf
Log:
Minor comment tweak
Revision Changes Path
1.4 +3 -3 versionary/versionary.conf
Index: versionary.conf
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- versionary.conf 2001/12/10 22:16:26 1.3
+++ versionary.conf 2001/12/20 22:13:54 1.4
@@ -7,7 +7,7 @@
# (c) 1998-1999 H. Zeller <ze...@th...>
# 1999 H. Nordström <hn...@he...>
# based on work by Bill Fenner <fe...@fr...>
-# $Id: versionary.conf,v 1.3 2001/12/10 22:16:26 coar Exp $
+# $Id: versionary.conf,v 1.4 2001/12/20 22:13:54 coar Exp $
#
###
@@ -50,13 +50,13 @@
# hideattic: Hide or show files in Attic
# 1 Hide files in Attic
# 0 Show files in Attic
-
+ #
"hideattic" => "1",
#
# logactions: Whether to log commands in the CVSROOT/history file
# 1 Normal logging (requires r/w access to the history file
- # by the server user)
+ # by the server user when doing a checkout)
# 0 Don't record activity in the history file
#
"logactions" => "1",
|
|
From: Ken C. <co...@us...> - 2001-12-10 22:16:27
|
coar 01/12/10 14:16:26
Modified: . versionary.cgi versionary.conf
Log:
Fix some typos, and get ready to deal with truly read-only CVS..
Revision Changes Path
1.3 +15 -14 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- versionary.cgi 2001/08/23 11:44:05 1.2
+++ versionary.cgi 2001/12/10 22:16:26 1.3
@@ -43,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.2 2001/08/23 11:44:05 coar Exp $
+# $Id: versionary.cgi,v 1.3 2001/12/10 22:16:26 coar Exp $
#
###
require 5.000;
@@ -59,7 +59,7 @@
$checkoutMagic $doCheckout $scriptname $scriptwhere
$where $Browser $nofilelinks $maycompress @stickyvars
%input $query $barequery $sortby $bydate $byrev $byauthor
- $bylog $byfile $hr_default $logsort $cvstree $cvsroot
+ $bylog $byfile $hr_default $logactions $logsort $cvstree $cvsroot
$mimetype $defaultTextPlain $defaultViewable $allow_compress
$GZIPBIN $backicon $diricon $fileicon $fullname $newname
$cvstreedefault $body_tag $logo $defaulttitle $address
@@ -73,7 +73,7 @@
$extern_window_width $extern_window_height $edit_option_form
$checkout_magic $show_subdir_lastmod $show_log_in_markup $v
$navigationHeaderColor $tableBorderColor $markupLogColor
- $tabstop $state $annTable $sel $curbranch @HideModules @DissallowRead
+ $tabstop $state $annTable $sel $curbranch @HideModules @DisallowRead
$module $use_descriptions %descriptions @mytz $dwhere $moddate
$use_moddate $has_zlib $gzip_open
);
@@ -206,7 +206,7 @@
# to hold our state - they will be added (with
# their current value) to any link/query string
# you construct
-@stickyvars = qw(cvsroot hideattic sortby logsort f only_with_tag);
+@stickyvars = qw(cvsroot hideattic sortby logactions logsort f only_with_tag);
if (-f $config) {
do "$config";
@@ -262,8 +262,8 @@
$barequery = "";
foreach (@stickyvars) {
# construct a query string with the sticky non default parameters set
- if (defined($input{$_}) && ($input{$_} ne "") &&
- (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) {
+ if (defined($input{$_}) && ($input{$_} ne "") &&
+ (!defined($DEFAULTVALUE{$_}) || $input{$_} ne $DEFAULTVALUE{$_})) {
if ($barequery) {
$barequery = $barequery . "&";
}
@@ -1066,7 +1066,7 @@
}
if (&forbidden_file($fullname)) {
- &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DissallowRead");
+ &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead");
return;
}
@@ -1228,7 +1228,7 @@
}
if (&forbidden_file($fullname)) {
- &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DissallowRead");
+ &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead");
return;
}
@@ -1262,8 +1262,9 @@
#
# Safely for a child process to read from.
if (! open($fh, "-|")) { # child
- open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
- exec("cvs", "-d", "$cvsroot", "co", "-p", "$revopt", "$where");
+ my $nohist = ($logactions ? "" : "l");
+ open(STDERR, ">&STDOUT"); # Redirect stderr to stdout
+ exec("cvs", "-d$nohist", "$cvsroot", "co", "-p", "$revopt", "$where");
}
#===================================================================
#Checking out squid/src/ftp.c
@@ -1372,7 +1373,7 @@
my ($rev1, $rev2, $sym1, $sym2, @difftype, $diffname, $f1, $f2);
if (&forbidden_file($fullname)) {
- &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DissallowRead");
+ &fatal("403 Forbidden", "Access forbidden. This file is mentioned in \@DisallowRead");
return;
}
@@ -2402,7 +2403,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<HTML>\n<HEAD>\n";
- print '<!-- Versionary $Revision: 1.2 $ -->';
+ print '<!-- Versionary $Revision: 1.3 $ -->';
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$backcolor\">\n";
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
@@ -2760,7 +2761,7 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.2 $';
+ my $version = '$Revision: 1.3 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
@@ -2806,7 +2807,7 @@
sub forbidden_file($) {
my($file) = @_;
$file =~ s|^.*/||;
- return checkForbidden($file, @DissallowRead);
+ return checkForbidden($file, @DisallowRead);
}
sub checkForbidden($@) {
1.3 +12 -3 versionary/versionary.conf
Index: versionary.conf
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.conf,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- versionary.conf 2001/08/23 18:24:29 1.2
+++ versionary.conf 2001/12/10 22:16:26 1.3
@@ -7,7 +7,7 @@
# (c) 1998-1999 H. Zeller <ze...@th...>
# 1999 H. Nordström <hn...@he...>
# based on work by Bill Fenner <fe...@fr...>
-# $Id: versionary.conf,v 1.2 2001/08/23 18:24:29 coar Exp $
+# $Id: versionary.conf,v 1.3 2001/12/10 22:16:26 coar Exp $
#
###
@@ -53,6 +53,15 @@
"hideattic" => "1",
+ #
+ # logactions: Whether to log commands in the CVSROOT/history file
+ # 1 Normal logging (requires r/w access to the history file
+ # by the server user)
+ # 0 Don't record activity in the history file
+ #
+ "logactions" => "1",
+
+ #
# logsort: Sort order for CVS logs
# date Sort revisions by date
# rev Sort revision by revision number
@@ -217,7 +226,7 @@
# filter. Often, the CVSROOT/passwd is exposed and some people tend
# to check in their .cvspass, though this is a bad idea. These files shouldn't
# be readable by default. Thanks to Damian Gryski to point this out.
-@DissallowRead = ( "\^.cvspass\$", "^passwd\$");
+@DisallowRead = ( "\^.cvspass\$", "^passwd\$");
#
# Use CVSROOT/CVSROOT/descriptions for describing the directories/modules
@@ -253,7 +262,7 @@
$hr_funout = 0;
# ignore whitespaces for human readable diffs
-# (indendation and stuff ..)
+# (indentation and stuff ..)
# ( '-w' option to diff)
$hr_ignwhite = 1;
|
|
From: Ken C. <co...@us...> - 2001-08-30 20:07:14
|
coar 01/08/30 13:07:13
Modified: . README TODO
Log:
More bring-alongs for currency
Revision Changes Path
1.7 +28 -13 versionary/README
Index: README
===================================================================
RCS file: /cvsroot/versionary/versionary/README,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- README 2000/05/30 13:02:00 1.6
+++ README 2001/08/30 20:07:13 1.7
@@ -1,24 +1,39 @@
-The cgi-script cvsweb.cgi is written by Bill Fenner <fe...@fr...>
-(see [1]) for the freebsd project. It allows browsing of
-CVS-repositories (see [2]) with an HTML-browser.
+The original CGI-script cvsweb.cgi was written by
+Bill Fenner <fe...@fr...> (see [1]) for the
+FreeBSD project. It allowed browsing of
+CVS repositories (see [2]) with an HTML browser.
-This version is based on Bill's script and is hacked to fit our needs,
-so don't blame him if anything doesn't work ..
+Henner Zeller took Bill's script and enhanced it,
+and some additional people helped out. It progressed
+to the point that Bill took his original script down
+and pointed the page to Hen's version.
-Added features:
- - a colored side by side diff
+Ken Coar took Henner's cvsweb package and forked it
+to become the Versionary project on SourceForge.
+Earlier forks had occurred and the ViewCVS, cvswebclient,
+and SandWeb SourceForge projects are a result. The
+Versionary fork occurred to allow prototype development
+in the open but not in a working repository (i.e.,
+to avoid polluting Hen's script with experimental
+or broken features or bugs).
+
+Features added in Henner's cvsweb over Bill's script
+(from the README in Henner's package as of the
+Versionary fork):
+
+ - a colored side-by-side diff
- easier navigation
- - mime-type aware checkout which allows for browsing
- of version controlled HTML-pages
+ - MIME-type aware checkout which allows for browsing
+ of version controlled HTML pages
- easier configuration - everything configurable is in one
external file now
- - added cvs-annotate - this requires cvs >= 1.9
- (tested with cvs 1.10)
+ - added cvs-annotate - this requires CVS >= 1.9
+ (tested with CVS 1.10)
- a better way of viewing timestamps: they're shown as age
(something like 'changed 2 days 4 hours ago')
- sorting by filename / age - just click on the corresponding
column
- - urlencodes all filenames so files with spaces and special
+ - URL-encodes all filenames so files with spaces and special
characters in their names are viewable as well.
- selectionbox for choosing different CVS-roots
- overview of last revisionnumber, age and logentry in the
@@ -34,7 +49,7 @@
the browsers state if they accept the Content-encoding gzip..
.. but MSIE lies about this (so cvsweb disables gzip-encoding in this
case).
- - Tag based browsing. An easy and what I think intuitive way to browse a
+ - Tag based browsing. An easy and what Hen thinks intuitive way to browse a
CVS tree based on tags, with filtering of files and CVS logs to only
show whats relevant for the selected tag.
- "Pretty-printed" checkouts for text based files. My intention is to
1.17 +0 -6 versionary/TODO
Index: TODO
===================================================================
RCS file: /cvsroot/versionary/versionary/TODO,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- TODO 1999/09/13 15:29:57 1.16
+++ TODO 2001/08/30 20:07:13 1.17
@@ -2,13 +2,7 @@
o limit the number of logentries shown
o show left/right/up icons in diff/logtable
o implement frames (backbutton on top of page)
-o DiffSelection: jump back to 'User Text Field'
- if entered text (javascript - anyone a javascript
- programmer ?) -
- done, thanks to Andy Sharp <as...@ho...>
o make 'exec's save: use full path and do not spawn shell
-o use strict, Apache: mod_perl; done, thanks to
- Jens-Uwe Mager <ju...@he...>
o explore if we can use cvs directly to abandon the
use of 'rlog', 'rcsdiff'. This could be done much
like it is for cvs annotate;
|
|
From: Ken C. <co...@us...> - 2001-08-23 18:24:30
|
coar 01/08/23 11:24:29
Modified: . versionary.conf
Log:
More changes for the switchover
Revision Changes Path
1.2 +23 -17 versionary/versionary.conf
Index: versionary.conf
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- versionary.conf 2001/08/16 18:01:08 1.1
+++ versionary.conf 2001/08/23 18:24:29 1.2
@@ -1,23 +1,25 @@
# -*-perl-*-
-# Configuration of cvsweb.cgi, the
-# CGI interface to CVS Repositories.
+# Configuration of versionary.cgi, the
+# CGI interface to CVS Repositories based on Henner Zeller's cvsweb.
#
+# Copyright (c) 2001 The Versionary Project
+# based on work by Henner Zeller, Henryk Nordström, et alia.
# (c) 1998-1999 H. Zeller <ze...@th...>
# 1999 H. Nordström <hn...@he...>
# based on work by Bill Fenner <fe...@fr...>
-# $Id: versionary.conf,v 1.1 2001/08/16 18:01:08 coar Exp $
+# $Id: versionary.conf,v 1.2 2001/08/23 18:24:29 coar Exp $
#
###
##############
# CVS Root
##############
-# CVSweb can handle several CVS-Repositories
+# Versionary can handle several CVS-Repositories
# at once. Enter a short symbolic names and the
# full path of these repositories here.
# NOTE that the symbolic names may not contain
# whitespaces.
-# Note, that cvsweb.cgi currently needs to have physical access
+# Note, that versionary.cgi currently needs to have physical access
# to the CVS repository so :pserver:so...@xy...:/data/cvsroot
# won't work!
@@ -68,7 +70,7 @@
# hidecvsroot: Don't show the CVSROOT directory
# 1 Hide CVSROOT directory
# 0 Show CVSROOT directory
- "hidecvsroot" => "0",
+ "hidecvsroot" => "1",
# hidenonreadable: Don't show entries which cannot be read
# 1 Hide non-readable entries
@@ -90,7 +92,9 @@
$defaulttitle = "CVS Repository";
# The address is shown on the footer
-$address = "<font size=-1>CVSweb by <zeller\@think.de></font>";
+$address = "<font size=-1>Versionary by "
+ . "<a href=\"http://Versionary.SourceForce.Net\""
+ . ">The Versionary Project</a>.</font>";
# Default page background color for the diffs
# and annotations
@@ -126,11 +130,14 @@
<a href="http://www.opensource.org/licenses/bsd-license.html">BSD-Licence</a>.
</p>
<p>
-If you would like to use this CGI script on your own web server and
-CVS tree, see Zeller's
-<a href="http://linux.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi"
->CVSweb distribution site</a>. Bill's original script can be found
-<a href="http://www.freebsd.org/~fenner/cvsweb/">here</a>.
+If you would like to use this CGI script on your own Web server and
+CVS tree, see the
+<a href="http://Versionary.SourceForge.Net/"
+>Versionary Project</a> site. Henner Zeller's
+<a href="http://linux.stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/"
+><code>cvsweb</code> derivative</a> of Bill Fenner's
+<a href="http://www.freebsd.org/~fenner/cvsweb/">original script</a>
+is online, although Bill's is not (as the link shows).
</p>
<p>
Please send any suggestions, comments, etc. to
@@ -201,12 +208,11 @@
# nor by explicit path specification. Usually, you don't want to display
# CVSROOT.
#
-@HideModules = (
- "CVSROOT",
+@HideModules = ('CVSROOT'
);
#
-# Files matching this name shouldn't be checked out with cvsweb, since
+# Files matching this name shouldn't be checked out with Versionary, since
# they may contain sensitive information. Simple file name based
# filter. Often, the CVSROOT/passwd is exposed and some people tend
# to check in their .cvspass, though this is a bad idea. These files shouldn't
@@ -275,7 +281,7 @@
##############
# mapping to mimetypes to help
-# cvsweb to guess the correct mime-type on
+# Versionary to guess the correct mime-type on
# checkout; you can use the mime.types from
# apache here:
$mime_types = '/usr/local/web/apache/conf/mime.types';
@@ -370,7 +376,7 @@
# timezone is correctly set.
# @mytz=("EST", "EDT");
-# cvsweb is friendly to caches by indicating a suitable
+# Versionary is friendly to caches by indicating a suitable
# last-modified timestamp. Doing this uses slightly more
# CPU so you might want to disable it if you have a slow
# server
|
|
From: Ken C. <co...@us...> - 2001-08-23 11:44:06
|
coar 01/08/23 04:44:05
Modified: . versionary.cgi
Log:
Turn off perl -T for now; rename stuff to new project name.
Revision Changes Path
1.2 +28 -22 versionary/versionary.cgi
Index: versionary.cgi
===================================================================
RCS file: /cvsroot/versionary/versionary/versionary.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- versionary.cgi 2001/08/16 18:01:08 1.1
+++ versionary.cgi 2001/08/23 11:44:05 1.2
@@ -1,7 +1,10 @@
-#!/usr/bin/perl -wsT
+#! /usr/bin/perl -ws
#
-# cvsweb - a CGI interface to CVS trees.
+# Versionary - a CGI interface to CVS trees.
#
+# Based on the cvsweb tool originally by Bill Fenner and then
+# modified by others (principally Henner Zeller) as shown below.
+#
# Written in their spare time by
# Bill Fenner <fe...@Fr...> (original work)
# extended by Henner Zeller <ze...@th...>,
@@ -40,7 +43,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $Id: versionary.cgi,v 1.1 2001/08/16 18:01:08 coar Exp $
+# $Id: versionary.cgi,v 1.2 2001/08/23 11:44:05 coar Exp $
#
###
require 5.000;
@@ -88,7 +91,7 @@
sub getMimeTypeFromSuffix($);
sub doAnnotate ($$);
sub doCheckout($$);
-sub cvswebMarkup($$$);
+sub versionaryMarkup($$$);
sub viewable($);
sub doDiff($$$$$$);
sub getDirLogs($$@);
@@ -123,7 +126,8 @@
##### Start of Configuration Area ########
# == EDIT this ==
# User configuration is stored in
-$config = $ENV{'CVSWEB_CONFIG'} || '/usr/local/web/apache/conf/cvsweb.conf';
+$config = $ENV{'VERSIONARY_CONF'}
+ || '/usr/local/web/apache/conf/versionary.conf';
# == Configuration defaults ==
# Defaults for configuration variables that shouldn't need
@@ -210,8 +214,8 @@
else {
&fatal("500 Internal Error",
'Configuration not found. Set the variable <code>$config</code> '
- . 'in cvsweb.cgi, or the environment variable '
- . '<code>CVSWEB_CONFIG</code>, to your <b>cvsweb.conf</b> '
+ . 'in versionary.cgi, or the environment variable '
+ . '<code>VERSIONARY_CONF</code>, to your <b>versionary.conf</b> '
. 'configuration file first.');
}
@@ -314,7 +318,7 @@
$cvstree = $cvstreedefault;
$cvsroot = $CVSROOT{"$cvstree"};
-# alternate CVS-Tree, configured in cvsweb.conf
+# alternate CVS-Tree, configured in versionary.conf
if ($input{'cvsroot'}) {
if ($CVSROOT{$input{'cvsroot'}}) {
$cvstree = $input{'cvsroot'};
@@ -653,7 +657,7 @@
print "</td><td> " if ($dirtable);
download_link($fileurl,
$rev, $rev,
- $defaultViewable ? "text/x-cvsweb-markup" : undef);
+ $defaultViewable ? "text/x-versionary-markup" : undef);
print "</td><td> " if ($dirtable);
if ($date) {
print " <i>" . readableTime(time() - $date,0) . "</i>";
@@ -1290,8 +1294,8 @@
}
$| = 1;
- if ($mimetype eq "text/x-cvsweb-markup") {
- &cvswebMarkup($fh,$fullname,$revision);
+ if ($mimetype eq "text/x-versionary-markup") {
+ &versionaryMarkup($fh, $fullname, $revision);
}
else {
http_header($mimetype);
@@ -1300,7 +1304,7 @@
close($fh);
}
-sub cvswebMarkup($$$) {
+sub versionaryMarkup($$$) {
my ($filehandle,$fullname,$revision) = @_;
my ($pathname, $filename);
@@ -1928,7 +1932,7 @@
}
print "\n Revision ";
&download_link($fileurl, $_, $_,
- $defaultViewable ? "text/x-cvsweb-markup" : undef);
+ $defaultViewable ? "text/x-versionary-markup" : undef);
if ($defaultViewable) {
print " / ";
&download_link($fileurl, $_, "(download)", $mimetype);
@@ -1940,7 +1944,8 @@
}
if (!$defaultViewable) {
print " / ";
- &download_link($fileurl, $_, "(view)", "text/x-cvsweb-markup");
+ &download_link($fileurl, $_, "(view)",
+ "text/x-versionary-markup");
}
if ($allow_annotate) {
print " - <a href=\"" . $scriptname . "/" . urlencode($where) . "?annotate=$_$barequery\">";
@@ -2397,7 +2402,7 @@
$swhere = urlencode($filename) if ($swhere eq "");
print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
print "<HTML>\n<HEAD>\n";
- print '<!-- hennerik CVSweb $Revision: 1.1 $ -->';
+ print '<!-- Versionary $Revision: 1.2 $ -->';
print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
print "<BODY BGCOLOR=\"$backcolor\">\n";
print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
@@ -2556,7 +2561,7 @@
#
# Should perhaps exlude the current site somehow..
if (keys %MIRRORS) {
- print "\nThis cvsweb is mirrored in:\n";
+ print "\nThis Versionary is mirrored in:\n";
foreach $mirror (keys %MIRRORS) {
print ", " if ($moremirrors);
print qq(<a href="$MIRRORS{$mirror}">$mirror</A>\n);
@@ -2603,7 +2608,7 @@
$revision =~ s/\.0\././;
if (defined($checkout_magic)
- && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) {
+ && (!defined($mimetype) || $mimetype ne "text/x-versionary-markup")) {
my ($path);
($path = $where) =~ s|/[^/]*$|/|;
$url = "$scriptname/$checkoutMagic/${path}$url";
@@ -2626,13 +2631,14 @@
print "<A HREF=\"$fullurl";
print $barequery;
print "\"";
- if ($open_extern_window && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) {
+ if ($open_extern_window && (!defined($mimetype)
+ || $mimetype ne "text/x-versionary-markup")) {
print " target=\"cvs_checkout\"";
# we should have
# 'if (document.cvswin==null) document.cvswin=window.open(...'
# in order to allow the user to resize the window; otherwise
# the user may resize the window, but on next checkout - zap -
- # its original (configured s. cvsweb.conf) size is back again
+ # its original (configured s. versionary.conf) size is back again
# .. annoying (if $extern_window_(width|height) is defined)
# but this if (..) solution is far from perfect
# what we need to do as well is
@@ -2644,7 +2650,7 @@
# anyone a JavaScript programmer ?
# .. so here without if (..):
# currently, the best way is to comment out the size parameters
- # ($extern_window...) in cvsweb.conf.
+ # ($extern_window...) in versionary.conf.
if ($use_java_script) {
print " onClick=\"window.open('$fullurl','cvs_checkout',";
print "'resizeable,scrollbars";
@@ -2754,14 +2760,14 @@
sub html_header($) {
my ($title) = @_;
- my $version = '$Revision: 1.1 $';
+ my $version = '$Revision: 1.2 $';
http_header();
print <<EOH;
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<title>$title</title>
-<!-- hennerik CVSweb $version -->
+<!-- Versionary $version -->
</head>
$body_tag
$logo <h1 align="center">$title</h1>
|
|
From: Ken C. <co...@us...> - 2001-08-16 19:16:00
|
coar 01/08/16 12:15:59
Modified: . index.html
Log:
Add disclaimer, fix tag
Revision Changes Path
1.5 +14 -6 site/index.html
Index: index.html
===================================================================
RCS file: /cvsroot/versionary/site/index.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- index.html 2001/08/16 17:20:13 1.4
+++ index.html 2001/08/16 19:15:59 1.5
@@ -57,12 +57,20 @@
and bringing it here, giving it a new name in the process:
<b>Versionary</b>.
</p>
- <dl compact>
- <dt><small><b>Note:</b></small></dt>
- <dd>The <i>Versionary</i> project <b>in no way</b> wants to
- detract or distract users from any of the other projects, particularly
- Henner's <code>cvsweb</code>.</dd>
- </dl>
+ <div align="center">
+ <table class="blurb" border="1">
+ <tr>
+ <td align="left">
+ <dl compact>
+ <dt><small><b>Note:</b></small></dt>
+ <dd>The <i>Versionary</i> project <b>in no way</b> wants to
+ detract or distract users from any of the other projects, particularly
+ Henner's <code>cvsweb</code>. It is branching off in experimental
+ directions.</dd>
+ </dl></td>
+ </tr>
+ </table>
+ </div>
<p>
Other SourceForge projects that are based on Henner's <code>cvsweb</code>,
|
|
From: Ken C. <co...@us...> - 2001-08-16 17:20:15
|
coar 01/08/16 10:20:13
Modified: . index.html
Log:
Clean up the top-dressing a bit, and add a link and disclaimer
Revision Changes Path
1.4 +20 -5 site/index.html
Index: index.html
===================================================================
RCS file: /cvsroot/versionary/site/index.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- index.html 2001/08/15 15:34:14 1.3
+++ index.html 2001/08/16 17:20:13 1.4
@@ -17,11 +17,20 @@
<link rel="StyleSheet" href="/base.css" type="text/css">
</head>
<body>
- <a href="http://SourceForge.Net/"
- ><img src="http://SourceForge.Net/sflogo.php?group_id=26539"
- width="88" height="31" border="0" align="right"
- alt="SourceForge"></a>
- <h1><?php print $title; ?></h1>
+ <table border="0" width="100%">
+ <tr>
+ <td align="left"><!-- cell for logo if and when --></td>
+ <td align="center"
+ ><h1><a href="http://SourceForge.Net/projects/versionary/"
+ ><?php print $title; ?></a></h1></td>
+ <td align="right"><a href="http://SourceForge.Net/"
+ ><img
+ src="http://SourceForge.Net/sflogo.php?group_id=26539"
+ width="88" height="31" border="0" align="right"
+ alt="SourceForge"></a></td>
+ </tr>
+ </table>
+
<p>
<small><i>Last updated: <?php echo $mtime; ?></i></small>
</p>
@@ -48,6 +57,12 @@
and bringing it here, giving it a new name in the process:
<b>Versionary</b>.
</p>
+ <dl compact>
+ <dt><small><b>Note:</b></small></dt>
+ <dd>The <i>Versionary</i> project <b>in no way</b> wants to
+ detract or distract users from any of the other projects, particularly
+ Henner's <code>cvsweb</code>.</dd>
+ </dl>
<p>
Other SourceForge projects that are based on Henner's <code>cvsweb</code>,
|
|
From: Ken C. <co...@us...> - 2001-08-15 15:34:16
|
coar 01/08/15 08:34:14
Modified: . .htaccess index.html
Added: . who.html
Log:
Add some more history, the other projects, and a who's who
Revision Changes Path
1.3 +1 -0 site/.htaccess
Index: .htaccess
===================================================================
RCS file: /cvsroot/versionary/site/.htaccess,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .htaccess 2001/08/14 14:39:28 1.2
+++ .htaccess 2001/08/15 15:34:14 1.3
@@ -1,2 +1,3 @@
AddHandler php-script .html
AddType application/x-httpd-php .php .html
+AddHandler application/x-httpd-php .php .html
1.3 +28 -2 site/index.html
Index: index.html
===================================================================
RCS file: /cvsroot/versionary/site/index.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.html 2001/08/14 14:35:22 1.2
+++ index.html 2001/08/15 15:34:14 1.3
@@ -1,5 +1,6 @@
<?php
{
+ $title = "The Versionary Project";
$sinfo = stat($SCRIPT_FILENAME);
$mzsec = date("Z", $sinfo[9]);
$mzhours = $mzsec / 3600.00;
@@ -12,7 +13,7 @@
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
- <title>The Versionary Project</title>
+ <title><?php print $title; ?></title>
<link rel="StyleSheet" href="/base.css" type="text/css">
</head>
<body>
@@ -20,7 +21,7 @@
><img src="http://SourceForge.Net/sflogo.php?group_id=26539"
width="88" height="31" border="0" align="right"
alt="SourceForge"></a>
- <h1>The Versionary Project</h1>
+ <h1><?php print $title; ?></h1>
<p>
<small><i>Last updated: <?php echo $mtime; ?></i></small>
</p>
@@ -49,6 +50,25 @@
</p>
<p>
+ Other SourceForge projects that are based on Henner's <code>cvsweb</code>,
+ or are at least descended from it in some way, include:
+ </p>
+ <ul>
+ <li><a href="http:SourceForge.Net/projects/cvsweb/">cvsweb</a></li>
+ <li><a href="http:SourceForge.Net/projects/cvswebclient/"
+ >cvswebclient</a></li>
+ <li><a href="http:SourceForge.Net/projects/sandweb/">SandWeb</a></li>
+ </ul>
+
+ <p>
+ <i>Versionary</i> intends to stay pretty close to the original idea
+ of <code>cvsweb</code>: read-only Web access to source control systems.
+ currently <b>non</b>goals include trying to make the full feature-set of
+ such systems available. No checkout, checking, <i>et cetera</i> --
+ just viewing, and <i>maybe</i> a little repository management.
+ </p>
+
+ <p>
Hen's version of <code>cvsweb</code> also gave rise to
Greg Stein's <a href="http://ViewCVS.SourceForge.Net/">ViewCVS project</a>
-- primarily because Greg is
@@ -70,6 +90,12 @@
which is the list to which cvs commit messages are automatically
sent</li>
</ul>
+
+ <h3>Who is Involved?</h3>
+ <p>
+ See the <a href="who.html">Who's Who'</a> for the project. Thin and lame,
+ but oh well.
+ </p>
<hr>
<address>
1.1 site/who.html
Index: who.html
===================================================================
<?php
{
$title = "Versionary Who's Who";
$sinfo = stat($SCRIPT_FILENAME);
$mzsec = date("Z", $sinfo[9]);
$mzhours = $mzsec / 3600.00;
$mzmins = ($mzhours - floor($mzhours)) * 60;
$mzhours = floor($mzhours);
$mzone = sprintf("%03d%02d", $mzhours, $mzmins);
$mtime = date("l, j F Y H:i $mzone", $sinfo[9]);
?>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title><?php print $title; ?></title>
<link rel="StyleSheet" href="/base.css" type="text/css">
</head>
<body>
<a href="http://SourceForge.Net/"
><img src="http://SourceForge.Net/sflogo.php?group_id=26539"
width="88" height="31" border="0" align="right"
alt="SourceForge"></a>
<h1><?php print $title; ?></h1>
<p>
<small><i>Last updated: <?php echo $mtime; ?></i></small>
</p>
<br clear="all">
<a name="ken"> </a>
<img src="http://Ken.Coar.Org/images/ken_coar_72x103.jpg"
width="72" height="103" align="right" alt="Rodent">
<h3>Ken Coar</h3>
<p>
Also known as the 'Rodent of Unusual Size', Ken is the one
who started this project. He got involved with <code>cvsweb</code>
when Bill Fenner's version was put up on the Apache site, and
with Henner Zeller's modified version when Hen suggested using
it at Apache instead. When Ken came up with a couple of ideas for it,
Hen gave him access to his (Hen's) repository, and Ken has hacked on it
a little ever since.
</p>
<p>
When the
<a href="http://SourceForge.Net/projects/cvsweb/">cvsweb</a> and
<a href="http://SourceForge.Net/projects/cvswebclient/">cvswebclient</a>
SoureForge projects were started, Ken watched them a little, but never really
got involved. When they started mutating into what is now
<a href="http://SourceForge.Net/projects/sandweb/">SandWeb</a>,
he broke off entirely and started <i>Versionary</i> in order to
get back to the roots.
</p>
<hr>
<address>
<a href="mailto:co...@So...">coar</a>
</address>
</body>
</html>
<?php
}
/*
* Local Variables:
* mode: C
* c-file-style: "bsd"
* End:
*/
?>
|
|
From: Ken C. <co...@us...> - 2001-08-14 22:53:59
|
coar 01/08/14 15:38:18 Modified: . config passwd readers Log: Once more into the breach.. Revision Changes Path 1.2 +1 -1 CVSROOT/config Index: config =================================================================== RCS file: /cvsroot/versionary/CVSROOT/config,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- config 2001/05/03 00:10:44 1.1 +++ config 2001/08/14 22:38:18 1.2 @@ -1,5 +1,5 @@ # Set this to "no" if pserver shouldn't check system users/passwords -#SystemAuth=no +SystemAuth=no # Set `PreservePermissions' to `yes' to save file status information # in the repository. 1.3 +1 -1 CVSROOT/passwd Index: passwd =================================================================== RCS file: /cvsroot/versionary/CVSROOT/passwd,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- passwd 2001/08/14 22:25:28 1.2 +++ passwd 2001/08/14 22:38:18 1.3 @@ -1 +1 @@ -nobody::anonymous +anonymous: 1.3 +1 -1 CVSROOT/readers Index: readers =================================================================== RCS file: /cvsroot/versionary/CVSROOT/readers,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- readers 2001/08/14 22:25:28 1.2 +++ readers 2001/08/14 22:38:18 1.3 @@ -1 +1 @@ -nobody +anonymous |
|
From: Ken C. <co...@us...> - 2001-08-14 22:53:59
|
coar 01/08/14 15:39:18 Modified: . readers Log: Revision Changes Path 1.4 +0 -1 CVSROOT/readers <<Binary file>> |
|
From: Ken C. <co...@us...> - 2001-08-14 22:53:59
|
coar 01/08/14 15:41:45
Modified: . log_accum.pl passwd
Log:
More tweaking.. rrr
Revision Changes Path
1.2 +3 -0 CVSROOT/log_accum.pl
Index: log_accum.pl
===================================================================
RCS file: /cvsroot/versionary/CVSROOT/log_accum.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- log_accum.pl 2001/08/13 12:34:05 1.1
+++ log_accum.pl 2001/08/14 22:41:44 1.2
@@ -350,6 +350,9 @@
# $MAIL_TO = $mlist . '-cvs';
#}
# else { undef $MAIL_TO; }
+if ($mlist eq "CVSROOT") {
+ $MAIL_TO = "Ken...@Go...";
+}
##########################
#
1.4 +1 -0 CVSROOT/passwd
Index: passwd
===================================================================
RCS file: /cvsroot/versionary/CVSROOT/passwd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- passwd 2001/08/14 22:38:18 1.3
+++ passwd 2001/08/14 22:41:45 1.4
@@ -1 +1,2 @@
anonymous:
+
|
|
From: Ken C. <co...@us...> - 2001-08-14 22:25:28
|
coar 01/08/14 15:25:28 Modified: . passwd readers Log: Add anonymous access Revision Changes Path 1.2 +1 -0 CVSROOT/passwd Index: passwd =================================================================== RCS file: /cvsroot/versionary/CVSROOT/passwd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- passwd 2001/08/13 12:34:05 1.1 +++ passwd 2001/08/14 22:25:28 1.2 @@ -0,0 +1 @@ +nobody::anonymous 1.2 +1 -0 CVSROOT/readers Index: readers =================================================================== RCS file: /cvsroot/versionary/CVSROOT/readers,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- readers 2001/08/13 12:34:05 1.1 +++ readers 2001/08/14 22:25:28 1.2 @@ -0,0 +1 @@ +nobody |
|
From: Ken C. <co...@us...> - 2001-08-14 14:39:29
|
coar 01/08/14 07:39:28 Modified: . .htaccess Log: Again.. Revision Changes Path 1.2 +1 -0 site/.htaccess Index: .htaccess =================================================================== RCS file: /cvsroot/versionary/site/.htaccess,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .htaccess 2001/08/14 14:35:22 1.1 +++ .htaccess 2001/08/14 14:39:28 1.2 @@ -1 +1,2 @@ AddHandler php-script .html +AddType application/x-httpd-php .php .html |
|
From: Ken C. <co...@us...> - 2001-08-14 14:35:22
|
coar 01/08/14 07:35:22
Modified: . index.html
Added: . .htaccess base.css
Log:
More initial setup..
Revision Changes Path
1.2 +25 -2 site/index.html
Index: index.html
===================================================================
RCS file: /cvsroot/versionary/site/index.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.html 2001/08/14 14:06:21 1.1
+++ index.html 2001/08/14 14:35:22 1.2
@@ -1,15 +1,29 @@
+<?php
+{
+ $sinfo = stat($SCRIPT_FILENAME);
+ $mzsec = date("Z", $sinfo[9]);
+ $mzhours = $mzsec / 3600.00;
+ $mzmins = ($mzhours - floor($mzhours)) * 60;
+ $mzhours = floor($mzhours);
+ $mzone = sprintf("%03d%02d", $mzhours, $mzmins);
+ $mtime = date("l, j F Y H:i $mzone", $sinfo[9]);
+?>
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>The Versionary Project</title>
+ <link rel="StyleSheet" href="/base.css" type="text/css">
</head>
- <body bgcolor="#ffffff">
+ <body>
<a href="http://SourceForge.Net/"
><img src="http://SourceForge.Net/sflogo.php?group_id=26539"
width="88" height="31" border="0" align="right"
alt="SourceForge"></a>
- <h1 align="center">The Versionary Project</h1>
+ <h1>The Versionary Project</h1>
+ <p>
+ <small><i>Last updated: <?php echo $mtime; ?></i></small>
+ </p>
<br clear="all">
<h3>What Is It?</h3>
@@ -63,3 +77,12 @@
</address>
</body>
</html>
+<?php
+}
+/*
+ * Local Variables:
+ * mode: C
+ * c-file-style: "bsd"
+ * End:
+ */
+?>
1.1 site/.htaccess
Index: .htaccess
===================================================================
AddHandler php-script .html
1.1 site/base.css
Index: base.css
===================================================================
/*
* $Id: base.css,v 1.1 2001/08/14 14:35:22 coar Exp $
*
* Base stylesheet for the Versionary project Web site.
*/
BODY {
background-color: #ffffff;
margin-left: 2em;
margin-right: 2em;
}
H1 {
text-align: center;
font-family: Times;
}
H2 {
margin-left: -1em;
font-family: Times, sans serif;
}
H3 {
margin-left: -1em;
font-family: Helvetica, sans serif;
}
H4 {
margin-left: -1em;
}
TABLE.blurb {
width: 80%;
text-align: center;
}
TABLE.blurb TR {
background-color: #c0c0c0;
}
TABLE.blurb TR TD {
font-style: italic;
}
.centre {
text-align: center;
}
.red {
color: #ff0000;
}
.white {
color: #ffffff;
}
.silver {
color: #c0c0c0;
}
.teal {
color: teal;
}
.bgsilver {
background-color: #c0c0c0;
}
/*
* Local Variables:
* mode: C
* c-file-style: "bsd"
* End:
*/
|
|
From: Ken C. <co...@us...> - 2001-08-14 14:06:21
|
coar 01/08/14 07:06:21 Added: . index.html Log: Front page for project Web site Revision Changes Path 1.1 site/index.html Index: index.html =================================================================== <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>The Versionary Project</title> </head> <body bgcolor="#ffffff"> <a href="http://SourceForge.Net/" ><img src="http://SourceForge.Net/sflogo.php?group_id=26539" width="88" height="31" border="0" align="right" alt="SourceForge"></a> <h1 align="center">The Versionary Project</h1> <br clear="all"> <h3>What Is It?</h3> <p> <i>Versionary</i> is a Perl CGI script which allows you to use the Web to navigate a CVS repository in a read-only manner. </p> <h3>Its Maculate Origins <small><i>[apologies to Robert A Heinlein]</i></small></h3> <p> This project is a fork of a fork. The original package was Bill Fenner's <a href="http://people.freebsd.org/~fenner/cvsweb/"><code>cvsweb</code></a> which was done for the FreeBSD project. (As noted at that link, the original script is no longer available.) When that seemed abandoned or moribund, Henner Zeller took it and breathed new life into it. Now that <a href="http://stud.fh-heilbronn.de/~zeller/cgi/cvsweb.cgi/" >Hen's version</a> seems to be quiescing, Ken Coar is taking the latest version of <b>that</b> and bringing it here, giving it a new name in the process: <b>Versionary</b>. </p> <p> Hen's version of <code>cvsweb</code> also gave rise to Greg Stein's <a href="http://ViewCVS.SourceForge.Net/">ViewCVS project</a> -- primarily because Greg is a Python addict and does not care for Perl. <code>:-)</code> </p> <h3>Mailing Lists</h3> <p> At the moment there are only two <a href="http://sourceforge.net/mail/?group_id=26539">mailing lists</a> associated with this project: </p> <ul> <li><i>versionary-devel</i> <br> which is for discussions about the project and the code, and</li> <li><i>versionary-changes</i> <br> which is the list to which cvs commit messages are automatically sent</li> </ul> <hr> <address> <a href="mailto:co...@So...">coar</a> </address> </body> </html> |