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

incompatible change in perl API in 1.2

From: Jay Berkenbilt <ejb_at_ql.org>
Date: 2005-10-10 19:00:25 CEST

I have some code that uses Subversion's Perl APIs that I needed to
change for subversion 1.2 because of an incompatible change to the
perl API resulting from locking support. Specifically,
SVN::Ra::get_commit_editor now requires additional arguments for lock
tokens and keep locks. It seems to me that the perl APIs, like the C
APIs, should provide a method with the old syntax that passes
appropriate default values for the new arguments. I'm guessing this
was a simple oversight, or perhaps some side effect of how the Perl
APIs are generated.

I coded a trivial workaround to the problem in my own code, which also
serves to illustrate the details of the problem, but it hard-codes
version information and is therefore ugly. I feel that it should not
have been needed.

Is this a bug? If so, should I report it?

I apologize if this is a duplicate -- I've been away from the list for
a couple of months, though I did search the list archives for this
issue before posting.

Here's a code excerpt:

    my $ra = SVN::Ra->new($repos_path);
    my @extra_args = (undef, {}, 1);
    if (($SVN::Core::VER_MAJOR <= 1) && ($SVN::Core::VER_MINOR < 2))
    {
        @extra_args = ();
    }
    my $editor = SVN::Delta::Editor->new
        ($ra->get_commit_editor($log_msg, sub { $rep->_committed(@_) },
         @extra_args));

Thanks.

-- 
Jay Berkenbilt <ejb@ql.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 10 19:01:30 2005

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

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