Make limit on number of repos displayed by info with GL_BIG_CONFIG configurable

[doc added by Sitaram]
This commit is contained in:
Dylan Simon 2011-03-23 21:45:35 -04:00 committed by Sitaram Chamarty
parent 0f377a7679
commit 58064b8e20
5 changed files with 22 additions and 6 deletions

View file

@ -524,8 +524,8 @@ sub report_basic
my $count = 0;
for my $r (sort keys %repos) {
next unless $r =~ /$repo/i;
# if $GL_BIG_CONFIG is on, limit the number of output lines to 20
next if $GL_BIG_CONFIG and $count++ >= 20;
# if $GL_BIG_CONFIG is on, limit the number of output lines
next if $GL_BIG_CONFIG and $count++ >= $BIG_INFO_CAP;
if ($r =~ $REPONAME_PATT and $r !~ /\bCREAT[EO]R\b/) {
parse_acl($r, "NOBODY");
} else {
@ -541,7 +541,7 @@ sub report_basic
$perm .= perm_code( $repos{$r}{W}{'@all'}, $repos{'@all'}{W}{$user}, $repos{$r}{W}{$user}, 'W');
print "$perm\t$r\r\n" if $perm =~ /\S/;
}
print "only 20 out of $count candidate repos examined\r\nplease use a partial reponame or regex pattern to limit output\r\n" if $GL_BIG_CONFIG and $count > 20;
print "only $BIG_INFO_CAP out of $count candidate repos examined\r\nplease use a partial reponame or regex pattern to limit output\r\n" if $GL_BIG_CONFIG and $count > $BIG_INFO_CAP;
print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
}
@ -570,13 +570,13 @@ sub expand_wild
$actual_repo =~ s/\.git$//;
# actual_repo has to match the pattern being expanded
next unless $actual_repo =~ /$repo/i;
next if $GL_BIG_CONFIG and $count++ >= 20;
next if $GL_BIG_CONFIG and $count++ >= $BIG_INFO_CAP;
my($perm, $creator, $wild) = repo_rights($actual_repo);
next unless $perm =~ /\S/;
print "$perm\t$creator\t$actual_repo\n";
}
print "only 20 out of $count candidate repos examined\nplease use a partial reponame or regex pattern to limit output\n" if $GL_BIG_CONFIG and $count > 20;
print "only $BIG_INFO_CAP out of $count candidate repos examined\nplease use a partial reponame or regex pattern to limit output\n" if $GL_BIG_CONFIG and $count > $BIG_INFO_CAP;
print "$GL_SITE_INFO\n" if $GL_SITE_INFO;
}