Make svn_wc__db_scan_addition() provide information about the local source of a move for nodes with a 'moved-here' status.
Some future callers will only want to act on the op-roots involved in a move, e.g. the commit code detecting whether both halfs of a move are among the commit targets.
Other future callers might want to act directly on children of the op-roots, e.g. code performing automatic tree conflict resolution.
So scan_addition() provides both the moved_from abspath and the abspath of the operation root of the delete-half of the move. This should satisfy either use case to some degree. It might not be the optimal solution for all use cases but won't hurt, either.
* subversion/libsvn_wc/wc_db.c (svn_wc__db_scan_addition, scan_addition): New output parameters MOVED_FROM_ABSPATH and DELETE_OP_ROOT_ABSPATH. (get_moved_from_info): New helper function which computes values for above new output parameters. (scan_addition_baton_t): Add MOVED_FROM_ABSPATH and DELETE_OP_ROOT_ABSPATH. (scan_addition_txn): Run get_moved_from_info() for 'moved-here' nodes. (get_info_for_copy, read_url_txn, svn_wc__db_global_relocate): Update scan_addition() calls.
* subversion/libsvn_wc/wc_db.h (svn_wc__db_scan_addition): Update declaration and docstring.
* subversion/libsvn_wc/wc-queries.sql (STMT_SELECT_MOVED_FROM_RELPATH): New query which selects the 'moved-from' path corresponding to a 'moved-here' node.
* subversion/tests/libsvn_wc/db-test.c (TESTING_DATA): Create another row for the delete-half of a move. svn_wc__db_scan_addition() now treats a move without a delete-half as if it was a normal a copy. (We've been recording delete-halfs since r1151166.) (test_scan_addition): Check for moved-from information scan_addition() now returns for 'moved-here' nodes.
The remaining items list updated callers of svn_wc__db_scan_addition(). All of them pass NULL for the new output parameters.