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

Re: svn commit: r1331088 - /subversion/branches/ev2-export/subversion/libsvn_client/add.c

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 26 Apr 2012 17:30:15 -0400

On Thu, Apr 26, 2012 at 17:22, Greg Stein <gstein_at_gmail.com> wrote:
> On Thu, Apr 26, 2012 at 17:09, Hyrum K Wright <hyrum.wright_at_wandisco.com> wrote:
>> On Thu, Apr 26, 2012 at 4:07 PM, Greg Stein <gstein_at_gmail.com> wrote:
>>> On Thu, Apr 26, 2012 at 17:04,  <hwright_at_apache.org> wrote:
>>>>...
>>>> +++ subversion/branches/ev2-export/subversion/libsvn_client/add.c Thu Apr 26 21:04:42 2012
>>>> @@ -954,16 +954,18 @@ mkdir_urls(const apr_array_header_t *url
>>>>   base_relpath = svn_uri_skip_ancestor(repos_root, common, pool);
>>>>
>>>>   /* Fetch RA commit editor */
>>>> -  SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
>>>> -                        svn_client__get_shim_callbacks(ctx->wc_ctx, NULL,
>>>> -                                                       pool)));
>>>> -  SVN_ERR(svn_ra_get_commit_editor4(ra_session, &editor,
>>>> -                                    commit_revprops,
>>>> -                                    commit_callback,
>>>> -                                    commit_baton,
>>>> -                                    NULL, TRUE, /* No lock tokens */
>>>> -                                    ctx->cancel_func, ctx->cancel_baton,
>>>> -                                    pool, pool));
>>>> +  SVN_ERR(svn_ra__get_commit_ev2(&editor, ra_session,
>>>> +                                 commit_revprops,
>>>> +                                 commit_callback,
>>>> +                                 commit_baton,
>>>> +                                 NULL, TRUE, /* No lock tokens */
>>>> +                                 svn_client__ra_provide_base,
>>>> +                                 svn_client__ra_provide_props,
>>>> +                                 svn_client__ra_get_copysrc_kind,
>>>> +                                 svn_client__ra_make_cb_baton(ctx->wc_ctx,
>>>> +                                                              NULL, pool),
>>>> +                                 ctx->cancel_func, ctx->cancel_baton,
>>>> +                                 pool, pool));
>>>
>>> The callbacks need the RELPATH_MAP. If you don't have one, then just
>>> pass NULL for all callbacks and the baton. That tells RA "I don't have
>>> any local information for you."
>>
>> Fair enough.  The tests didn't assert, so I figured the above was
>> valid.  Perhaps add an assert?
>
> ra_local doesn't use them.
>
> I would expect a segfault for ra_* because they'd get the RA Ev2/Ev1
> shim installed (see libsvn_ra/editor.c). That would attempt to use the
> provide_base callback, which would then attempt to examine the
> relpath_map (NULL).

Correction: provide_props. But the same result: apr_hash_get(NULL, ...). Boom.

> Did you try on something besides ra_local?
>
> (and yes, I'll add an assert)

r1331105.
Received on 2012-04-26 23:30:48 CEST

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