Date: Fri, 22 Nov 2002 17:35:27 +0100 From: Tomas Novak <tnovak@atrey.karlin.mff.cuni.cz> To: freebsd-cvsweb@FreeBSD.org Subject: Missing files in the list Message-ID: <20021122163527.GD21698@atrey.karlin.mff.cuni.cz>
index | next in thread | raw e-mail
Hi.
Sometimes (probably if there is too many files in the repository) some files
are not listed by cvsweb. So I guess there is a problem with passing all the
filenames as arguments to rlog. I have tried to fix it using xargs and it
works well. Unfortunately this solution needs a tempfile.
Patch follows.
TNT
PS: At first I have tried it on RedHat Linux 6.2 running Apache 1.3.14,
but now on RH 8.0 with Apache 2.0.40 it seems OK (without my patch).
So sorry if the problem is somewhere else...
--- bigrepo.patch -------------------------------------------------------
diff -ur cvsweb-2.0.6.orig/cvsweb.cgi cvsweb-2.0.6/cvsweb.cgi
--- cvsweb-2.0.6.orig/cvsweb.cgi Thu Sep 26 20:56:05 2002
+++ cvsweb-2.0.6/cvsweb.cgi Fri Nov 22 15:37:40 2002
@@ -2124,21 +2124,23 @@
return;
}
- if (defined($tag)) {
-
- #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog..
- if (!open($fh, "-|")) { # child
- open(STDERR, '>/dev/null'); # rlog may complain; ignore.
- openOutputFilter();
- exec($CMD{rlog}, @files) or exit -1;
- }
- } else {
-
- if (!open($fh, "-|")) { # child
- open(STDERR, '>/dev/null'); # rlog may complain; ignore.
- openOutputFilter();
- exec($CMD{rlog}, '-r', @files) or exit -1;
- }
+ #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog..
+ # too many files for command line - we need a tempfile and xargs it
+ my $tempfile = "/tmp/cvsweb-filelist-$$";
+ open(TEMPF, ">$tempfile") or die "Cant open temp file: $tempfile\n";
+ foreach my $f (@files) {
+ print TEMPF "$f\n";
+ }
+ close(TEMPF);
+
+ my $command = $CMD{rlog};
+ $command .= " -r" if (!defined($tag));
+ $command = "/usr/bin/xargs -r -n1 $command <$tempfile";
+
+ if (!open($fh, "-|")) { # child
+ open(STDERR, '>/dev/null'); # rlog may complain; ignore.
+ openOutputFilter();
+ exec($command) or exit -1;
}
$state = "start";
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-cvsweb" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021122163527.GD21698>
