You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/06/22 16:07:37 UTC

svn commit: r1686873 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/resolved.c svn/cl-conflicts.c svn/conflict-callbacks.c svn/info-cmd.c

Author: stsp
Date: Mon Jun 22 14:07:37 2015
New Revision: 1686873

URL: http://svn.apache.org/r1686873
Log:
Replace the temporary svn_client_conflict_get_node_kind() macro with a new
function called svn_client_conflict_tree_get_victim_node_kind().

This functionality moves into the svn_client_conflict_tree_* namespace because
in our current resolver implementation the node kind is only ever requested in
the context of tree conflicts.

* subversion/include/svn_client.h
  (svn_client_conflict_tree_get_victim_node_kind): Declare.
  (svn_client_conflict_get_node_kind): Remove.

* subversion/libsvn_client/resolved.c
  (svn_client_conflict_tree_get_victim_node_kind): Implement.

* subversion/svn/cl-conflicts.c
  (svn_cl__get_human_readable_tree_conflict_description,
   append_tree_conflict_info_xml): Update callers.

* subversion/svn/conflict-callbacks.c
  (handle_tree_conflict): Update caller.

* subversion/svn/info-cmd.c
  (print_info): Update caller.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/resolved.c
    subversion/trunk/subversion/svn/cl-conflicts.c
    subversion/trunk/subversion/svn/conflict-callbacks.c
    subversion/trunk/subversion/svn/info-cmd.c

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1686873&r1=1686872&r2=1686873&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Mon Jun 22 14:07:37 2015
@@ -4407,16 +4407,27 @@ svn_client_conflict_get_local_change(
   const svn_wc_conflict_description2_t *conflict);
 
 /**
+ * Return the node kind of the tree conflict victim described by @a conflict.
+ * The victim is the local node in the working copy which was affected by the
+ * tree conflict at the time the conflict was raised.
+ * 
+ * The node kinds of the repository nodes which contributed to this
+ * conflict are available via svn_client_conflict_get_src_left_version()
+ * and svn_client_conflict_get_src_right_version().
+ *
+ * @since New in 1.10.
+ */
+svn_node_kind_t
+svn_client_conflict_tree_get_victim_node_kind(
+  const svn_wc_conflict_description2_t *conflict);
+
+/**
  * Accessor functions for svn_wc_conflict_description2_t. This is a temporary
  * API for eventually replacing svn_wc_conflict_description2_t with an opaque
  * type and providing improved APIs for conflict resolution.
  * 
  * @since New in 1.10. 
  */
-
-#define svn_client_conflict_get_node_kind(conflict) \
-  ((conflict)->node_kind)
-
 #define svn_client_conflict_get_kind(conflict) \
   ((conflict)->kind)
 

Modified: subversion/trunk/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/resolved.c?rev=1686873&r1=1686872&r2=1686873&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/resolved.c (original)
+++ subversion/trunk/subversion/libsvn_client/resolved.c Mon Jun 22 14:07:37 2015
@@ -175,3 +175,10 @@ svn_client_conflict_get_local_change(
 {
   return conflict->reason;
 }
+
+svn_node_kind_t
+svn_client_conflict_tree_get_victim_node_kind(
+  const svn_wc_conflict_description2_t *conflict)
+{
+  return conflict->node_kind;
+}

Modified: subversion/trunk/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl-conflicts.c?rev=1686873&r1=1686872&r2=1686873&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl-conflicts.c (original)
+++ subversion/trunk/subversion/svn/cl-conflicts.c Mon Jun 22 14:07:37 2015
@@ -301,7 +301,7 @@ svn_cl__get_human_readable_tree_conflict
   conflict_action = svn_client_conflict_get_incoming_change(conflict);
   conflict_reason = svn_client_conflict_get_local_change(conflict);
   conflict_operation = svn_client_conflict_get_operation(conflict);
-  conflict_node_kind = svn_client_conflict_get_node_kind(conflict);
+  conflict_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict);
 
   /* Determine the node kind of the incoming change. */
   incoming_kind = svn_node_unknown;
@@ -429,7 +429,7 @@ append_tree_conflict_info_xml(svn_string
 
   svn_hash_sets(att_hash, "kind",
                 svn_cl__node_kind_str_xml(
-                  svn_client_conflict_get_node_kind(conflict)));
+                  svn_client_conflict_tree_get_victim_node_kind(conflict)));
 
   svn_hash_sets(att_hash, "operation",
                 svn_cl__operation_str_xml(

Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1686873&r1=1686872&r2=1686873&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Mon Jun 22 14:07:37 2015
@@ -1195,7 +1195,8 @@ handle_tree_conflict(svn_wc_conflict_res
             {
               if (svn_client_conflict_get_incoming_change(desc) ==
                   svn_wc_conflict_action_edit &&
-                  svn_client_conflict_get_node_kind(desc) == svn_node_dir)
+                  svn_client_conflict_tree_get_victim_node_kind(desc) ==
+                  svn_node_dir)
                 tc_opts = tree_conflict_options_update_edit_deleted_dir;
             }
         }

Modified: subversion/trunk/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/info-cmd.c?rev=1686873&r1=1686872&r2=1686873&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/info-cmd.c (original)
+++ subversion/trunk/subversion/svn/info-cmd.c Mon Jun 22 14:07:37 2015
@@ -669,7 +669,9 @@ print_info(void *baton,
                 SVN_ERR(svn_cl__get_human_readable_action_description(&desc,
                           svn_wc_conflict_action_edit,
                           svn_client_conflict_get_operation(conflict),
-                          svn_client_conflict_get_node_kind(conflict), pool));
+                          svn_client_conflict_tree_get_victim_node_kind(
+                            conflict),
+                          pool));
 
                 SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
                                                _("Conflict Details"), desc));