=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.10 retrieving revision 1.12 diff -u -p -r1.10 -r1.12 --- cvsweb/cvsweb.cgi 1997/11/14 17:36:47 1.10 +++ cvsweb/cvsweb.cgi 1997/11/19 19:07:18 1.12 @@ -30,6 +30,7 @@ require 'ctime.pl'; $hsty_base = ""; require 'cgi-style.pl'; +#&get_the_source; %CVSROOT = ( 'freebsd', '/home/ncvs', @@ -75,7 +76,6 @@ $scriptname =~ s|/$||; $scriptwhere = $scriptname . '/' . $where; $scriptwhere =~ s|/$||; - if ($query = $ENV{'QUERY_STRING'}) { foreach (split(/&/, $query)) { s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted @@ -89,6 +89,8 @@ if ($query = $ENV{'QUERY_STRING'}) { } +$config = '/usr/local/etc/cvsweb'; +do "$config" if -f $config; if ($input{'cvsroot'}) { if ($CVSROOT{$input{'cvsroot'}}) { @@ -96,10 +98,12 @@ if ($input{'cvsroot'}) { $cvsroot = $CVSROOT{"$cvstree"}; } } +do "$config-$cvstree" if -f "$config-$cvstree"; $fullname = $cvsroot . '/' . $where; + if (!-d $cvsroot) { - &fatal("500 Internal Error",'$CVSROOT not found!'); + &fatal("500 Internal Error",'$CVSROOT not found!
The server on which the CVS tree lives is probably down. Please try again in a few minutes.');
}
@@ -126,6 +130,7 @@ if (-d $fullname) {
last lookingforattic;
}
}
+ $haveattic = 1 if ($i <= $#dir);
if (!$input{"showattic"} && ($i <= $#dir) &&
opendir(DIR, $fullname . "/Attic")) {
splice(@dir, $i, 1,
@@ -151,13 +156,14 @@ if (-d $fullname) {
# &link("Directory-wide diffs", $scriptwhere . '/*'), "
";
} elsif (-d $fullname . "/" . $_) {
print " ",
- &link($_ . "/", $scriptwhere . '/' . $_ . '/' . $query), $attic, "
";
+ &link($_ . "/", $scriptwhere . '/' . $_ . '/' . $query),
+ $attic, "
";
} elsif (s/,v$//) {
# TODO: add date/time? How about sorting?
print " ",
&link($_, $scriptwhere . '/' .
($attic ? "Attic/" : "") . $_ . $query),
- $attic, "
";
+ $attic, "
";
}
}
print "\n";
@@ -173,15 +179,17 @@ if (-d $fullname) {
}
$formwhere = $scriptwhere;
$formwhere =~ s|Attic/?$|| if ($input{"showattic"});
- print "