For tree conflicts flagged during merges, record the proper node kinds
of the versions of nodes involved in the conflict (the local working
copy node kind, the merge-left node kind, and the merge-right node kind).

Before this change misleading node kind information was recorded.
For example, nodes which are deleted at the merge-right side of the incoming
change would produce the following conflict information:

Tree conflict: local file edit, incoming file delete or move upon merge
  Source  left: (file) ^/trunk/beta@1
  Source right: (file) ^/branch/beta@3

This is misleading since ^/branch/beta does not exist in r3 since it
was deleted in r2. With this change, the recorded node kind is 'none':

Tree conflict: local file edit, incoming file delete or move upon merge
  Source  left: (file) ^/trunk/beta@1
  Source right: (none) ^/branch/beta@3

* subversion/libsvn_client/merge.c
  (make_conflict_versions): Expect two node kinds, for the left and right
   side of the merge source, instead of just one.
  (merge_dir_baton_t, merge_file_baton_t): Add fields to store node kind
   information for tree conflict victims: tree_conflict_local_node_kind,
   tree_conflict_merge_left_node_kind, and tree_conflict_merge_right_node_kind.
  (record_tree_conflict): Add two node kind parameters for a total of three and
   rename the existing 'node_kind' parameter to 'local_node_kind'.
   Create conflict versions with merge-left/merge-right node kinds. The local
   node kind is used as the victim's node kind in the conflict description.
  (mark_dir_edited, mark_file_edited): Propagate node kind information stored
   in the dir/file baton to record_tree_conflict().
  (merge_file_opened, merge_dir_opened): Fill in all three node kinds involved
   in the conflict.
  (merge_file_changed): Pass merge-left/merge-right node kinds to the
   make_conflict_versions() function. For file edits both are svn_node_file.
  (merge_file_deleted, merge_dir_deleted): Pass all three node kinds involved
   in the conflict to record_tree_conflict().

* subversion/libsvn_wc/tree_conflicts.c
  (svn_wc__serialize_conflict): 'none' is a legal node kind for tree conflicts.
   Adjust an assertion accordingly.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1618024 13f79535-47bb-0310-9956-ffa450edef68
2 files changed