[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: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 13 Dec 2010 21:16:17 -0500

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?

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
Received on 2010-12-14 03:17:01 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.