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

Re: svn commit: r39162 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 8 Sep 2009 06:01:57 -0400

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

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.