=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- cvsweb/cvsweb.cgi 1997/04/30 07:35:11 1.6 +++ cvsweb/cvsweb.cgi 1997/04/30 18:25:05 1.7 @@ -44,6 +44,10 @@ diffs between that revision and the previous one, and a form at the bottom of the page that allows you to display diffs between arbitrary revisions.
+If you would like to use this CGI script on your own web server and +CVS tree, see +the CVSWeb distribution site. +
Please send any suggestions, comments, etc. to
Bill Fenner <fenner@freebsd.org>
";
@@ -65,13 +69,18 @@ $scriptwhere =~ s|/$||;
if (!-d $cvsroot) {
&fatal("500 Internal Error",'$CVSROOT not found!');
}
+
+if ($q = $ENV{'QUERY_STRING'}) {
+ foreach (split(/&/, $q)) {
+ s/%(..)/sprintf("%c", hex($1))/ge; # unquote %-quoted
+ if (/(\S+)=(.*)/) {
+ $input{$1} = $2;
+ } else {
+ $input{$_}++;
+ }
+ }
+}
if (-d $fullname) {
-# Something that would be nice to support, although I have no real
-# good idea of how, would be to get full directory diff's, using
-# symbolic names (revision numbers would be meaningless).
-# The problem is finding a list of symbolic names that is common
-# to all the files in the directory.
-#
opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!");
@dir = readdir(DIR);
closedir(DIR);
@@ -97,10 +106,13 @@ if (-d $fullname) {
($updir = $scriptwhere) =~ s|[^/]+$||;
print " ",
&link("Previous Directory",$updir), "
";
+# print " ",
+# &link("Directory-wide diffs", $scriptwhere . '/*'), "
";
} elsif (-d $fullname . "/" . $_) {
print " ",
&link($_ . "/", $scriptwhere . '/' . $_ . '/'), "
";
} elsif (s/,v$//) {
+# TODO: add date/time? How about sorting?
print " ",
&link($_, $scriptwhere . '/' . $_), "
";
}
@@ -109,126 +121,15 @@ if (-d $fullname) {
print &html_footer;
print "