| This file describes the 'tree-conflicts' branch. |
| |
| The following log message describes /branches/tree-conflicts@32853 relative |
| to its last catch-up point which was /trunk@32852. |
| |
| [[[ |
| Implement basic detection and reporting of tree conflicts. The functional |
| requirements are based on the use cases described in |
| /trunk/notes/tree-conflicts/use-cases.txt, and other relevant notes are |
| recorded in other files in that directory. |
| |
| |
| # USER INTERFACE |
| |
| * subversion/svn/schema/info.rnc |
| (entry): Add a 'tree-conflicts' element to hold a list of tree conflict |
| victims if this is a directory. |
| (tree-conflicts, tree-conflict, attlist.tree-conflict): New definitions. |
| |
| * subversion/svn/schema/status.rnc |
| (attlist.wc-status): Add a 'tree-conflicted' boolean attribute indicating |
| that this is a directory with tree conflict victims. |
| |
| * subversion/svn/info-cmd.c |
| (print_info_xml, print_info): In a directory, print information about its |
| tree-conflict victims. |
| |
| * subversion/svn/notify.c |
| (notify): In 'update' notifications, make the 'C'onflict indicator available |
| on directories as well as files. |
| |
| * subversion/svn/status.c |
| (print_status): If a directory contains tree conflict victims, show 'C' in |
| its 'text status' column. |
| (svn_cl__print_status_xml): Add 'tree-conflicted=true' to indicate a tree |
| conflict. |
| |
| * subversion/svn/tree-conflicts.c, |
| subversion/svn/tree-conflicts.h |
| New files. |
| |
| |
| # PUBLIC API |
| |
| * subversion/include/svn_client.h |
| (svn_info_t): Add a field to hold the tree conflicts info for this node. |
| |
| ### That's odd: is this really the only change to the client-level API? |
| |
| * subversion/include/svn_wc.h |
| (svn_wc_conflict_reason_t): Add a value representing 'added'. |
| (svn_wc_conflict_kind_t): Add a value representing 'tree conflict'. |
| (svn_wc_operation_t): New enumeration. |
| (svn_wc_conflict_description_t): Add fields representing the operation |
| resulting in a conflict, and the victim of a tree conflict. |
| (svn_wc_conflict_description_create_tree): New function. |
| (svn_wc_entry_t): Add a 'tree_conflict_data' field. |
| (svn_wc_conflicted_p2): New function to support tree conflicts, |
| superseding svn_wc_conflicted_p() which becomes deprecated. |
| ### svn_wc_conflicted_p() should be deprecated. Done in r32858. |
| (svn_wc_status2_t): Add a flag indicating 'dir contains tree conflicts'. |
| ### Want instead a flag indicating 'this item is a tree conflict victim'. |
| (svn_wc_resolved_conflict4): New function to support tree conflicts, |
| superseding svn_wc_resolved_conflict3(). |
| (svn_wc_resolved_conflict3): Deprecate. |
| (svn_wc_read_tree_conflicts_from_entry): New function. |
| (svn_wc_add_tree_conflict_data): New function. |
| |
| ### Can we make the new 'operation' field a universal enhancement, rather than |
| specific to tree conflicts? |
| |
| ### The 'victim_path' field is redundant. It should be removed and its use |
| replaced by use of the basename of 'path'. |
| |
| |
| # LIBSVN_CLIENT |
| |
| * subversion/libsvn_client/commit_util.c |
| (harvest_committables): When checking if there are any conflicts, also |
| check for tree conflicts. |
| |
| * subversion/libsvn_client/info.c |
| (build_info_from_dirent): Initialise the 'tree_conflicts' field to NULL. |
| (build_info_from_entry): If processing 'THIS_DIR', fill in the tree |
| conflicts info. |
| |
| * subversion/libsvn_client/merge.c |
| (merge_cmd_baton_t): Add a 'tree_conflicted_dirs' field to hold a list of |
| directories containing tree conflicts. |
| (add_parent_to_tree_conflicted_dirs, tree_conflict, |
| is_tree_conflicted_dir_p): New functions. |
| (merge_file_changed): If the file isn't versioned in the WC, or isn't a |
| file on disk, then in addition to reporting it as missing, raise a tree |
| conflict. |
| (merge_file_added): If the file is obstructed, raise a tree conflict. |
| (merge_file_deleted): If the file to be deleted doesn't match what is |
| present, raise a tree conflict. |
| (merge_dir_added): If the dir is obstructed, raise a tree conflict. |
| (merge_dir_deleted): If obstructed, raise a tree conflict. |
| ### Only does so in some cases. |
| (merge_dir_opened): If obstructed, raise a tree conflict. |
| (merge_dir_closed): If we encountered any tree conflicts within this |
| directory tree, notify that fact. |
| (do_merge): Initialise the merge_cmd_baton's new 'tree_conflicted_dirs' |
| field. |
| |
| * subversion/libsvn_client/repos_diff.c |
| (close_directory): For the 'content_state' field of the notification, |
| use the state that the 'close_directory' diff callback provided. |
| |
| * subversion/libsvn_client/resolved.c |
| (svn_client_resolve): Resolve tree conflicts as well as other conflicts, by |
| using svn_wc_resolved_conflict4() instead of svn_wc_resolved_conflict3(). |
| |
| |
| # LIBSVN_WC |
| |
| * subversion/libsvn_wc/adm_ops.c |
| (revert_admin_things): Extend to support the 'tree_conflict_data' field. |
| (resolve_conflict_on_entry, resolve_callback_baton, |
| resolve_found_entry_callback): Extend to support tree conflicts as well |
| as other conflicts. |
| (svn_wc_resolved_conflict3): Re-implement as a wrapper around ... |
| (svn_wc_resolved_conflict4): New function. |
| |
| * subversion/libsvn_wc/entries.c |
| (read_entry, svn_wc__atts_to_entry, write_entry, fold_entry, |
| svn_wc_entry_dup): Extend to support the 'tree_conflict_data' field. |
| |
| * subversion/libsvn_wc/entries.h |
| (SVN_WC__ENTRY_ATTR_TREE_CONFLICT_DATA): New constant. |
| (SVN_WC__ENTRY_MODIFY_TREE_CONFLICT_DATA): New constant. |
| |
| * subversion/libsvn_wc/log.c |
| (log_do_committed, svn_wc__loggy_entry_modify): Extend to support the |
| 'tree_conflict_data' field. |
| |
| * subversion/libsvn_wc/questions.c |
| (svn_wc_conflicted_p): Re-implement as a wrapper around... |
| (svn_wc_conflicted_p2): New function. |
| |
| * subversion/libsvn_wc/status.c |
| (dir_baton): Add a 'tree_conflicted' flag. |
| (assemble_status, is_sendable_status): Support tree conflict indications. |
| (close_directory): Support tree conflict indications. |
| |
| * subversion/libsvn_wc/tree_conflicts.c, |
| subversion/libsvn_wc/tree_conflicts.h |
| New files. |
| |
| * subversion/libsvn_wc/update_editor.c |
| (bump_dir_info): Update a doc-string to allow for a directory to have tree |
| conflicts. |
| (entry_has_local_mods, check_tree_conflict): New functions. |
| (do_entry_deletion): Have the parent's admin access baton passed in by the |
| caller. Check for tree conflicts. |
| ### Broken when parent_adm_access is NULL. |
| (delete_entry): Pass the parent's admin access baton to do_entry_deletion(). |
| (add_directory): If obstructed, raise a tree conflict. |
| ### Lots of uncertainty/unfinished. |
| (open_directory): Check for existing tree conflicts as well as property |
| conflicts. If obstructed, raise a tree conflict. |
| (close_directory): Set the notification's 'content_state' field according |
| to whether there were any tree conflicts in this directory. |
| (add_file): If obstructed, raise a tree conflict. |
| ### Questions/unfinished. |
| (open_file): If scheduled for delete, raise a tree conflict. |
| (add_file_with_history): Check for a tree conflict. |
| ### Error: discards the log_accum that it creates. |
| (close_edit): Adjust for the new interface to do_entry_deletion(): pass |
| NULL for its new 'parent_adm_access' argument. |
| |
| |
| # TESTS |
| |
| * subversion/tests/cmdline/checkout_tests.py |
| (forced_checkout_with_versioned_obstruction): Adapt the error message and |
| extend the test. (r31364) |
| ### FAIL: checkout_tests.py 13: co handles obstructing paths scheduled for add |
| |
| * subversion/tests/cmdline/commit_tests.py |
| (commit_fails_at_path): New function. |
| (tree_conflicts_block_commit, tree_conflicts_resolved): New test functions. |
| (test_list): Add the new tests. |
| |
| * subversion/tests/cmdline/info_tests.py |
| New file of tests. |
| |
| * subversion/tests/cmdline/log_tests.py |
| (merge_history_repos): Add an extra 'resolve' to match the current code |
| that raises a conflict on the parent. Add some comments. |
| |
| * subversion/tests/cmdline/merge_tests.py |
| (delete_file_and_dir, merge_catches_nonexistent_target, |
| merge_tree_deleted_in_target, merge_added_dir_to_deleted_in_target, |
| three_way_merge_add_of_existing_binary_file, merge_skips_obstructions, |
| merge_into_missing, merge_add_over_versioned_file_conflicts, |
| avoid_reflected_revs, merge_fails_if_subtree_is_deleted_on_src, |
| mergeinfo_recording_in_skipped_merge): Tweak to expect tree conflicts. |
| (verify_lines, verify_tree_conflict_info): New functions. |
| (tree_conflicts_and_obstructions, |
| tree_conflicts_on_merge_local_ci_4_1, tree_conflicts_on_merge_local_ci_4_2, |
| tree_conflicts_on_merge_local_ci_5_1, tree_conflicts_on_merge_local_ci_5_2, |
| tree_conflicts_on_merge_local_ci_6, |
| tree_conflicts_on_merge_no_local_ci_4_1, |
| tree_conflicts_on_merge_no_local_ci_4_2, |
| tree_conflicts_on_merge_no_local_ci_5_1, |
| tree_conflicts_on_merge_no_local_ci_5_2, |
| tree_conflicts_on_merge_no_local_ci_6): New test functions. |
| (test_list): Mark four tests as XFAIL. Add the new tests. |
| ### FAIL: merge_tests.py 103: merge tries to delete a file of different content |
| |
| * subversion/tests/cmdline/revert_tests.py |
| (revert_tree_conflicts_in_updated_files): New test function. |
| (test_list): Add the new test. |
| |
| * subversion/tests/cmdline/stat_tests.py |
| (status_with_tree_conflicts): New test function. |
| (test_list): Add the new test. |
| |
| * subversion/tests/cmdline/switch_tests.py |
| (failed_anchor_is_target): Change an expected status to 'C', because a tree |
| conflict is raised. |
| (tree_conflicts_on_switch_1_1, tree_conflicts_on_switch_1_2, |
| tree_conflicts_on_switch_2_1, tree_conflicts_on_switch_2_2, |
| tree_conflicts_on_switch_3): New test functions. |
| (test_list): Add the new tests. |
| ### FAIL: switch_tests.py 21: forced switch fails with some types of obstruction |
| ### FAIL: switch_tests.py 24: switch tolerates WC adds |
| ### FAIL: switch_tests.py 33: tree conflicts on switch 2.1 |
| |
| * subversion/tests/cmdline/tree_conflict_tests.py |
| New file of tests. |
| |
| * subversion/tests/cmdline/tree_conflict_tests.txt |
| New file documenting tree_conflict_tests.py. |
| |
| * subversion/tests/cmdline/update_tests.py |
| (update_delete_modified_files, prop_update_on_scheduled_delete): Tweak to |
| expect tree conflicts. |
| (tree_conflicts_on_update_1_1, tree_conflicts_on_update_1_2, |
| tree_conflicts_on_update_2_1, tree_conflicts_on_update_2_2, |
| tree_conflicts_on_update_3): New test functions. |
| (test_list): Add the new tests. |
| ### FAIL: update_tests.py 14: update missing dir to rev in which it is absent |
| ### FAIL: update_tests.py 15: another "hudson" problem: updates that delete |
| ### FAIL: update_tests.py 31: forced up fails with some types of obstructions |
| ### FAIL: update_tests.py 33: update wc containing a replaced-with-history file |
| ### FAIL: update_tests.py 34: update handles obstructing paths scheduled for add |
| |
| * subversion/tests/cmdline/svntest/actions.py |
| (build_greek_tree_conflicts, make_deep_trees, add_deep_trees, |
| deep_trees_virginal_state, deep_trees_leaf_edit, deep_trees_after_leaf_edit, |
| deep_trees_leaf_del, deep_trees_after_leaf_del, deep_trees_tree_del, |
| deep_trees_after_tree_del, DeepTreesTestCase, |
| deep_trees_run_tests_scheme_for_update, |
| deep_trees_run_tests_scheme_for_switch, |
| deep_trees_run_tests_scheme_for_merge): New functions. |
| |
| * subversion/tests/libsvn_wc/tree-conflict-data-test.c |
| New file of tests. |
| |
| |
| # BUILD SYSTEM |
| |
| * build.conf |
| (options): Add 'info_tests.py' and 'tree_conflicts_tests.py' to |
| 'test-scripts'. |
| (tree-conflict-data-test): New section. |
| (__ALL_TESTS__): Add 'tree-conflict-data-test' to 'libs'. |
| |
| ]]] |