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

RE: svn commit: r1441125 - in /subversion/trunk/subversion: libsvn_wc/conflicts.c libsvn_wc/wc-queries.sql libsvn_wc/wc_db.h libsvn_wc/wc_db_update_move.c tests/libsvn_wc/op-depth-test.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 31 Jan 2013 20:21:03 +0100

> -----Original Message-----
> From: philip_at_apache.org [mailto:philip_at_apache.org]
> Sent: donderdag 31 januari 2013 20:00
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1441125 - in /subversion/trunk/subversion:
> libsvn_wc/conflicts.c libsvn_wc/wc-queries.sql libsvn_wc/wc_db.h
> libsvn_wc/wc_db_update_move.c tests/libsvn_wc/op-depth-test.c
>
> Author: philip
> Date: Thu Jan 31 19:00:12 2013
> New Revision: 1441125
>
> URL: http://svn.apache.org/viewvc?rev=1441125&view=rev
> Log:
> Fix some of issue 4303, move-update for moves in deletes.
>
> * subversion/libsvn_wc/conflicts.c
> (resolve_conflict_on_node): Raise conflicts on moves in deletes.
>
> * subversion/libsvn_wc/wc-queries.sql
> (STMT_SELECT_OP_DEPTH_MOVED_PAIR): New.
>
> * subversion/libsvn_wc/wc_db.h
> (svn_wc__db_resolve_delete_raise_moved_away): New.
>
> * subversion/libsvn_wc/wc_db_update_move.c
> (mark_tree_conflict): Add repos relpath parameter, use it to construct
> conflict repos relpaths.
> (check_tree_conflict): Add kind and relpath parameters.
> (tc_editor_add_directory, tc_editor_add_file,
> tc_editor_delete): Get kind and relpath.
> (tc_editor_alter_directory, tc_editor_alter_file): Get kind and relpath
> before checking for conflict.
> (resolve_delete_raise_moved_away,
> svn_wc__db_resolve_delete_raise_moved_away): New.
>
> * subversion/tests/libsvn_wc/op-depth-test.c
> (move_in_delete): Resolve delete-edit then move-edit.
> (layered_moved_to): Resolve delete-edit (still XFAIL).
> (test_funcs): Mark move_in_delete PASS.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/conflicts.c
> subversion/trunk/subversion/libsvn_wc/wc-queries.sql
> subversion/trunk/subversion/libsvn_wc/wc_db.h
> subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
> subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/confl
> icts.c?rev=1441125&r1=1441124&r2=1441125&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/conflicts.c Thu Jan 31 19:00:12
> 2013

> + if (reason == svn_wc_conflict_reason_deleted)
> + {
> + /* ### FIXME. At the moment this is a separate transaction
> + ### but it should somehow be combined with the transaction
> + ### in svn_wc__db_op_mark_resolved. Perhaps move this
> + ### functionality into that function? Perhaps have this
> + ### function generate "raise conflict" workqueue items? */
> + SVN_ERR(svn_wc__db_resolve_delete_raise_moved_away(db,
> local_abspath,
> + scratch_pool));
> + }

Please don't create workqueue items, which task it is to just update the db. That leaves the db in an unstable state between two workqueue items.

The DB should be in its final state before running the workqueue, which task it is to keep the working copy in synch with the database.

And yes, the conflict resolving can use quite a bit more atomicity...
Moving the --accept logic and callbacks through conflicts.c removed a lot of stability guarantees.

It is probably still better than the entry-like code in 1.7, but it can use some work.

        Bert
Received on 2013-01-31 20:21:49 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.