| version 1.18, 2003/01/11 13:50:06 |
version 1.19, 2003/02/01 00:23:10 |
|
|
| # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| # SUCH DAMAGE. |
# SUCH DAMAGE. |
| # |
# |
| # $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.138 2002/11/24 18:03:21 scop Exp $ |
# $FreeBSD: /home/ncvs/projects/cvsweb/cvsweb.cgi,v 1.139 2002/12/21 20:39:36 scop Exp $ |
| # $Id$ |
# $Id$ |
| # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $ |
# $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $ |
| # $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.17 2003/01/03 20:03:47 nepto Exp $ |
# |
| |
# DONT'T delete lines between '$''Idaemons' and '$''Platon' -- patches from FreeBSD failed then |
| |
# $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.18 2003/01/11 13:50:06 nepto Exp $ |
| # |
# |
| ### |
### |
| |
|
|
|
| $show_subdir_lastmod $show_log_in_markup $preformat_in_markup $v |
$show_subdir_lastmod $show_log_in_markup $preformat_in_markup $v |
| $tabstop $state $annTable $sel $curbranch @HideModules @ForbiddenFiles |
$tabstop $state $annTable $sel $curbranch @HideModules @ForbiddenFiles |
| $module $use_descriptions %descriptions @mytz $dwhere $moddate |
$module $use_descriptions %descriptions @mytz $dwhere $moddate |
| $use_moddate $has_zlib $gzip_open |
$use_moddate $has_zlib $gzip_open $file_list_len |
| $allow_tar @tar_options @gzip_options @zip_options @cvs_options |
$allow_tar @tar_options @gzip_options @zip_options @cvs_options |
| @annotate_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR |
@annotate_options $LOG_FILESEPARATOR $LOG_REVSEPARATOR |
| $tmpdir $HTML_DOCTYPE $HTML_META $cssurl $TempTemplate |
$tmpdir $HTML_DOCTYPE $HTML_META $cssurl $TempTemplate |
| Line 2046 sub doDiff($$$$$$) |
|
| Line 2048 sub doDiff($$$$$$) |
|
| sub getDirLogs($$@) |
sub getDirLogs($$@) |
| { |
{ |
| my ($cvsroot, $dirname, @otherFiles) = @_; |
my ($cvsroot, $dirname, @otherFiles) = @_; |
| my ($state, $otherFiles, $tag, $file, $date, $branchpoint, $branch, $log); |
my $tag = $input{only_with_tag}; |
| my ($rev, $revision, $revwanted, $filename, $head, $author); |
my $DirName = "$cvsroot/$where"; |
| |
|
| $tag = $input{only_with_tag}; |
|
| |
|
| my ($DirName) = "$cvsroot/$where"; |
|
| my (@files, @filetags); |
|
| my $fh = do { local (*FH); }; |
|
| |
|
| push (@files, &safeglob("$DirName/*,v")); |
my @files = &safeglob("$DirName/*,v"); |
| push (@files, &safeglob("$DirName/Attic/*,v")) |
push (@files, &safeglob("$DirName/Attic/*,v")) if (!$input{'hideattic'}); |
| if (!$input{'hideattic'}); |
|
| foreach my $file (@otherFiles) { |
foreach my $file (@otherFiles) { |
| push (@files, "$DirName/$file"); |
push (@files, "$DirName/$file"); |
| } |
} |
| |
|
| # just execute rlog if there are any files |
# If there are no files, we're done. |
| return unless @files; |
return unless @files; |
| |
|
| if (defined($tag)) { |
my @cmd = ($CMD{rlog}); |
| |
# Can't use -r<tag> as '-' is allowed in tagnames, |
| #can't use -r<tag> as - is allowed in tagnames, but misinterpreated by rlog.. |
# but misinterpreted by rlog. |
| if (!open($fh, "-|")) { # child |
push(@cmd, '-r') unless defined($tag); |
| open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
|
| openOutputFilter(); |
|
| exec($CMD{rlog}, @files) or exit -1; |
|
| } |
|
| } else { |
|
| |
|
| if (!open($fh, "-|")) { # child |
my $fh = do { local (*FH); }; |
| open(STDERR, '>/dev/null'); # rlog may complain; ignore. |
if (!open($fh, '-|')) { # Child |
| openOutputFilter(); |
open(STDERR, '>/dev/null'); # Ignore rlog's complaints. |
| exec($CMD{rlog}, '-r', @files) or exit -1; |
openOutputFilter(); |
| |
if ($file_list_len && $file_list_len > 1) { |
| |
while (scalar(@files) > $file_list_len) { # Process files in chunks. |
| |
system(@cmd, splice(@files, 0, $file_list_len)) == 0 or exit -1; |
| |
} |
| } |
} |
| |
exec(@cmd, @files) or exit -1; |
| } |
} |
| $state = "start"; |
undef @cmd; |
| |
|
| |
my $state = 'start'; |
| |
my ($date, $branchpoint, $branch, $log, @filetags); |
| |
my ($rev, $revision, $revwanted, $filename, $head, $author); |
| |
|
| while (<$fh>) { |
while (<$fh>) { |
| if ($state eq "start") { |
if ($state eq "start") { |
| Line 2229 sub getDirLogs($$@) |
|
| Line 2228 sub getDirLogs($$@) |
|
| } |
} |
| } |
} |
| |
|
| if ($. == 0) { |
my $linesread = $. || 0; |
| |
close($fh); |
| |
|
| |
if ($linesread == 0) { |
| fatal("500 Internal Error", |
fatal("500 Internal Error", |
| _('Failed to spawn GNU rlog on <em>"%s"</em>.<br><br>Did you set the <b><code>$command_path</code></b> in your configuration file correctly? (Currently: "<code>%s</code>")'), |
_('Failed to spawn GNU rlog on <em>"%s"</em>.<br><br>Did you set the <b><code>$command_path</code></b> in your configuration file correctly? (Currently: "<code>%s</code>")'), |
| join (", ", @files), $command_path); |
join (", ", @files), $command_path); |
| } |
} |
| close($fh); |
|
| } |
} |
| |
|
| sub readLog($;$) |
sub readLog($;$) |