[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: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Tue, 8 Sep 2009 15:26:03 +0200

> -----Original Message-----
> From: Greg Stein [mailto:gstein_at_gmail.com]
> Sent: dinsdag 8 september 2009 12:02
> To: dev_at_subversion.tigris.org
> Subject: Re: svn commit: r39162 - trunk/subversion/libsvn_wc
>
> 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.

The function is

svn_boolean_t
svn_wc__adm_missing is_missing(db, local_abspath, scratch_pool).

So it is impossible to return errors :(
Previously it returned FALSE on all these cases and the obstructed state documents that is equivalent to the old IS_MISSING, which was replaced by this helper.

But I will add some comments.

BTW.
The reason for this patch was that missing directories weren't seen as modified by the status editor when there was no 'missing' access baton to them.

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392442
Received on 2009-09-08 15:26:26 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.