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

Re: svn commit: r915378 - in /subversion/trunk: notes/wc-ng/transitions subversion/libsvn_wc/wc-queries.sql subversion/libsvn_wc/wc_db.c

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 10 Mar 2010 23:15:38 -0500

Getting back to this...

On Wed, Feb 24, 2010 at 07:15, Bert Huijben <bert_at_qqmail.nl> wrote:
>...
>> >> +/* A WORKING version of svn_wc__db_base_get_info, stripped down to
>> >> +   just the status column. */
>> >> +static svn_error_t *
>> >> +db_working_get_status(svn_wc__db_status_t *status,
>> >> +                      svn_wc__db_t *db,
>> >> +                      const char *local_abspath,
>> >> +                      apr_pool_t *result_pool,
>> >> +                      apr_pool_t *scratch_pool) {
>> >
>> > Why reimplement this whole function if a
>> >
>> > return svn_error_return(
>> >   svn_wc__db_read_status(status, ..... several NULLs..., db,
>> local_abspath, scratch_pool...) would suffice?
>> >
>> > _read_info is optimized for the case with many NULLs and has tests
>> > on it. (And we didn't see performance reasons yet to do this same
>> > split for several other helpers)
>>
>> I want both the base and the working presence, the base presence comes
>> from base_get_info but I couldn't see how to reliably distinguish
>> working presence from base presence when using _read_info.  I get
>> SVN_ERR_WC_PATH_NOT_FOUND for no base and no working, and
>> base_shadowed TRUE for base and working, but it was not clear how to
>> distinguish base and no working from no base and working.
>
> Greg?
>
> I think the idea was that you always should be able to tell the difference
> from the status?

read_info() on its own... no, you cannot always tell. status=normal
could refer to a BASE node, or a WORKING node (and base_shadowed could
be FALSE for these two cases).

However. Where this code is called *does* have the information on
whether a BASE node is present (the 'base_none' variable). Thus, it
can certainly distinguish the cases.

If read_info() fails with SVN_ERR_WC_PATH_NOT_FOUND, then great.
temp_op_delete() should not have been called in that case.

If base_none is TRUE, and read_info succeeds, then you have a WORKING node.

If base_none is FALSE, and read_info returns base_shadowed=TRUE, then
you got a WORKING presence; otherwise, a copy of the BASE presence.

> Deleting incomplete, excluded or absent should be a user error.

As stated later in the thread, incomplete should succeed (by clearing
out the incomplete node). I agree that excluded and absent should be
an error.

>...

Cheers,
-g
Received on 2010-03-11 05:16:15 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.