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

Re: [PATCH] do_switch still broken with Perl bindings in 1.4.3

From: Eric Wong <normalperson_at_yhbt.net>
Date: 2007-01-31 21:57:07 CET

Nik Clayton <nik@ngo.org.uk> wrote:
> Eric,
>
> Eric Wong wrote:
> >It looks like an at attempt was made to wrap the switch and
> >status editors correctly for 1.4.3, but it was missing the
> >other typemap changes that were only in trunk.
>
> Do you have a simple test case (or could you write one) that demonstrates
> the problem?

Yes, it's a simple TypeError exception that gets thrown:

        "TypeError in method 'svn_ra_do_switch', argument 8 of type
        'svn_delta_editor_t const *'"

----------------------------- 8< ------------------------------
#!/usr/bin/perl -w
use strict;
use SVN::Ra;
use SVN::Delta;
my $url = 'http://svn.collab.net/repos/svn';
my $ra = SVN::Ra->new($url);
my $pool = SVN::Pool->new;
my $editor = SVN::Delta::Editor->new;
$ra->do_switch($ra->get_latest_revnum, '', 0, $url, $editor, $pool);
print "OK: No TypeError exception\n";
----------------------------- 8< ------------------------------

Working code that uses it (complete with editor usage) is in git-svn
(part of the git project):

http://kernel.org/git/?p=git/git.git;a=blob_plain;f=git-svn.perl;hb=HEAD

I currently fallback to doing a full update (checkout) if do_switch does
not work.

-- 
Eric Wong
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 31 21:57:58 2007

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