Checkout
neels
committed
on 01 Nov 08
Merge (lightweight) branch tc-merge-notify to trunk.

Implement per-victim tree-conflicts notification during merge.
Use newly implemented n… Show more
Merge (lightweight) branch tc-merge-notify to trunk.

Implement per-victim tree-conflicts notification during merge.

Use newly implemented notification style in merge operations (as done

for update/switch recently).

Do not show `Skipped' messages within newly tree-conflicted directories.

Pass a boolean SKIP down the item batons and completely skip *all*

action in the editor if SKIP is TRUE (i.e. don't even call diff callbacks).

Since the diff callbacks don't have an item baton to fill, I solved it

by skipping child nodes already in the general editor that calls the diff

callbacks. But it would probably do this code good to move to a standard

editor implementation altogether, like `update/switch' does it.

* subversion/include/svn_wc.h (svn_wc_diff_callbacks3_t): Add a svn_boolean_t

   *TREE_CONFLICTED argument to all of the callbacks functions, which

   returns whether the callback wants this node to be notified as

   tree-conflicted. Returning TRUE in *TREE_CONFLICTED makes a repos

   diff (and consequently a merge) skip any child nodes.

* subversion/libsvn_wc/diff.c

 (file_diff, directory_elements_diff, report_wc_file_as_added,

  report_wc_directory_as_added, delete_entry, close_directory,

  close_file): Pass NULL for new *TREE_CONFLICTED parameter upon calling

   the svn_wc_diff_callbacks3_t callback functions. Currently, handling

   tree-conflicts notifications here is not needed, since there is no

   code using it. Note that this variant of diff will also not skip

   child nodes of a tree-conflicted item for the same reason.

* subversion/libsvn_client/repos_diff.c

 (dir_baton, file_baton): Add two booleans TREE_CONFLICTED and SKIPPED.

 (make_dir_baton, make_file_baton): Default TREE_CONFLICTED to FALSE.

   Default SKIPPED to FALSE.

 (delete_entry, add_directory, open_directory, close_file, close_directory):

   Pass the tree-conflict state through to the notify_func, and change some

   of the logic around the notify action to not show tree-conflicts as

   skipped paths.

 (delete_entry, add_directory, open_directory, add_file, open_file):

   Skip *all* action if the parent node is SKIPped or TREE_CONFLICTED.

   Propagate the SKIP flag to child batons where necessary.

 (window_handler, apply_textdelta, close_file, close_directory,

  change_file_prop, change_dir_prop): Skip *all* action if this node's

   SKIP flag is TRUE.

 (kind_action_state_t): Add a boolean TREE_CONFLICTED field (breaking the

   name kind_action_state_t which says "it has a kind, an action and a

   state") used for notification of deleted nodes.

 (absent_directory, absent_file): Add a question comment.

 

* subversion/libsvn_client/merge.c

 (merge_props_changed, merge_file_changed, merge_file_added,

  merge_file_deleted, merge_dir_added, merge_dir_deleted, merge_dir_opened,

  merge_dir_closed, single_file_merge_notify, do_file_merge): Apply addition

   of new callbacks argument called *TREE_CONFLICTED and use it.

 (merge_cmd_baton_t): Remove obsoleted field TREE_CONFLICTED_DIRS which

   used to list all dirs that contain tree-conflicts.

 (add_parent_to_tree_conflicted_dirs, is_tree_conflicted_dir_p): Remove

   obsoleted functions related to TREE_CONFLICTED_DIRS.

 (do_merge, tree_conflict): Remove use of TREE_CONFLICTED_DIRS.

* subversion/libsvn_client/diff.c

 (diff_props_changed, diff_file_changed, diff_file_added,

 diff_file_deleted_with_diff, diff_file_deleted_no_diff,

 diff_dir_added, diff_dir_deleted, diff_dir_opened, diff_dir_closed):

   Apply addition of callbacks parameter *TREE_CONFLICTED and ignore it.

   These are the callbacks for a plain diff, they don't cause

   tree-conflicts by definition.

* 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, del_differing_file,

  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): Fix up some tests. Intentionally

   leaving some merge tests unfixed for now. Their common problem shall be

   fixed on trunk, since update/switch/checkout are also affected.

Show less