[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Perl interface leaks connections: ???

From: Matthias Urlichs <smurf_at_smurf.noris.de>
Date: 2005-08-19 18:25:08 CEST

Hi,

Ben Collins-Sussman:
> >How do I use one persistent connection instead?
>
> Call the network API (svn_ra.h), rather than the high-level client
> API (svn_client.h). In other words, open a single network RA session
> and call svn_ra_get_logs() repeatedly, instead of calling
> svn_client_log() repeatedly.

Thank you, that's helpful. After a bit of experimentation, this code works:

#!/usr/bin/perl
use SVN::Ra;
my $ra = SVN::Ra->new("svn://cvs.gnupg.org/gnupg");

sub show_log {
        # ... do whatever ...
}

my $latest = $ra->get_latest_revnum();

my $n = 1;
while($n <= $latest) {
        $ra->get_log("/",$n,$n,$n,1,1,\&show_log,undef)
# svn_ra_get_log(session,paths,start,end,limit,discover_changed_paths,strict_node_history,receiver,receiver_baton,pool)

} continue {
        $n++;
}

... which still leaves the fact that SVN::Client leaks connections,
but that's a bug for somebody else to fix.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
When I see the Ten Most Wanted List... I always have this thought: If we'd
made them feel wanted earlier, they wouldn't be wanted now.
		-- Eddie Cantor
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 19 20:44:46 2005

This is an archived mail posted to the Subversion Dev mailing list.