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

Re: svn commit: r1045385 - in /subversion/trunk/subversion: libsvn_client/status.c tests/cmdline/stat_tests.py

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Mon, 13 Dec 2010 20:37:37 -0600

On Mon, Dec 13, 2010 at 8:16 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> On 12/13/2010 04:43 PM, hwright_at_apache.org wrote:
>> Modified: subversion/trunk/subversion/libsvn_client/status.c
>> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1045385&r1=1045384&r2=1045385&view=diff
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_client/status.c (original)
>> +++ subversion/trunk/subversion/libsvn_client/status.c Mon Dec 13 21:43:57 2010
>> @@ -292,17 +292,16 @@ svn_client_status5(svn_revnum_t *result_
>>      SVN_ERR(svn_io_check_path(target_abspath, &disk_kind, pool));
>>      err = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE, pool);
>>
>> -    if (err && ((err->apr_err == SVN_ERR_WC_MISSING) ||
>> -                (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)))
>> -    {
>> -      /* This error code is checked for in svn to continue after an error */
>> -      svn_error_clear(err);
>> -      return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
>> -                               _("'%s' is not a working copy"),
>> -                               svn_dirent_local_style(path, pool));
>> -    }
>> -
>> -    SVN_ERR(err);
>> +    if (err && (err->apr_err == SVN_ERR_WC_MISSING))
>> +      {
>> +        /* Calling code expects SVN_ERR_WC_NOT_WORKING_COPY. */
>> +        svn_error_clear(err);
>> +        return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
>> +                                 _("'%s' is not a working copy"),
>> +                                 svn_dirent_local_style(path, pool));
>> +      }
>
> You might not be able to answer this, Hyrum, but:  why do we clear 'err'
> instead of feeding it into the svn_error_createf() as the child error?  Are
> we losing any useful information with the current approach?

I can't answer, but the same thought did occur to me. I just forgot
to make it a composition call before committing. +1 to the idea,
though.

-Hyrum
Received on 2010-12-14 03:38:18 CET

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.