You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/03/11 04:15:38 UTC
Re: svn commit: r915378 - in /subversion/trunk: notes/wc-ng/transitions
subversion/libsvn_wc/wc-queries.sql subversion/libsvn_wc/wc_db.c
Getting back to this...
On Wed, Feb 24, 2010 at 07:15, Bert Huijben <be...@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
Re: svn commit: r915378 - in /subversion/trunk: notes/wc-ng/transitions
subversion/libsvn_wc/wc-queries.sql subversion/libsvn_wc/wc_db.c
Posted by Greg Stein <gs...@gmail.com>.
On Thu, Mar 11, 2010 at 00:15, Greg Stein <gs...@gmail.com> wrote:
>...
>>> 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).
This comment is wrong. status=normal means an unmodified BASE node. If
there is a WORKING node, then another status will always be returned.
I'm about to remove db_working_get_status(), since I'm in that code to
fix an incorrect scan_addition call.
Cheers,
-g