Hi,
Since no one has yet replied to my "tree view of repository including following
external references" posting I put together a small perl script using WEB::SVN
to do the job (see below). Running this program to a dav URL I see in the
Apache log:
./x.pl -u http://a.b.c/linux-x86
[Fri May 28 09:33:34 2004] [error] [client 192.168.0.78] Could not fetch resourc
e information. [500, #0]
[Fri May 28 09:33:34 2004] [error] [client 192.168.0.78] Could not open the requ
ested SVN filesystem [500, #160029]
[Fri May 28 09:33:34 2004] [error] [client 192.168.0.78] (17)File exists: Could
not open the requested SVN filesystem [500, #160029]
[Fri May 28 09:34:04 2004] [error] [client 192.168.0.78] (20014)Error string not
specified yet: Berkeley DB error while opening 'transactions' table for filesys
tem /var/subversion/distribution/linux-x86/db:
Cannot allocate memory
(Perhaps this is related to issue 1224 - "svn update crashes with "Cannot
allocate memory""). If I change Apache's "MaxClients 150" to "MaxClients 50" my
perl program slows down massively but runs to completion (similarly if I insert
sleeps into the code it runs to completion).
If I run this perl directly on the machine with a local URL
./x.pl -u file///var/subversion/distribution/linux-x86
I get:
Couldn't open a repository: Unable to open an ra_local session to URL: Unable
to open repository
'file:///var/subversion/distribution/linux-x86/common/libraries/extras/tags/rele
ase-1_0_32/libraries/extras': Berkeley DB error while opening 'nodes' table for
filesystem /var/subversion/distribution/linux-x86/db:
Cannot allocate memory at ./x.pl line 11
My repository appears to wedge after the later (perhaps issue 739 - "automatic
db_recovery feature in libsvn_fs").
This is really worrying for us. We've been moving our source control to
subversion for the last month and now it seems we can wedge the repository
very easily and lock everyone out of it.
The machine we are using has 2Gb of memory and 30Gb of disk and the repository
is not that large (6Mb) but it contains a lot of external references to other
repositories totalling around 0.5Gb.
Any one got any suggestions?
The Perl is:
#!/usr/local/bin/perl
use strict ;
use Getopt::Std ;
use SVN::Client;
use Data::Dumper;
sub process_dir
{
my ( $ctx, $url, $revision, $spaces ) = @_ ;
my $dirs = $ctx->ls ( $url , $revision, 0 ) ;
foreach my $dir (sort keys (%$dirs)) {
my $printed = 0;
my $props = $ctx->propget("svn:externals", "$url/$dir", $revision, 0);
if (%$props + 0) {
print " " x $spaces, $dir, "\n";
$printed++;
foreach my $prop (keys %$props) {
my $y = $props->{$prop};
$y =~ tr/\r//d;
my @x = split /\s+/,$y;
for (my $i = 0; $i < $#x; $i+=2) {
print " " x $spaces, " ", $x[$i], " -> ", $x[$i+1],
"\n";
}
}
}
if ($dirs->{$dir}->kind() == $SVN::Node::dir) {
print " " x $spaces, $dir, "\n" if ($printed eq 0);
process_dir($ctx, "$url/$dir", $revision, $spaces+1);
}
elsif ($dirs->{$dir}->kind() == $SVN::Node::file) {
print " " x $spaces, "$dir\n" if ($printed eq 0);
} else {
print $dir, "\n";
exit 0;
}
}
}
my $url ;
my $ctx = new SVN::Client(
auth => [SVN::Client::get_simple_provider(),
SVN::Client::get_simple_prompt_provider(\&simple_prompt,2),
SVN::Client::get_username_provider()]
);
my $revision = 'HEAD' ;
my %options ;
getopts("u:",\%options);
if ( $options{'u'} ) { $url = $options{'u'}; }
if ( $options{'r'} ) { $revision = $options{'r'}; }
print "[$url]\n";
process_dir ( $ctx, $url, $revision, 0 )
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 28 13:07:30 2004