On Mon, Sep 7, 2009 at 08:46, Bert Huijben<rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_wc/lock.c Mon Sep 7 05:46:26 2009 (r39162)
> @@ -1504,9 +1504,28 @@ svn_wc__adm_missing(svn_wc__db_t *db,
> apr_pool_t *scratch_pool)
> {
> const svn_wc_adm_access_t *look;
> + svn_wc__db_status_t status;
> + svn_error_t *err;
>
> look = get_from_shared(local_abspath, db, scratch_pool);
> - return IS_MISSING(look);
> +
> + if (look != NULL)
> + return IS_MISSING(look);
> +
> +
> + err = svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + NULL, NULL, NULL, NULL, NULL, NULL, NULL,
> + db, local_abspath, scratch_pool, scratch_pool);
> +
> + if (err)
> + {
> + svn_error_clear(err);
> + return FALSE;
> + }
> + else
> + return (status == svn_wc__db_status_obstructed);
> }
This is totally unclear on why you can simply throw out all errors. No
comments. No checking of *which* error is possibly expected (and thus
able to be ignored).
And why is status_obstructed so special here?
I could probably figure it out with a bit of digging, but how many
readers will be able to? And a major goal here is to simplify and
clarify. Some excessive comments here will go a long way.
Cheers,
-g
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392303
Received on 2009-09-08 12:02:21 CEST