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

Re: Using info2 in perl

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Thu, 22 Mar 2012 02:14:42 +0200

Jim Searle wrote on Wed, Mar 21, 2012 at 16:03:05 -0700:
> I am currently using the perl api info and diff_summarize methods, but
> I need to switch to info2 and diff_summarize2 since they support the
> 'depth' option. But I can't figure out the correct syntax, does
> anyone have an example?
>

% perl -MSVN::Client -le '$s = SVN::Client->new();
                          $s->info2( "", 1,"HEAD",
                                     sub{($target, $info_t, $pool) = @_;
                                         print "$target: ", $info_t->URL },
                                     $SVN::Core::depth_infinity, undef )'
A: file:///tmp/svn/r1/trunk/A
A/B: file:///tmp/svn/r1/trunk/A/B
...
A/D/H/psi: file:///tmp/svn/r1/trunk/A/D/H/psi
iota: file:///tmp/svn/r1/trunk/iota

How I built this:

- Follow the docs of the svn_client_info2() C API (in doxygen, or in svn_client.h)

- Drop the ctx parameter

- Drop any baton parameters

- When in doubt about some object --- print it. ref() and Dumper() help too.

HTH,

Daniel

> Thanks,
> Jim
Received on 2012-03-22 01:15:26 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.