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

Re: Ev2 design questions

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Tue, 26 Jun 2012 13:17:30 -0600

On Sun, Jun 24, 2012 at 6:09 PM, Vladimir Berezniker <vmpn_at_hitechman.com> wrote:
> Hi All,
>
> I have been taking a peek at ev2 code to see what it would take for JavaHL
> implementation and I have following questions that do not seem do be covered
> by the docs:
>
>   * svn_ra__get_commit_ev2() takes svn_cancel_func_t as a parameter, however
>     session already has a cancellation callback specified in the
>     svn_ra_callbacks2_t structure. What is the relationship between the two?
>     Is one of these going away?

I've not looked at the session struct, but can explain a bit about the
reason get_commit_ev2() takes a cancellation func/baton.
Historically, we've had a number of places where we'd wrap an editor
with a cancellation editor, which was just a pain. Ev2 folds the
(optional) cancellation editor into the editor itself.

My guess is that in most places, the session cancellation callback and
the one provided to get_commit_ev2() will be the same, though they
will be invoked in different places.

>   * svn_editor_add_directory() function requires that
>     "const apr_array_header_t *children" and "apr_hash_t *props" parameters
>     cannot be NULL, instead an empty structure should be passed. However,
>     svn_editor_alter_directory() permits the same parameters to be NULL.
>     What is the reason for this difference?

In the case of add_directory(), callers MUST provide the list of
children and properties, since they are not known a priori. However,
in the case of alter_directory(), if there are no changes, a NULL
parameter may be used to indicate that. (It would be rather pointless
to require clients to fetch the list of children and then replay them
back to the server if there are no changes.)

-Hyrum

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-06-26 21:18:02 CEST

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.