On Mar 12, 2009, at 6:34 PM, Greg Stein wrote:
> Back up.
>
> These tweaks are not working out.
This demonstrates the difficulty my little brain sometimes has
grokking WC-NG. :/
> When you read properties: look in ACTUAL, then WORKING, then BASE.
We don't currently do this anywhere. We have a
svn_wc__db_base_get_props() API which does what one would expect,
based on the name. Do we need another API which does this dance you
describe? Public or private (to the file)?
> When you write properties, then you've got a whole different issue.
> Those always go into ACTUAL, but props might not be there (yet). So
> you may have to INSERT a copy of them. Or maybe a row exists, so you
> need to UPDATE the props column to create an initial value. That
> initial value comes form WORKING or from BASE. Then, after the copy,
> you can update props in ACTUAL.
Okay, that makes sense, and I'll update svn_wc__db_op_set_props()
accordingly. I presume that svn_wc__db_op_set_prop() just does the
same thing, but replaces the given prop, such as is already happening.
> Of course, if there are props in ACTUAL, and somebody tries to add a
> row to WORKING, then you've got a conflict: those props are against
> BASE, but somebody is trying to alter that. You essentially have
> "local mods".
>
> These functions need to be much more complete.
>
> Cheers,
> -g
>
> On Thu, Mar 12, 2009 at 20:37, Hyrum K. Wright
> <hyrum_at_hyrumwright.org> wrote:
>> Author: hwright
>> Date: Thu Mar 12 12:37:14 2009
>> New Revision: 36517
>>
>> Log:
>> Modifying properties should be done to the ACTUAL tree, not the
>> WORKING tree.
>>
>> * subversion/libsvn_wc/wc_db.c
>> (statement_keys, statements): Rename enums and adjust SQL to
>> select and
>> update the ACTUAL table.
>> (svn_wc__db_op_set_prop, svn_wc__db_op_set_props): Update enum
>> references.
>>
>> Modified:
>> trunk/subversion/libsvn_wc/wc_db.c
>>
>> Modified: trunk/subversion/libsvn_wc/wc_db.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/wc_db.c?pathrev=36517&r1=36516&r2=36517
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- trunk/subversion/libsvn_wc/wc_db.c Thu Mar 12 12:29:05
>> 2009 (r36516)
>> +++ trunk/subversion/libsvn_wc/wc_db.c Thu Mar 12 12:37:14
>> 2009 (r36517)
>> @@ -163,8 +163,8 @@ enum statement_keys {
>> STMT_SELECT_WORKING_IS_FILE,
>> STMT_SELECT_BASE_IS_FILE,
>> STMT_SELECT_BASE_PROPS,
>> - STMT_SELECT_WORKING_PROPS,
>> - STMT_UPDATE_WORKING_PROPS
>> + STMT_SELECT_ACTUAL_PROPS,
>> + STMT_UPDATE_ACTUAL_PROPS
>> };
>>
>> static const char * const statements[] = {
>> @@ -233,10 +233,10 @@ static const char * const statements[] =
>> "select properties from base_node "
>> "where wc_id = ?1 and local_relpath = ?2;",
>>
>> - "select properies from working_node "
>> + "select properies from actual_node "
>> "where wc_id = ?1 and local_relpath = ?2;",
>>
>> - "update working_node set properties = ?3 "
>> + "update actual_node set properties = ?3 "
>> "where wc_id = ?1 and local_relpath = ?2;",
>>
>> NULL
>> @@ -2032,7 +2032,7 @@ svn_wc__db_op_set_prop(svn_wc__db_t *db,
>>
>> /* Retrieve the existing properties. */
>> SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->sdb,
>> - STMT_SELECT_WORKING_PROPS));
>> + STMT_SELECT_ACTUAL_PROPS));
>> SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wc_id, local_relpath));
>> SVN_ERR(svn_sqlite__step(&have_row, stmt));
>> if (!have_row)
>> @@ -2068,7 +2068,7 @@ svn_wc__db_op_set_props(svn_wc__db_t *db
>> scratch_pool, scratch_pool));
>>
>> SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->sdb,
>> - STMT_UPDATE_WORKING_PROPS));
>> + STMT_UPDATE_ACTUAL_PROPS));
>> SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wc_id, local_relpath));
>> SVN_ERR(svn_sqlite__bind_properties(stmt, 3, props, scratch_pool));
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1314125
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1314774
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1317621
Received on 2009-03-13 16:15:58 CET