Checkout
rhuijben
committed
on 23 Feb 15
Fix the move state corruption problem found during the recent wc-db
work, where an incoming delete was turned into a copy, but some moves
th… Show more
Fix the move state corruption problem found during the recent wc-db

work, where an incoming delete was turned into a copy, but some moves

that can't be represented after making a copy were only half broken.

* subversion/libsvn_wc/wc-queries.sql

 (STMT_SELECT_MOVED_DESCENDANTS_SHD,

  STMT_SELECT_MOVED_DESCENDANTS_SRC): Also scan the node itself for moves.

* subversion/libsvn_wc/wc_db.c

 (db_move_moved_to): New function. Similar to the old make_copy_move_moved_to.

 (db_move_moved_to_down_recursive): New function.

    Extracted from svn_wc__db_op_make_copy_internal.

 (make_copy_txn): Introduce not present nodes after recursing, to avoid making

    the move information invalid. Move moves to the original shadowing layer

    if we can't represent them in WORKING. Update caller.

 (svn_wc__db_op_make_copy_internal): Update caller.

* subversion/tests/libsvn_wc/op-depth-test.c

 (verify_db_callback,

  verify_db): New function.

 (make_copy_mixed,

  make_copy_and_delete_mixed): Call verify_db to fail on

    invalid db state.

 (test_list): Remove XFail marker from make_copy_and_delete_mixed.

Show less