&|/l&>Available repositories&>:
% my @empty;
% my $base = "$RT::VarPath/Foundry/svn";
% opendir(my($dh), $base);
% foreach my $dir (sort readdir ($dh)) {
%     $dir =~ /^\w/ or next;
%     $dir =~ /\./ and next;
%     open my $fh, "$base/$dir/db/current" or next;
%     my $is_mirrored = (-s "$base/$dir/db/revprops/2" == 116) ? ', read-only' : '';
%     my ($rev) = (<$fh> =~ /^(\d+)/g) or next;
%     if ($rev > ($is_mirrored ? 2 : 0)) {
- <% $dir %> (rev. <% $rev %>)%     } else {
%         push @empty, $dir;
%     }
% }
<&|/l&>Empty repositories&>:
% foreach my $dir (@empty) {
<% $dir %>
% }
<&|/l&>To work with a repository, please use one of these tools&>:
<%INIT>
%INIT>
<%FLAGS>
inherit => '/autohandler'
%FLAGS>