You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jay Berkenbilt <ej...@ql.org> on 2005/10/10 17:00:25 UTC

incompatible change in perl API in 1.2

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 <ej...@ql.org>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org