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

Re: svn commit: r1357313 - in /subversion/trunk/subversion/svn: cl.h notify.c update-cmd.c

From: Paul Burba <ptburba_at_gmail.com>
Date: Wed, 5 Sep 2012 17:25:19 -0400

On Wed, Sep 5, 2012 at 11:11 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> Stefan Sperling wrote:
>
>> On Tue, Sep 04, 2012 at 03:01:22PM -0400, Paul Burba wrote:
>>> I just noticed that this causes a segfault when updating with
>>> the quiet option:
>>
>> Thanks for digging into this and explaining the problem, Paul.
>>
>> I cannot think of a better way to fix this than recording in
>> opt_state whether the notifier is being used. That way we
>> have a way of telling whether it is safe to ask the notifier
>> for a list of conflicted paths.
>>
>> What you do think?
>
> Just a drive-by comment: isn't "ctx->notify_func2 != NULL" a good "notifier is in use" flag?

I think you mean ctx->notify_func? Because
libsvn_client/ctx.c:svn_client_create_context unconditionally sets the
notify_func2 member to libsvn_client/ctx.c:call_notify_func, which
calls...ctx->notify_func. So the latter would work, but it seems a
bit dubious since svn_client_ctx_t->notify_func is deprecated:

  typedef struct svn_client_ctx_t
  {
    /** main authentication baton. */
    svn_auth_baton_t *auth_baton;

    /** notification callback function.
     * This will be called by notify_func2() by default.
     * @deprecated Provided for backward compatibility with the 1.1 API.
     * Use @c notify_func2 instead. */
    svn_wc_notify_func_t notify_func;

I think Stefan's suggested patch is the clearer solution.

-- 
Paul T. Burba
CollabNet, Inc. -- www.collab.net -- Enterprise Cloud Development
Skype: ptburba
> (And I removed 'commits@' from the CC.)
>
> - Julian
Received on 2012-09-05 23:25:52 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.