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

RE: svn commit: r1419560 - /subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 10 Dec 2012 17:38:46 +0100

> -----Original Message-----
> From: julianfoad_at_apache.org [mailto:julianfoad_at_apache.org]
> Sent: maandag 10 december 2012 17:29
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1419560 -
> /subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
>
> Author: julianfoad
> Date: Mon Dec 10 16:28:34 2012
> New Revision: 1419560
>
> URL: http://svn.apache.org/viewvc?rev=1419560&view=rev
> Log:
> * subversion/libsvn_wc/wc_db_update_move.c
> (update_working_file): Update a comment.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_
> db_update_move.c?rev=1419560&r1=1419559&r2=1419560&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
> (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Mon
> Dec 10 16:28:34 2012
> @@ -247,8 +247,8 @@ update_working_file(svn_skel_t **work_it
> old_version->props, old_version->props,
> actual_props, propchanges,
> scratch_pool, scratch_pool));
> - /* ### TODO: Make a WQ item in WORK_ITEMS to set new_actual_props
> ... */
> - /* ### Not a direct DB op like this... */
> + /* Install the new actual props. Don't set the conflict_skel yet, because
> + we might need to add a text conflict to it as well. */
> SVN_ERR(svn_wc__db_op_set_props(db, local_abspath,
> new_actual_props,
> svn_wc__has_magic_property(propchanges),

This tells me that the change is not atomic, so this really needs some fix-me comment after all.

The text and properties should be modified in one sqlite operation.
(Or in other words: the db should be updated to its final state, with the installing of the wq items in a single transaction)

I think the standard svn_wc_merge<something>() function should handle this for you in one step, so this function should do something similar.

It is not a problem to install a conflict skel and then to reinstall it later with more details. But it would be a problem for the client to crash between updating the state and installing the conflict. The sqlite transactions should catch that.

        Bert
Received on 2012-12-10 17:39:24 CET

This is an archived mail posted to the Subversion Dev mailing list.