subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1481041 [22/38] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/svncopy/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/server-side/fsfsf...
Date Fri, 10 May 2013 14:58:56 GMT
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.c Fri May 10 14:58:47 2013
@@ -32,6 +32,7 @@
 #include <apr_hash.h>
 #include <apr_errno.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 #include "svn_string.h"
@@ -890,10 +891,9 @@ svn_wc__conflict_read_prop_conflict(cons
 
       for (name = c->children; name; name = name->next)
         {
-          apr_hash_set(*conflicted_prop_names,
-                       apr_pstrmemdup(result_pool, name->data, name->len),
-                       APR_HASH_KEY_STRING,
-                       "");
+          svn_hash_sets(*conflicted_prop_names,
+                        apr_pstrmemdup(result_pool, name->data, name->len),
+                        "");
         }
     }
   c = c->next;
@@ -1216,20 +1216,16 @@ svn_wc__conflict_create_markers(svn_skel
             SVN_ERR(prop_conflict_skel_add(
                             prop_data, propname,
                             old_props
-                                    ? apr_hash_get(old_props, propname,
-                                                   APR_HASH_KEY_STRING)
+                                    ? svn_hash_gets(old_props, propname)
                                     : NULL,
                             mine_props
-                                    ? apr_hash_get(mine_props, propname,
-                                                   APR_HASH_KEY_STRING)
+                                    ? svn_hash_gets(mine_props, propname)
                                     : NULL,
                             their_props
-                                    ? apr_hash_get(their_props, propname,
-                                                   APR_HASH_KEY_STRING)
+                                    ? svn_hash_gets(their_props, propname)
                                       : NULL,
                             their_original_props
-                                    ? apr_hash_get(their_original_props, propname,
-                                                   APR_HASH_KEY_STRING)
+                                    ? svn_hash_gets(their_original_props, propname)
                                       : NULL,
                             result_pool, scratch_pool));
           }
@@ -1283,7 +1279,7 @@ generate_propconflict(svn_boolean_t *con
   svn_wc_conflict_result_t *result = NULL;
   svn_wc_conflict_description2_t *cdesc;
   const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const svn_string_t *new_value = NULL;
 
   SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
@@ -1292,7 +1288,7 @@ generate_propconflict(svn_boolean_t *con
                                FALSE /* show_hidden */,
                                scratch_pool));
 
-  if (kind == svn_kind_none)
+  if (kind == svn_node_none)
     return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
                              _("The node '%s' was not found."),
                              svn_dirent_local_style(local_abspath,
@@ -1300,7 +1296,7 @@ generate_propconflict(svn_boolean_t *con
 
   cdesc = svn_wc_conflict_description_create_prop2(
                 local_abspath,
-                (kind == svn_kind_dir) ? svn_node_dir : svn_node_file,
+                (kind == svn_node_dir) ? svn_node_dir : svn_node_file,
                 propname, scratch_pool);
 
   cdesc->operation = operation;
@@ -1507,7 +1503,7 @@ generate_propconflict(svn_boolean_t *con
       SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath, scratch_pool,
                                     scratch_pool));
 
-      apr_hash_set(props, propname, APR_HASH_KEY_STRING, new_value);
+      svn_hash_sets(props, propname, new_value);
 
       SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, props,
                                       FALSE, NULL, NULL,
@@ -1517,6 +1513,71 @@ generate_propconflict(svn_boolean_t *con
   return SVN_NO_ERROR;
 }
 
+/* Perform a 3-way merge in which conflicts are expected, showing the
+ * conflicts in the way specified by STYLE, and using MERGE_OPTIONS.
+ *
+ * The three input files are LEFT_ABSPATH (the base), DETRANSLATED_TARGET
+ * and RIGHT_ABSPATH.  The output is stored in a new temporary file,
+ * whose name is put into *CHOSEN_ABSPATH.
+ *
+ * The output file will be deleted according to DELETE_WHEN.  If
+ * DELETE_WHEN is 'on pool cleanup', it refers to RESULT_POOL.
+ *
+ * DB and WRI_ABSPATH are used to choose a directory for the output file.
+ *
+ * Allocate *CHOSEN_ABSPATH in RESULT_POOL.  Use SCRATCH_POOL for temporary
+ * allocations.
+ */
+static svn_error_t *
+merge_showing_conflicts(const char **chosen_abspath,
+                        svn_wc__db_t *db,
+                        const char *wri_abspath,
+                        svn_diff_conflict_display_style_t style,
+                        const apr_array_header_t *merge_options,
+                        const char *left_abspath,
+                        const char *detranslated_target,
+                        const char *right_abspath,
+                        svn_io_file_del_t delete_when,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
+{
+  const char *temp_dir;
+  svn_stream_t *chosen_stream;
+  svn_diff_t *diff;
+  svn_diff_file_options_t *diff3_options;
+
+  diff3_options = svn_diff_file_options_create(scratch_pool);
+  if (merge_options)
+    SVN_ERR(svn_diff_file_options_parse(diff3_options,
+                                        merge_options,
+                                        scratch_pool));
+
+  SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir, db,
+                                         wri_abspath,
+                                         scratch_pool, scratch_pool));
+  /* We need to open the stream in RESULT_POOL because that controls the
+   * lifetime of the file if DELETE_WHEN is 'on pool cleanup'.  (We also
+   * want to allocate CHOSEN_ABSPATH in RESULT_POOL, but we don't care
+   * about the stream itself.) */
+  SVN_ERR(svn_stream_open_unique(&chosen_stream, chosen_abspath,
+                                 temp_dir, delete_when,
+                                 result_pool, scratch_pool));
+  SVN_ERR(svn_diff_file_diff3_2(&diff,
+                                left_abspath,
+                                detranslated_target, right_abspath,
+                                diff3_options, scratch_pool));
+  SVN_ERR(svn_diff_file_output_merge2(chosen_stream, diff,
+                                      left_abspath,
+                                      detranslated_target,
+                                      right_abspath,
+                                      NULL, NULL, NULL, NULL, /* markers */
+                                      style,
+                                      scratch_pool));
+  SVN_ERR(svn_stream_close(chosen_stream));
+
+  return SVN_NO_ERROR;
+}
+
 /* Resolve the text conflict on DB/LOCAL_ABSPATH in the manner specified
  * by CHOICE.
  *
@@ -1534,6 +1595,8 @@ generate_propconflict(svn_boolean_t *con
  * DETRANSLATED_TARGET is the detranslated version of 'mine' (see
  * detranslate_wc_file() above).  MERGE_OPTIONS are passed to the
  * diff3 implementation in case a 3-way merge has to be carried out.
+ *
+ * ### This is redundantly similar to resolve_text_conflict_on_node().
  */
 static svn_error_t *
 eval_text_conflict_func_result(svn_skel_t **work_items,
@@ -1579,47 +1642,20 @@ eval_text_conflict_func_result(svn_skel_
       case svn_wc_conflict_choose_theirs_conflict:
       case svn_wc_conflict_choose_mine_conflict:
         {
-          const char *chosen_abspath;
-          const char *temp_dir;
-          svn_stream_t *chosen_stream;
-          svn_diff_t *diff;
-          svn_diff_conflict_display_style_t style;
-          svn_diff_file_options_t *diff3_options;
-
-          diff3_options = svn_diff_file_options_create(scratch_pool);
+          svn_diff_conflict_display_style_t style
+            = choice == svn_wc_conflict_choose_theirs_conflict
+                ? svn_diff_conflict_display_latest
+                : svn_diff_conflict_display_modified;
 
-          if (merge_options)
-             SVN_ERR(svn_diff_file_options_parse(diff3_options,
-                                                 merge_options,
-                                                 scratch_pool));
-
-          style = choice == svn_wc_conflict_choose_theirs_conflict
-                    ? svn_diff_conflict_display_latest
-                    : svn_diff_conflict_display_modified;
-
-          SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir, db,
-                                                 local_abspath,
-                                                 scratch_pool, scratch_pool));
-          SVN_ERR(svn_stream_open_unique(&chosen_stream, &chosen_abspath,
-                                         temp_dir, svn_io_file_del_none,
-                                         scratch_pool, scratch_pool));
-
-          SVN_ERR(svn_diff_file_diff3_2(&diff,
-                                        left_abspath,
-                                        detranslated_target, right_abspath,
-                                        diff3_options, scratch_pool));
-          SVN_ERR(svn_diff_file_output_merge2(chosen_stream, diff,
-                                              left_abspath,
-                                              detranslated_target,
-                                              right_abspath,
-                                              /* markers ignored */
-                                              NULL, NULL,
-                                              NULL, NULL,
-                                              style,
-                                              scratch_pool));
-          SVN_ERR(svn_stream_close(chosen_stream));
-
-          install_from_abspath = chosen_abspath;
+          SVN_ERR(merge_showing_conflicts(&install_from_abspath,
+                                          db, local_abspath,
+                                          style, merge_options,
+                                          left_abspath,
+                                          detranslated_target,
+                                          right_abspath,
+                                          /* ### why not same as other caller? */
+                                          svn_io_file_del_none,
+                                          scratch_pool, scratch_pool));
           remove_source = TRUE;
           *is_resolved = TRUE;
           break;
@@ -1658,7 +1694,7 @@ eval_text_conflict_func_result(svn_skel_
                                           FALSE /* record_fileinfo */,
                                           result_pool, scratch_pool));
     *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
-    
+
     SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db, local_abspath,
                                              result_pool, scratch_pool));
     *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
@@ -1720,42 +1756,33 @@ save_merge_result(svn_skel_t **work_item
 
 
 /* Call the conflict resolver callback for a text conflict, and resolve
- * the conflict if it tells us to do so.
+ * the conflict if the callback tells us to do so.  (Do not mark the
+ * conflict as resolved.)
  *
- * Assume that there is a text conflict on the path DB/LOCAL_ABSPATH.
+ * Assume that there is a text conflict on the path DB/LOCAL_ABSPATH,
+ * and CDESC is the conflict description.
  *
  * Call CONFLICT_FUNC with CONFLICT_BATON to find out whether and how
- * it wants to resolve the conflict.  Pass it a conflict description
- * containing OPERATION, LEFT/RIGHT_ABSPATH, LEFT/RIGHT_VERSION,
- * RESULT_TARGET and DETRANSLATED_TARGET.
+ * it wants to resolve the conflict.
  *
  * If the callback returns a resolution other than 'postpone', then
  * perform that requested resolution and prepare to mark the conflict
- * as resolved.
+ * as resolved ... ?? by adding work items to *WORK_ITEMS ??.
+ *
+ * MERGE_OPTIONS is used if the resolver callback requests a merge.
  *
  * Return *WORK_ITEMS that will do the on-disk work required to complete
  * the resolution (but not to mark the conflict as resolved), and set
  * *WAS_RESOLVED to true, if it was resolved.  Set *WORK_ITEMS to NULL
  * and *WAS_RESOLVED to FALSE otherwise.
- *
- * RESULT_TARGET is the path to the merged file produced by the internal
- * or external 3-way merge, which may contain conflict markers, in
- * repository normal form.  DETRANSLATED_TARGET is the 'mine' version of
- * the file, also in RNF.
  */
 static svn_error_t *
 resolve_text_conflict(svn_skel_t **work_items,
                       svn_boolean_t *was_resolved,
                       svn_wc__db_t *db,
                       const char *local_abspath,
+                      svn_wc_conflict_description2_t *cdesc,
                       const apr_array_header_t *merge_options,
-                      svn_wc_operation_t operation,
-                      const char *left_abspath,
-                      const char *right_abspath,
-                      const svn_wc_conflict_version_t *left_version,
-                      const svn_wc_conflict_version_t *right_version,
-                      const char *result_target,
-                      const char *detranslated_target,
                       svn_wc_conflict_resolver_func2_t conflict_func,
                       void *conflict_baton,
                       apr_pool_t *result_pool,
@@ -1763,8 +1790,6 @@ resolve_text_conflict(svn_skel_t **work_
 {
   svn_wc_conflict_result_t *result;
   svn_skel_t *work_item;
-  svn_wc_conflict_description2_t *cdesc;
-  apr_hash_t *props;
 
   *work_items = NULL;
   *was_resolved = FALSE;
@@ -1772,21 +1797,6 @@ resolve_text_conflict(svn_skel_t **work_
   /* Give the conflict resolution callback a chance to clean
      up the conflicts before we mark the file 'conflicted' */
 
-  SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
-                              scratch_pool, scratch_pool));
-
-  cdesc = svn_wc_conflict_description_create_text2(local_abspath,
-                                                   scratch_pool);
-  cdesc->is_binary = FALSE;
-  cdesc->mime_type = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
-  cdesc->base_abspath = left_abspath;
-  cdesc->their_abspath = right_abspath;
-  cdesc->my_abspath = detranslated_target;
-  cdesc->merged_file = result_target;
-  cdesc->operation = operation;
-  cdesc->src_left_version = left_version;
-  cdesc->src_right_version = right_version;
-
   SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
                         scratch_pool));
   if (result == NULL)
@@ -1802,7 +1812,7 @@ resolve_text_conflict(svn_skel_t **work_
                                     merged-file first: */
                                 result->merged_file
                                   ? result->merged_file
-                                  : result_target,
+                                  : cdesc->merged_file,
                                 result_pool, scratch_pool));
     }
 
@@ -1813,13 +1823,13 @@ resolve_text_conflict(svn_skel_t **work_
                                              db, local_abspath,
                                              result->choice,
                                              merge_options,
-                                             left_abspath,
-                                             right_abspath,
+                                             cdesc->base_abspath,
+                                             cdesc->their_abspath,
                                              /* ### Sure this is an abspath? */
                                              result->merged_file
                                                ? result->merged_file
-                                               : result_target,
-                                             detranslated_target,
+                                               : cdesc->merged_file,
+                                             cdesc->my_abspath,
                                              result_pool, scratch_pool));
       *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
     }
@@ -1830,19 +1840,74 @@ resolve_text_conflict(svn_skel_t **work_
 }
 
 
+/* Set *DESC to a new description of the text conflict in
+ * CONFLICT_SKEL.  If there is no text conflict in CONFLICT_SKEL, return
+ * an error.
+ *
+ * Use OPERATION and shallow copies of LEFT_VERSION and RIGHT_VERSION,
+ * rather than reading them from CONFLICT_SKEL.  Use IS_BINARY and
+ * MIME_TYPE for the corresponding fields of *DESC.
+ *
+ * Allocate results in RESULT_POOL.  SCRATCH_POOL is used for temporary
+ * allocations. */
 static svn_error_t *
-setup_tree_conflict_desc(svn_wc_conflict_description2_t **desc,
-                         svn_wc__db_t *db,
-                         const char *local_abspath,
-                         svn_wc_operation_t operation,
-                         const svn_wc_conflict_version_t *left_version,
-                         const svn_wc_conflict_version_t *right_version,
-                         svn_wc_conflict_reason_t local_change,
-                         svn_wc_conflict_action_t incoming_change,
-                         apr_pool_t *result_pool,
-                         apr_pool_t *scratch_pool)
+read_text_conflict_desc(svn_wc_conflict_description2_t **desc,
+                        svn_wc__db_t *db,
+                        const char *local_abspath,
+                        const svn_skel_t *conflict_skel,
+                        svn_boolean_t is_binary,
+                        const char *mime_type,
+                        svn_wc_operation_t operation,
+                        const svn_wc_conflict_version_t *left_version,
+                        const svn_wc_conflict_version_t *right_version,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
+{
+  *desc = svn_wc_conflict_description_create_text2(local_abspath, result_pool);
+  (*desc)->is_binary = is_binary;
+  (*desc)->mime_type = mime_type;
+  (*desc)->operation = operation;
+  (*desc)->src_left_version = left_version;
+  (*desc)->src_right_version = right_version;
+
+  SVN_ERR(svn_wc__conflict_read_text_conflict(&(*desc)->my_abspath,
+                                              &(*desc)->base_abspath,
+                                              &(*desc)->their_abspath,
+                                              db, local_abspath,
+                                              conflict_skel,
+                                              result_pool, scratch_pool));
+  (*desc)->merged_file = apr_pstrdup(result_pool, local_abspath);
+
+  return SVN_NO_ERROR;
+}
+
+/* Set *CONFLICT_DESC to a new description of the tree conflict in
+ * CONFLICT_SKEL.  If there is no tree conflict in CONFLICT_SKEL, return
+ * an error.
+ *
+ * Use OPERATION and shallow copies of LEFT_VERSION and RIGHT_VERSION,
+ * rather than reading them from CONFLICT_SKEL.
+ *
+ * Allocate results in RESULT_POOL.  SCRATCH_POOL is used for temporary
+ * allocations. */
+static svn_error_t *
+read_tree_conflict_desc(svn_wc_conflict_description2_t **desc,
+                        svn_wc__db_t *db,
+                        const char *local_abspath,
+                        const svn_skel_t *conflict_skel,
+                        svn_wc_operation_t operation,
+                        const svn_wc_conflict_version_t *left_version,
+                        const svn_wc_conflict_version_t *right_version,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   svn_node_kind_t tc_kind;
+  svn_wc_conflict_reason_t local_change;
+  svn_wc_conflict_action_t incoming_change;
+
+  SVN_ERR(svn_wc__conflict_read_tree_conflict(
+            &local_change, &incoming_change, NULL,
+            db, local_abspath, conflict_skel, scratch_pool, scratch_pool));
 
   if (left_version)
     tc_kind = left_version->node_kind;
@@ -1947,20 +2012,16 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                         right_version,
                                         propname,
                                         old_props
-                                          ? apr_hash_get(old_props, propname,
-                                                         APR_HASH_KEY_STRING)
+                                          ? svn_hash_gets(old_props, propname)
                                           : NULL,
                                         mine_props
-                                          ? apr_hash_get(mine_props, propname,
-                                                         APR_HASH_KEY_STRING)
+                                          ? svn_hash_gets(mine_props, propname)
                                           : NULL,
                                         old_their_props
-                                          ? apr_hash_get(old_their_props, propname,
-                                                         APR_HASH_KEY_STRING)
+                                          ? svn_hash_gets(old_their_props, propname)
                                           : NULL,
                                         their_props
-                                          ? apr_hash_get(their_props, propname,
-                                                         APR_HASH_KEY_STRING)
+                                          ? svn_hash_gets(their_props, propname)
                                           : NULL,
                                         resolver_func, resolver_baton,
                                         iterpool));
@@ -1974,30 +2035,29 @@ svn_wc__conflict_invoke_resolver(svn_wc_
           SVN_ERR(svn_wc__mark_resolved_prop_conflicts(db, local_abspath,
                                                        scratch_pool));
         }
+      svn_pool_destroy(iterpool);
     }
 
   if (text_conflicted)
     {
-      const char *mine_abspath;
-      const char *their_original_abspath;
-      const char *their_abspath;
       svn_skel_t *work_items;
       svn_boolean_t was_resolved;
+      svn_wc_conflict_description2_t *desc;
+      apr_hash_t *props;
 
-      SVN_ERR(svn_wc__conflict_read_text_conflict(&mine_abspath,
-                                                  &their_original_abspath,
-                                                  &their_abspath,
-                                                  db, local_abspath,
-                                                  conflict_skel,
-                                                  scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
+                                    scratch_pool, scratch_pool));
+
+      SVN_ERR(read_text_conflict_desc(&desc,
+                                      db, local_abspath, conflict_skel, FALSE,
+                                      svn_prop_get_value(props,
+                                                         SVN_PROP_MIME_TYPE),
+                                      operation, left_version, right_version,
+                                      scratch_pool, scratch_pool));
 
       SVN_ERR(resolve_text_conflict(&work_items, &was_resolved,
-                                    db, local_abspath,
+                                    db, local_abspath, desc,
                                     merge_options,
-                                    operation,
-                                    their_original_abspath, their_abspath,
-                                    left_version, right_version,
-                                    local_abspath, mine_abspath,
                                     resolver_func, resolver_baton,
                                     scratch_pool, scratch_pool));
 
@@ -2018,23 +2078,13 @@ svn_wc__conflict_invoke_resolver(svn_wc_
 
   if (tree_conflicted)
     {
-      svn_wc_conflict_reason_t local_change;
-      svn_wc_conflict_action_t incoming_change;
       svn_wc_conflict_result_t *result;
       svn_wc_conflict_description2_t *desc;
 
-      SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change,
-                                                  &incoming_change,
-                                                  NULL,
-                                                  db, local_abspath,
-                                                  conflict_skel,
-                                                  scratch_pool, scratch_pool));
-
-      SVN_ERR(setup_tree_conflict_desc(&desc,
-                                       db, local_abspath,
-                                       operation, left_version, right_version,
-                                       local_change, incoming_change,
-                                       scratch_pool, scratch_pool));
+      SVN_ERR(read_tree_conflict_desc(&desc,
+                                      db, local_abspath, conflict_skel,
+                                      operation, left_version, right_version,
+                                      scratch_pool, scratch_pool));
 
       /* Tell the resolver func about this conflict. */
       SVN_ERR(resolver_func(&result, desc, resolver_baton, scratch_pool,
@@ -2050,24 +2100,29 @@ svn_wc__conflict_invoke_resolver(svn_wc_
 
 /* Read all property conflicts contained in CONFLICT_SKEL into
  * individual conflict descriptions, and append those descriptions
- * to the CONFLICTS array.
+ * to the CONFLICTS array.  If there is no property conflict in
+ * CONFLICT_SKEL, return an error.
  *
  * If NOT create_tempfiles, always create a legacy property conflict
  * descriptor.
  *
+ * Use NODE_KIND, OPERATION and shallow copies of LEFT_VERSION and
+ * RIGHT_VERSION, rather than reading them from CONFLICT_SKEL.
+ *
  * Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
  * allocations. */
 static svn_error_t *
-read_prop_conflicts(apr_array_header_t *conflicts,
-                    svn_wc__db_t *db,
-                    const char *local_abspath,
-                    svn_skel_t *conflict_skel,
-                    svn_boolean_t create_tempfiles,
-                    svn_wc_operation_t operation,
-                    const svn_wc_conflict_version_t *left_version,
-                    const svn_wc_conflict_version_t *right_version,
-                    apr_pool_t *result_pool,
-                    apr_pool_t *scratch_pool)
+read_prop_conflict_descs(apr_array_header_t *conflicts,
+                         svn_wc__db_t *db,
+                         const char *local_abspath,
+                         svn_skel_t *conflict_skel,
+                         svn_boolean_t create_tempfiles,
+                         svn_node_kind_t node_kind,
+                         svn_wc_operation_t operation,
+                         const svn_wc_conflict_version_t *left_version,
+                         const svn_wc_conflict_version_t *right_version,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
 {
   const char *prop_reject_file;
   apr_hash_t *my_props;
@@ -2076,7 +2131,7 @@ read_prop_conflicts(apr_array_header_t *
   apr_hash_t *conflicted_props;
   apr_hash_index_t *hi;
   apr_pool_t *iterpool;
-  
+
   SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_file,
                                               &my_props,
                                               &their_old_props,
@@ -2092,7 +2147,7 @@ read_prop_conflicts(apr_array_header_t *
       svn_wc_conflict_description2_t *desc;
 
       desc  = svn_wc_conflict_description_create_prop2(local_abspath,
-                                                       svn_node_unknown,
+                                                       node_kind,
                                                        "", result_pool);
 
       /* ### This should be changed. The prej file should be stored
@@ -2123,7 +2178,7 @@ read_prop_conflicts(apr_array_header_t *
       svn_pool_clear(iterpool);
 
       desc  = svn_wc_conflict_description_create_prop2(local_abspath,
-                                                       svn_node_unknown,
+                                                       node_kind,
                                                        propname,
                                                        result_pool);
 
@@ -2133,14 +2188,14 @@ read_prop_conflicts(apr_array_header_t *
 
       desc->property_name = apr_pstrdup(result_pool, propname);
 
-      my_value = apr_hash_get(my_props, propname, APR_HASH_KEY_STRING);
-      their_value = apr_hash_get(their_props, propname,
-                                 APR_HASH_KEY_STRING);
+      my_value = svn_hash_gets(my_props, propname);
+      their_value = svn_hash_gets(their_props, propname);
+      old_value = svn_hash_gets(their_old_props, propname);
 
       /* Compute the incoming side of the conflict ('action'). */
       if (their_value == NULL)
         desc->action = svn_wc_conflict_action_delete;
-      else if (my_value == NULL)
+      else if (old_value == NULL)
         desc->action = svn_wc_conflict_action_add;
       else
         desc->action = svn_wc_conflict_action_edit;
@@ -2148,7 +2203,7 @@ read_prop_conflicts(apr_array_header_t *
       /* Compute the local side of the conflict ('reason'). */
       if (my_value == NULL)
         desc->reason = svn_wc_conflict_reason_deleted;
-      else if (their_value == NULL)
+      else if (old_value == NULL)
         desc->reason = svn_wc_conflict_reason_added;
       else
         desc->reason = svn_wc_conflict_reason_edited;
@@ -2191,7 +2246,6 @@ read_prop_conflicts(apr_array_header_t *
           SVN_ERR(svn_stream_close(s));
         }
 
-      old_value = apr_hash_get(their_old_props, propname, APR_HASH_KEY_STRING);
       if (old_value)
         {
           svn_stream_t *s;
@@ -2255,51 +2309,37 @@ svn_wc__read_conflicts(const apr_array_h
     right_version = APR_ARRAY_IDX(locations, 1, const svn_wc_conflict_version_t *);
 
   if (prop_conflicted)
-    SVN_ERR(read_prop_conflicts(cflcts, db, local_abspath, conflict_skel,
-                                create_tempfiles,
-                                operation, left_version, right_version,
-                                result_pool, scratch_pool));
+    {
+      svn_node_kind_t node_kind
+        = left_version ? left_version->node_kind : svn_node_unknown;
+
+      SVN_ERR(read_prop_conflict_descs(cflcts,
+                                       db, local_abspath, conflict_skel,
+                                       create_tempfiles, node_kind,
+                                       operation, left_version, right_version,
+                                       result_pool, scratch_pool));
+    }
 
   if (text_conflicted)
     {
       svn_wc_conflict_description2_t *desc;
-      desc  = svn_wc_conflict_description_create_text2(local_abspath,
-                                                       result_pool);
-
-      desc->operation = operation;
-      desc->src_left_version = left_version;
-      desc->src_right_version = right_version;
-
-      SVN_ERR(svn_wc__conflict_read_text_conflict(&desc->my_abspath,
-                                                  &desc->base_abspath,
-                                                  &desc->their_abspath,
-                                                  db, local_abspath,
-                                                  conflict_skel,
-                                                  result_pool, scratch_pool));
-
-      desc->merged_file = apr_pstrdup(result_pool, local_abspath);
 
+      SVN_ERR(read_text_conflict_desc(&desc,
+                                      db, local_abspath, conflict_skel,
+                                      FALSE /*is_binary*/, NULL /*mime_type*/,
+                                      operation, left_version, right_version,
+                                      result_pool, scratch_pool));
       APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description2_t*) = desc;
     }
 
   if (tree_conflicted)
     {
-      svn_wc_conflict_reason_t local_change;
-      svn_wc_conflict_action_t incoming_change;
       svn_wc_conflict_description2_t *desc;
 
-      SVN_ERR(svn_wc__conflict_read_tree_conflict(&local_change,
-                                                  &incoming_change,
-                                                  NULL,
-                                                  db, local_abspath,
-                                                  conflict_skel,
-                                                  scratch_pool, scratch_pool));
-
-      SVN_ERR(setup_tree_conflict_desc(&desc,
-                                       db, local_abspath,
-                                       operation, left_version, right_version,
-                                       local_change, incoming_change,
-                                       result_pool, scratch_pool));
+      SVN_ERR(read_tree_conflict_desc(&desc,
+                                      db, local_abspath, conflict_skel,
+                                      operation, left_version, right_version,
+                                      result_pool, scratch_pool));
 
       APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description2_t *) = desc;
     }
@@ -2311,38 +2351,93 @@ svn_wc__read_conflicts(const apr_array_h
 
 /*** Resolving a conflict automatically ***/
 
-/*
- * Resolve the text conflict found in DB/LOCAL_ABSPATH/CONFLICTS
- * according to CONFLICT_CHOICE.  (Don't mark it as resolved.)
+/* Prepare to delete an artifact file at ARTIFACT_FILE_ABSPATH in the
+ * working copy at DB/WRI_ABSPATH.
+ *
+ * Set *WORK_ITEMS to a new work item that, when run, will delete the
+ * artifact file; or to NULL if there is no file to delete.
  *
- * If there were any marker files recorded and present on disk, append to
- * *WORK_ITEMS work items to remove them, and set *REMOVED_REJECT_FILES
- * to TRUE.  Otherwise, don't change *REMOVED_REJECT_FILES.
+ * Set *FILE_FOUND to TRUE if the artifact file is found on disk and its
+ * node kind is 'file'; otherwise do not change *FILE_FOUND.  FILE_FOUND
+ * may be NULL if not required.
+ */
+static svn_error_t *
+remove_artifact_file_if_exists(svn_skel_t **work_items,
+                               svn_boolean_t *file_found,
+                               svn_wc__db_t *db,
+                               const char *wri_abspath,
+                               const char *artifact_file_abspath,
+                               apr_pool_t *result_pool,
+                               apr_pool_t *scratch_pool)
+{
+  *work_items = NULL;
+  if (artifact_file_abspath)
+    {
+      svn_node_kind_t node_kind;
+
+      SVN_ERR(svn_io_check_path(artifact_file_abspath, &node_kind,
+                                scratch_pool));
+      if (node_kind == svn_node_file)
+        {
+          SVN_ERR(svn_wc__wq_build_file_remove(work_items,
+                                               db, wri_abspath,
+                                               artifact_file_abspath,
+                                               result_pool, scratch_pool));
+          if (file_found)
+            *file_found = TRUE;
+        }
+    }
+
+  return SVN_NO_ERROR;
+}
+
+/*
+ * Resolve the text conflict found in DB/LOCAL_ABSPATH according
+ * to CONFLICT_CHOICE.
  *
- * It is an error if there is no text conflict.
+ * It is not an error if there is no text conflict. If a text conflict
+ * existed and was resolved, set *DID_RESOLVE to TRUE, else set it to FALSE.
  *
  * Note: When there are no conflict markers to remove there is no existing
  * text conflict; just a database containing old information, which we should
  * remove to avoid checking all the time. Resolving a text conflict by
  * removing all the marker files is a fully supported scenario since
  * Subversion 1.0.
+ *
+ * ### This is redundantly similar to eval_text_conflict_func_result().
  */
 static svn_error_t *
-resolve_text_conflict_on_node(svn_boolean_t *removed_reject_files,
-                              svn_skel_t **work_items,
+resolve_text_conflict_on_node(svn_boolean_t *did_resolve,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              svn_wc_operation_t operation,
-                              svn_skel_t *conflicts,
                               svn_wc_conflict_choice_t conflict_choice,
+                              const char *merged_file,
+                              svn_cancel_func_t cancel_func,
+                              void *cancel_baton,
                               apr_pool_t *scratch_pool)
 {
   const char *conflict_old = NULL;
   const char *conflict_new = NULL;
   const char *conflict_working = NULL;
   const char *auto_resolve_src;
-  svn_node_kind_t node_kind;
   svn_skel_t *work_item;
+  svn_skel_t *work_items = NULL;
+  svn_skel_t *conflicts;
+  svn_wc_operation_t operation;
+  svn_boolean_t text_conflicted;
+
+  *did_resolve = FALSE;
+
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, db, local_abspath,
+                                   scratch_pool, scratch_pool));
+  if (!conflicts)
+    return SVN_NO_ERROR;
+
+  SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, &text_conflicted,
+                                     NULL, NULL, db, local_abspath, conflicts,
+                                     scratch_pool, scratch_pool));
+  if (!text_conflicted)
+    return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_text_conflict(&conflict_working,
                                               &conflict_old,
@@ -2364,47 +2459,28 @@ resolve_text_conflict_on_node(svn_boolea
       auto_resolve_src = conflict_new;
       break;
     case svn_wc_conflict_choose_merged:
-      auto_resolve_src = NULL;
+      auto_resolve_src = merged_file;
       break;
     case svn_wc_conflict_choose_theirs_conflict:
     case svn_wc_conflict_choose_mine_conflict:
       {
         if (conflict_old && conflict_working && conflict_new)
           {
-            const char *temp_dir;
-            svn_stream_t *tmp_stream = NULL;
-            svn_diff_t *diff;
-            svn_diff_conflict_display_style_t style =
-              conflict_choice == svn_wc_conflict_choose_theirs_conflict
-              ? svn_diff_conflict_display_latest
-              : svn_diff_conflict_display_modified;
-
-            SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir, db,
-                                                   local_abspath,
-                                                   scratch_pool,
-                                                   scratch_pool));
-            SVN_ERR(svn_stream_open_unique(&tmp_stream,
-                                           &auto_resolve_src,
-                                           temp_dir,
-                                           svn_io_file_del_on_pool_cleanup,
-                                           scratch_pool, scratch_pool));
+            svn_diff_conflict_display_style_t style
+              = conflict_choice == svn_wc_conflict_choose_theirs_conflict
+                  ? svn_diff_conflict_display_latest
+                  : svn_diff_conflict_display_modified;
 
-            SVN_ERR(svn_diff_file_diff3_2(&diff,
-                                          conflict_old,
-                                          conflict_working,
-                                          conflict_new,
-                                          svn_diff_file_options_create(
-                                            scratch_pool),
-                                          scratch_pool));
-            SVN_ERR(svn_diff_file_output_merge2(tmp_stream, diff,
-                                                conflict_old,
-                                                conflict_working,
-                                                conflict_new,
-                                                /* markers ignored */
-                                                NULL, NULL, NULL, NULL,
-                                                style,
-                                                scratch_pool));
-            SVN_ERR(svn_stream_close(tmp_stream));
+            SVN_ERR(merge_showing_conflicts(&auto_resolve_src,
+                                            db, local_abspath,
+                                            style,
+                                            NULL /*merge_options*/,
+                                            conflict_old,
+                                            conflict_working,
+                                            conflict_new,
+                                            /* ### why not same as other caller? */
+                                            svn_io_file_del_on_pool_cleanup,
+                                            scratch_pool, scratch_pool));
           }
         else
           auto_resolve_src = NULL;
@@ -2420,12 +2496,12 @@ resolve_text_conflict_on_node(svn_boolea
       SVN_ERR(svn_wc__wq_build_file_copy_translated(
                 &work_item, db, local_abspath,
                 auto_resolve_src, local_abspath, scratch_pool, scratch_pool));
-      *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
+      work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
 
       SVN_ERR(svn_wc__wq_build_sync_file_flags(&work_item, db,
                                                local_abspath,
                                                scratch_pool, scratch_pool));
-      *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
+      work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
     }
 
   /* Legacy behavior: Only report text conflicts as resolved when at least
@@ -2434,60 +2510,36 @@ resolve_text_conflict_on_node(svn_boolea
      If not the UI shows the conflict as already resolved
      (and in this case we just remove the in-db conflict) */
 
-  if (conflict_old)
-    {
-      SVN_ERR(svn_io_check_path(conflict_old, &node_kind, scratch_pool));
-      if (node_kind == svn_node_file)
-        {
-          SVN_ERR(svn_wc__wq_build_file_remove(&work_item, db,
-                                               local_abspath,
-                                               conflict_old,
-                                               scratch_pool, scratch_pool));
-          *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
-          *removed_reject_files = TRUE;
-        }
-    }
+  SVN_ERR(remove_artifact_file_if_exists(&work_item, did_resolve,
+                                         db, local_abspath, conflict_old,
+                                         scratch_pool, scratch_pool));
+  work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
 
-  if (conflict_new)
-    {
-      SVN_ERR(svn_io_check_path(conflict_new, &node_kind, scratch_pool));
-      if (node_kind == svn_node_file)
-        {
-          SVN_ERR(svn_wc__wq_build_file_remove(&work_item, db,
-                                               local_abspath,
-                                               conflict_new,
-                                               scratch_pool, scratch_pool));
-          *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
-          *removed_reject_files = TRUE;
-        }
-    }
+  SVN_ERR(remove_artifact_file_if_exists(&work_item, did_resolve,
+                                         db, local_abspath, conflict_new,
+                                         scratch_pool, scratch_pool));
+  work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
 
-  if (conflict_working)
-    {
-      SVN_ERR(svn_io_check_path(conflict_working, &node_kind, scratch_pool));
-      if (node_kind == svn_node_file)
-        {
-          SVN_ERR(svn_wc__wq_build_file_remove(&work_item, db,
-                                               local_abspath,
-                                               conflict_working,
-                                               scratch_pool, scratch_pool));
-          *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
-          *removed_reject_files = TRUE;
-        }
-    }
+  SVN_ERR(remove_artifact_file_if_exists(&work_item, did_resolve,
+                                         db, local_abspath, conflict_working,
+                                         scratch_pool, scratch_pool));
+  work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
+
+  SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath,
+                                      TRUE, FALSE, FALSE,
+                                      work_items, scratch_pool));
+  SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+                         scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
 /*
- * Resolve the property conflicts found in DB/LOCAL_ABSPATH/CONFLICTS
- * according to CONFLICT_CHOICE.  (Don't mark it as resolved.)
+ * Resolve the property conflicts found in DB/LOCAL_ABSPATH according
+ * to CONFLICT_CHOICE.
  *
- * If there was a reject file recorded and present on disk, append to
- * *WORK_ITEMS a work item to remove it, and set *REMOVED_REJECT_FILE
- * to TRUE.  Otherwise, don't change *REMOVED_REJECT_FILE.
- *
- * It is an error if there is no prop conflict.
+ * It is not an error if there is no prop conflict. If a prop conflict
+ * existed and was resolved, set *DID_RESOLVE to TRUE, else set it to FALSE.
  *
  * Note: When there are no conflict markers on-disk to remove there is
  * no existing text conflict (unless we are still in the process of
@@ -2518,16 +2570,16 @@ resolve_text_conflict_on_node(svn_boolea
  *
  */
 static svn_error_t *
-resolve_prop_conflict_on_node(svn_boolean_t *removed_reject_file,
-                              svn_skel_t **work_items,
+resolve_prop_conflict_on_node(svn_boolean_t *did_resolve,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              svn_wc_operation_t operation,
-                              svn_skel_t *conflicts,
+                              const char *conflicted_propname,
                               svn_wc_conflict_choice_t conflict_choice,
+                              const char *merged_file,
+                              svn_cancel_func_t cancel_func,
+                              void *cancel_baton,
                               apr_pool_t *scratch_pool)
 {
-  svn_node_kind_t node_kind;
   const char *prop_reject_file;
   apr_hash_t *mine_props;
   apr_hash_t *their_old_props;
@@ -2535,6 +2587,24 @@ resolve_prop_conflict_on_node(svn_boolea
   apr_hash_t *conflicted_props;
   apr_hash_t *old_props;
   apr_hash_t *resolve_from = NULL;
+  svn_skel_t *work_items = NULL;
+  svn_skel_t *conflicts;
+  svn_wc_operation_t operation;
+  svn_boolean_t prop_conflicted;
+
+  *did_resolve = FALSE;
+
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, db, local_abspath,
+                                   scratch_pool, scratch_pool));
+
+  if (!conflicts)
+    return SVN_NO_ERROR;
+
+  SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, &prop_conflicted,
+                                     NULL, db, local_abspath, conflicts,
+                                     scratch_pool, scratch_pool));
+  if (!prop_conflicted)
+    return SVN_NO_ERROR;
 
   SVN_ERR(svn_wc__conflict_read_prop_conflict(&prop_reject_file,
                                               &mine_props, &their_old_props,
@@ -2573,7 +2643,24 @@ resolve_prop_conflict_on_node(svn_boolea
       resolve_from = their_props;
       break;
     case svn_wc_conflict_choose_merged:
-      resolve_from = NULL;
+      if (merged_file && conflicted_propname[0] != '\0')
+        {
+          apr_hash_t *actual_props;
+          svn_stream_t *stream;
+          svn_string_t *merged_propval;
+
+          SVN_ERR(svn_wc__db_read_props(&actual_props, db, local_abspath,
+                                        scratch_pool, scratch_pool));
+          resolve_from = actual_props;
+
+          SVN_ERR(svn_stream_open_readonly(&stream, merged_file,
+                                           scratch_pool, scratch_pool));
+          SVN_ERR(svn_string_from_stream(&merged_propval, stream,
+                                         scratch_pool, scratch_pool));
+          svn_hash_sets(resolve_from, conflicted_propname, merged_propval);
+        }
+      else
+        resolve_from = NULL;
       break;
     default:
       return svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
@@ -2595,11 +2682,9 @@ resolve_prop_conflict_on_node(svn_boolea
           const char *propname = svn__apr_hash_index_key(hi);
           svn_string_t *new_value = NULL;
 
-          new_value = apr_hash_get(resolve_from, propname,
-                                   APR_HASH_KEY_STRING);
+          new_value = svn_hash_gets(resolve_from, propname);
 
-          apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
-                       new_value);
+          svn_hash_sets(actual_props, propname, new_value);
         }
       SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, actual_props,
                                       FALSE, NULL, NULL,
@@ -2612,39 +2697,36 @@ resolve_prop_conflict_on_node(svn_boolea
      If not the UI shows the conflict as already resolved
      (and in this case we just remove the in-db conflict) */
 
-  if (prop_reject_file)
-    {
-      SVN_ERR(svn_io_check_path(prop_reject_file, &node_kind, scratch_pool));
-      if (node_kind == svn_node_file)
-        {
-          svn_skel_t *work_item;
+  {
+    svn_skel_t *work_item;
 
-          SVN_ERR(svn_wc__wq_build_file_remove(&work_item, db,
-                                               local_abspath,
-                                               prop_reject_file,
-                                               scratch_pool, scratch_pool));
-          *work_items = svn_wc__wq_merge(*work_items, work_item, scratch_pool);
-          *removed_reject_file = TRUE;
-        }
-    }
+    SVN_ERR(remove_artifact_file_if_exists(&work_item, did_resolve,
+                                           db, local_abspath, prop_reject_file,
+                                           scratch_pool, scratch_pool));
+    work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool);
+  }
+
+  SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath, FALSE, TRUE, FALSE,
+                                      work_items, scratch_pool));
+  SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+                         scratch_pool));
 
   return SVN_NO_ERROR;
 }
 
 /*
- * Resolve the tree conflict found in DB/LOCAL_ABSPATH/CONFLICTS
- * according to CONFLICT_CHOICE.  (Don't mark it as resolved.)
+ * Resolve the tree conflict found in DB/LOCAL_ABSPATH according to
+ * CONFLICT_CHOICE.
  *
- * ### ... append to *WORK_ITEMS work items to ...?
+ * It is not an error if there is no tree conflict. If a tree conflict
+ * existed and was resolved, set *DID_RESOLVE to TRUE, else set it to FALSE.
  *
- * It is an error if there is no tree conflict.
+ * It is not an error if there is no tree conflict.
  */
 static svn_error_t *
-resolve_tree_conflict_on_node(svn_skel_t **work_items,
+resolve_tree_conflict_on_node(svn_boolean_t *did_resolve,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              svn_wc_operation_t operation,
-                              svn_skel_t *conflicts,
                               svn_wc_conflict_choice_t conflict_choice,
                               svn_wc_notify_func2_t notify_func,
                               void *notify_baton,
@@ -2654,9 +2736,24 @@ resolve_tree_conflict_on_node(svn_skel_t
 {
   svn_wc_conflict_reason_t reason;
   svn_wc_conflict_action_t action;
-  svn_boolean_t did_resolve = FALSE;
+  svn_skel_t *conflicts;
+  svn_wc_operation_t operation;
+  svn_boolean_t tree_conflicted;
+
+  *did_resolve = FALSE;
+
+  SVN_ERR(svn_wc__db_read_conflict(&conflicts, db, local_abspath,
+                                   scratch_pool, scratch_pool));
+  if (!conflicts)
+    return SVN_NO_ERROR;
 
-  SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL, 
+  SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, NULL,
+                                     &tree_conflicted, db, local_abspath,
+                                     conflicts, scratch_pool, scratch_pool));
+  if (!tree_conflicted)
+    return SVN_NO_ERROR;
+
+  SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, &action, NULL,
                                               db, local_abspath,
                                               conflicts,
                                               scratch_pool, scratch_pool));
@@ -2674,7 +2771,7 @@ resolve_tree_conflict_on_node(svn_skel_t
               SVN_ERR(svn_wc__db_resolve_break_moved_away_children(
                         db, local_abspath, notify_func, notify_baton,
                         scratch_pool));
-              did_resolve = TRUE;
+              *did_resolve = TRUE;
             }
           else if (conflict_choice == svn_wc_conflict_choose_mine_conflict)
             {
@@ -2685,7 +2782,7 @@ resolve_tree_conflict_on_node(svn_skel_t
               SVN_ERR(svn_wc__db_resolve_delete_raise_moved_away(
                         db, local_abspath, notify_func, notify_baton,
                         scratch_pool));
-              did_resolve = TRUE;
+              *did_resolve = TRUE;
             }
           else
             return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
@@ -2706,12 +2803,11 @@ resolve_tree_conflict_on_node(svn_skel_t
           if (conflict_choice == svn_wc_conflict_choose_mine_conflict)
             {
               SVN_ERR(svn_wc__db_update_moved_away_conflict_victim(
-                        work_items,
                         db, local_abspath,
                         notify_func, notify_baton,
                         cancel_func, cancel_baton,
-                        scratch_pool, scratch_pool));
-              did_resolve = TRUE;
+                        scratch_pool));
+              *did_resolve = TRUE;
             }
           else if (conflict_choice == svn_wc_conflict_choose_merged)
             {
@@ -2726,7 +2822,7 @@ resolve_tree_conflict_on_node(svn_skel_t
                                                           notify_func,
                                                           notify_baton,
                                                           scratch_pool));
-              did_resolve = TRUE;
+              *did_resolve = TRUE;
             }
           else
             return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
@@ -2739,7 +2835,7 @@ resolve_tree_conflict_on_node(svn_skel_t
         }
     }
 
-  if (! did_resolve && conflict_choice != svn_wc_conflict_choose_merged)
+  if (! *did_resolve && conflict_choice != svn_wc_conflict_choose_merged)
     {
       /* For other tree conflicts, there is no way to pick
        * theirs-full or mine-full, etc. Throw an error if the
@@ -2753,110 +2849,13 @@ resolve_tree_conflict_on_node(svn_skel_t
                                                       scratch_pool));
     }
 
+  SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath, FALSE, FALSE, TRUE,
+                                      NULL, scratch_pool));
+  SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+                         scratch_pool));
   return SVN_NO_ERROR;
 }
 
-/* Conflict resolution involves removing the conflict files, if they exist,
-   and clearing the conflict filenames from the entry.  The latter needs to
-   be done whether or not the conflict files exist.
-
-   ### This func combines *resolving* and *marking as resolved* -- seems poor.
-
-   LOCAL_ABSPATH in DB is the path to the item to be resolved.
-   RESOLVE_TEXT, RESOLVE_PROPS and RESOLVE_TREE are TRUE iff text, property
-   and tree conflicts respectively are to be resolved.
-
-   If this call marks any conflict as resolved, set *DID_RESOLVE to true,
-   else to false.
-   If asked to resolve a text or prop conflict, only set *DID_RESOLVE
-   to true if a conflict marker file was present, because if no marker
-   file was present then the conflict is considered to be marked as
-   resolved already.
-   ### If asked to resolve a tree conflict, always set *DID_RESOLVE to true.
-       This would make sense if 'resolve_tree' is only requested when
-       there is in fact a tree conflict to be resolved, but, for
-       consistency with text & prop conflicts, the code should probably
-       say "if (resolve_tree && tree_conflicted) *did_resolve = TRUE".
-
-   See svn_wc_resolved_conflict5() for how CONFLICT_CHOICE behaves.
-*/
-static svn_error_t *
-resolve_conflict_on_node(svn_boolean_t *did_resolve,
-                         svn_wc__db_t *db,
-                         const char *local_abspath,
-                         svn_boolean_t resolve_text,
-                         svn_boolean_t resolve_props,
-                         svn_boolean_t resolve_tree,
-                         svn_wc_conflict_choice_t conflict_choice,
-                         svn_wc_notify_func2_t notify_func,
-                         void *notify_baton,
-                         svn_cancel_func_t cancel_func,
-                         void *cancel_baton,
-                         apr_pool_t *scratch_pool)
-{
-  svn_skel_t *conflicts;
-  svn_wc_operation_t operation;
-  svn_boolean_t text_conflicted;
-  svn_boolean_t prop_conflicted;
-  svn_boolean_t tree_conflicted;
-  svn_skel_t *work_items = NULL;
-
-  *did_resolve = FALSE;
-
-  SVN_ERR(svn_wc__db_read_conflict(&conflicts, db, local_abspath,
-                                   scratch_pool, scratch_pool));
-
-  if (!conflicts)
-    return SVN_NO_ERROR;
-
-  SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, &text_conflicted,
-                                     &prop_conflicted, &tree_conflicted,
-                                     db, local_abspath, conflicts,
-                                     scratch_pool, scratch_pool));
-
-  if (resolve_text && text_conflicted)
-    SVN_ERR(resolve_text_conflict_on_node(did_resolve, &work_items,
-                                          db, local_abspath,
-                                          operation, conflicts,
-                                          conflict_choice,
-                                          scratch_pool));
-
-  if (resolve_props && prop_conflicted)
-    SVN_ERR(resolve_prop_conflict_on_node(did_resolve, &work_items,
-                                          db, local_abspath,
-                                          operation, conflicts,
-                                          conflict_choice,
-                                          scratch_pool));
-
-  if (resolve_tree)
-    {
-      SVN_ERR(resolve_tree_conflict_on_node(&work_items,
-                                            db, local_abspath,
-                                            operation, conflicts,
-                                            conflict_choice,
-                                            notify_func, notify_baton,
-                                            cancel_func, cancel_baton,
-                                            scratch_pool));
-      *did_resolve = TRUE;
-    }
-
-  if (resolve_text || resolve_props || resolve_tree)
-    {
-      SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath,
-                                          resolve_text, resolve_props,
-                                          resolve_tree, work_items,
-                                          scratch_pool));
-
-      /* Run the work queue to remove conflict marker files. */
-      SVN_ERR(svn_wc__wq_run(db, local_abspath,
-                             cancel_func, cancel_baton,
-                             scratch_pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
 svn_error_t *
 svn_wc__mark_resolved_text_conflict(svn_wc__db_t *db,
                                     const char *local_abspath,
@@ -2864,15 +2863,11 @@ svn_wc__mark_resolved_text_conflict(svn_
 {
   svn_boolean_t ignored_result;
 
-  return svn_error_trace(resolve_conflict_on_node(
+  return svn_error_trace(resolve_text_conflict_on_node(
                            &ignored_result,
                            db, local_abspath,
-                           TRUE /* resolve_text */,
-                           FALSE /* resolve_props */,
-                           FALSE /* resolve_tree */,
-                           svn_wc_conflict_choose_merged,
-                           NULL, NULL, /* notify_func */
-                           NULL, NULL, /* cancel_func */
+                           svn_wc_conflict_choose_merged, NULL,
+                           NULL, NULL,
                            scratch_pool));
 }
 
@@ -2883,15 +2878,11 @@ svn_wc__mark_resolved_prop_conflicts(svn
 {
   svn_boolean_t ignored_result;
 
-  return svn_error_trace(resolve_conflict_on_node(
+  return svn_error_trace(resolve_prop_conflict_on_node(
                            &ignored_result,
-                           db, local_abspath,
-                           FALSE /* resolve_text */,
-                           TRUE /* resolve_props */,
-                           FALSE /* resolve_tree */,
-                           svn_wc_conflict_choose_merged,
-                           NULL, NULL, /* notify_func */
-                           NULL, NULL, /* cancel_func */
+                           db, local_abspath, "",
+                           svn_wc_conflict_choose_merged, NULL,
+                           NULL, NULL,
                            scratch_pool));
 }
 
@@ -2913,8 +2904,6 @@ struct conflict_status_walker_baton
 };
 
 /* Implements svn_wc_status4_t to walk all conflicts to resolve.
- *
- * ### Bug: ignores the resolver callback's 'result->merged_file' output.
  */
 static svn_error_t *
 conflict_status_walker(void *baton,
@@ -2943,6 +2932,7 @@ conflict_status_walker(void *baton,
       const svn_wc_conflict_description2_t *cd;
       svn_boolean_t did_resolve;
       svn_wc_conflict_choice_t my_choice = cswb->conflict_choice;
+      const char *merged_file = NULL;
 
       cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *);
 
@@ -2961,7 +2951,8 @@ conflict_status_walker(void *baton,
                                       iterpool, iterpool));
 
           my_choice = result->choice;
-          /* ### Bug: ignores result->merged_file (and ->save_merged) */
+          merged_file = result->merged_file;
+          /* ### Bug: ignores result->save_merged */
         }
 
 
@@ -2973,18 +2964,15 @@ conflict_status_walker(void *baton,
           case svn_wc_conflict_kind_tree:
             if (!cswb->resolve_tree)
               break;
-            SVN_ERR(resolve_conflict_on_node(&did_resolve,
-                                             db,
-                                             local_abspath,
-                                             FALSE /* resolve_text */,
-                                             FALSE /* resolve_props */,
-                                             TRUE /* resolve_tree */,
-                                             my_choice,
-                                             cswb->notify_func,
-                                             cswb->notify_baton,
-                                             cswb->cancel_func,
-                                             cswb->cancel_baton,
-                                             iterpool));
+            SVN_ERR(resolve_tree_conflict_on_node(&did_resolve,
+                                                  db,
+                                                  local_abspath,
+                                                  my_choice,
+                                                  cswb->notify_func,
+                                                  cswb->notify_baton,
+                                                  cswb->cancel_func,
+                                                  cswb->cancel_baton,
+                                                  iterpool));
 
             resolved = TRUE;
             break;
@@ -2993,18 +2981,14 @@ conflict_status_walker(void *baton,
             if (!cswb->resolve_text)
               break;
 
-            SVN_ERR(resolve_conflict_on_node(&did_resolve,
-                                             db,
-                                             local_abspath,
-                                             TRUE /* resolve_text */,
-                                             FALSE /* resolve_props */,
-                                             FALSE /* resolve_tree */,
-                                             my_choice,
-                                             cswb->notify_func,
-                                             cswb->notify_baton,
-                                             cswb->cancel_func,
-                                             cswb->cancel_baton,
-                                             iterpool));
+            SVN_ERR(resolve_text_conflict_on_node(&did_resolve,
+                                                  db,
+                                                  local_abspath,
+                                                  my_choice,
+                                                  merged_file,
+                                                  cswb->cancel_func,
+                                                  cswb->cancel_baton,
+                                                  iterpool));
 
             if (did_resolve)
               resolved = TRUE;
@@ -3014,28 +2998,21 @@ conflict_status_walker(void *baton,
             if (!cswb->resolve_prop)
               break;
 
-            /* ### this is bogus. resolve_conflict_on_node() does not handle
-               ### individual property resolution.  */
             if (*cswb->resolve_prop != '\0' &&
                 strcmp(cswb->resolve_prop, cd->property_name) != 0)
               {
-                break; /* Skip this property conflict */
+                break; /* This is not the property we want to resolve. */
               }
 
-
-            /* We don't have property name handling here yet :( */
-            SVN_ERR(resolve_conflict_on_node(&did_resolve,
-                                             db,
-                                             local_abspath,
-                                             FALSE /* resolve_text */,
-                                             TRUE /* resolve_props */,
-                                             FALSE /* resolve_tree */,
-                                             my_choice,
-                                             cswb->notify_func,
-                                             cswb->notify_baton,
-                                             cswb->cancel_func,
-                                             cswb->cancel_baton,
-                                             iterpool));
+            SVN_ERR(resolve_prop_conflict_on_node(&did_resolve,
+                                                  db,
+                                                  local_abspath,
+                                                  cd->property_name,
+                                                  my_choice,
+                                                  merged_file,
+                                                  cswb->cancel_func,
+                                                  cswb->cancel_baton,
+                                                  iterpool));
 
             if (did_resolve)
               resolved = TRUE;
@@ -3076,7 +3053,7 @@ svn_wc__resolve_conflicts(svn_wc_context
                           void *notify_baton,
                           apr_pool_t *scratch_pool)
 {
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_boolean_t conflicted;
   struct conflict_status_walker_baton cswb;
 
@@ -3098,7 +3075,7 @@ svn_wc__resolve_conflicts(svn_wc_context
 
   /* When the implementation still used the entry walker, depth
      unknown was translated to infinity. */
-  if (kind != svn_kind_dir)
+  if (kind != svn_node_dir)
     depth = svn_depth_empty;
   else if (depth == svn_depth_unknown)
     depth = svn_depth_infinity;

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/conflicts.h Fri May 10 14:58:47 2013
@@ -401,14 +401,18 @@ svn_wc__conflict_create_markers(svn_skel
                                 apr_pool_t *result_pool,
                                 apr_pool_t *scratch_pool);
 
-/* Call the interactive conflict resolver RESOLVER_FUNC with RESOLVER_BATON to
-   allow resolving the conflicts on LOCAL_ABSPATH.
+/* Call the conflict resolver RESOLVER_FUNC with RESOLVER_BATON for each
+   of the conflicts on LOCAL_ABSPATH.  Depending on the results that
+   the callback returns, perhaps resolve the conflicts, and perhaps mark
+   them as resolved in the WC DB.
 
    Call RESOLVER_FUNC once for each property conflict, and again for any
    text conflict, and again for any tree conflict on the node.
 
    CONFLICT_SKEL contains the details of the conflicts on LOCAL_ABSPATH.
 
+   Use MERGE_OPTIONS when the resolver requests a merge.
+
    Resolver actions are directly applied to the in-db state of LOCAL_ABSPATH,
    so the conflict and the state in CONFLICT_SKEL must already be installed in
    wc.db. */

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/copy.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/copy.c Fri May 10 14:58:47 2013
@@ -32,6 +32,7 @@
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
+#include "svn_hash.h"
 
 #include "wc.h"
 #include "workqueue.h"
@@ -171,7 +172,7 @@ copy_to_tmpdir(svn_skel_t **work_item,
    versioned file itself.
 
    This also works for versioned symlinks that are stored in the db as
-   svn_kind_file with svn:special set. */
+   svn_node_file with svn:special set. */
 static svn_error_t *
 copy_versioned_file(svn_wc__db_t *db,
                     const char *src_abspath,
@@ -381,7 +382,7 @@ copy_versioned_dir(svn_wc__db_t *db,
           || info->status == svn_wc__db_status_added)
         {
           /* We have more work to do than just changing the DB */
-          if (info->kind == svn_kind_file)
+          if (info->kind == svn_node_file)
             {
               /* We should skip this node if this child is a file external
                  (issues #3589, #4000) */
@@ -397,7 +398,7 @@ copy_versioned_dir(svn_wc__db_t *db,
                                             NULL, NULL,
                                             iterpool));
             }
-          else if (info->kind == svn_kind_dir)
+          else if (info->kind == svn_node_dir)
             SVN_ERR(copy_versioned_dir(db,
                                        child_src_abspath, child_dst_abspath,
                                        dst_op_root_abspath, tmpdir_abspath,
@@ -447,7 +448,7 @@ copy_versioned_dir(svn_wc__db_t *db,
               || info->status == svn_wc__db_status_added))
         {
           /* Remove versioned child as it has been handled */
-          apr_hash_set(disk_children, child_name, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(disk_children, child_name, NULL);
         }
     }
 
@@ -481,8 +482,7 @@ copy_versioned_dir(svn_wc__db_t *db,
           unver_dst_abspath = svn_dirent_join(dst_abspath, name, iterpool);
 
           if (marker_files &&
-              apr_hash_get(marker_files, unver_src_abspath,
-                           APR_HASH_KEY_STRING))
+              svn_hash_gets(marker_files, unver_src_abspath))
             continue;
 
           SVN_ERR(copy_to_tmpdir(&work_item, NULL, db, unver_src_abspath,
@@ -524,7 +524,7 @@ copy_or_move(svn_boolean_t *move_degrade
              apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = wc_ctx->db;
-  svn_kind_t src_db_kind;
+  svn_node_kind_t src_db_kind;
   const char *dstdir_abspath;
   svn_boolean_t conflicted;
   const char *tmpdir_abspath;
@@ -762,8 +762,8 @@ copy_or_move(svn_boolean_t *move_degrade
                                          cancel_func, cancel_baton,
                                          scratch_pool));
 
-  if (src_db_kind == svn_kind_file
-      || src_db_kind == svn_kind_symlink)
+  if (src_db_kind == svn_node_file
+      || src_db_kind == svn_node_symlink)
     {
       err = copy_versioned_file(db, src_abspath, dst_abspath, dst_abspath,
                                 tmpdir_abspath,
@@ -779,7 +779,7 @@ copy_or_move(svn_boolean_t *move_degrade
         {
           svn_revnum_t min_rev;
           svn_revnum_t max_rev;
-        
+
           /* Verify that the move source is a single-revision subtree. */
           SVN_ERR(svn_wc__db_min_max_revisions(&min_rev, &max_rev, db,
                                                src_abspath, FALSE, scratch_pool));
@@ -954,7 +954,7 @@ remove_all_conflict_markers(svn_wc__db_t
                             svn_dirent_join(wc_dir_abspath, name, iterpool),
                             iterpool));
         }
-      if (info->kind == svn_kind_dir)
+      if (info->kind == svn_node_dir)
         {
           svn_pool_clear(iterpool);
           SVN_ERR(remove_all_conflict_markers(
@@ -983,7 +983,7 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
 {
   svn_wc__db_t *db = wc_ctx->db;
   svn_boolean_t move_degraded_to_copy = FALSE;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_boolean_t conflicted;
 
   /* Verify that we have the required write locks. */
@@ -1028,7 +1028,7 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
                                db, src_abspath,
                                scratch_pool, scratch_pool));
 
-  if (kind == svn_kind_dir)
+  if (kind == svn_node_dir)
     SVN_ERR(remove_all_conflict_markers(db, src_abspath, dst_abspath,
                                         scratch_pool));
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/crop.c Fri May 10 14:58:47 2013
@@ -84,7 +84,7 @@ crop_children(svn_wc__db_t *db,
       const char *child_name = APR_ARRAY_IDX(children, i, const char *);
       const char *child_abspath;
       svn_wc__db_status_t child_status;
-      svn_kind_t kind;
+      svn_node_kind_t kind;
       svn_depth_t child_depth;
 
       svn_pool_clear(iterpool);
@@ -103,7 +103,7 @@ crop_children(svn_wc__db_t *db,
           child_status == svn_wc__db_status_excluded ||
           child_status == svn_wc__db_status_not_present)
         {
-          svn_depth_t remove_below = (kind == svn_kind_dir)
+          svn_depth_t remove_below = (kind == svn_node_dir)
                                             ? svn_depth_immediates
                                             : svn_depth_files;
           if (new_depth < remove_below)
@@ -115,7 +115,7 @@ crop_children(svn_wc__db_t *db,
 
           continue;
         }
-      else if (kind == svn_kind_file)
+      else if (kind == svn_node_file)
         {
           if (new_depth == svn_depth_empty)
             SVN_ERR(svn_wc__db_op_remove_node(NULL,
@@ -124,7 +124,7 @@ crop_children(svn_wc__db_t *db,
                                               FALSE /* destroy_changes */,
                                               SVN_INVALID_REVNUM,
                                               svn_wc__db_status_not_present,
-                                              svn_kind_none,
+                                              svn_node_none,
                                               NULL, NULL,
                                               cancel_func, cancel_baton,
                                               iterpool));
@@ -132,7 +132,7 @@ crop_children(svn_wc__db_t *db,
             continue;
 
         }
-      else if (kind == svn_kind_dir)
+      else if (kind == svn_node_dir)
         {
           if (new_depth < svn_depth_immediates)
             {
@@ -142,7 +142,7 @@ crop_children(svn_wc__db_t *db,
                                                 FALSE /* destroy_changes */,
                                                 SVN_INVALID_REVNUM,
                                                 svn_wc__db_status_not_present,
-                                                svn_kind_none,
+                                                svn_node_none,
                                                 NULL, NULL,
                                                 cancel_func, cancel_baton,
                                                 iterpool));
@@ -194,7 +194,7 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
 {
   svn_boolean_t is_root, is_switched;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_revnum_t revision;
   const char *repos_relpath, *repos_root, *repos_uuid;
 
@@ -297,7 +297,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
 {
   svn_wc__db_t *db = wc_ctx->db;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_depth_t dir_depth;
 
   /* Only makes sense when the depth is restrictive. */
@@ -314,7 +314,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
                                db, local_abspath,
                                scratch_pool, scratch_pool));
 
-  if (kind != svn_kind_dir)
+  if (kind != svn_node_dir)
     return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
       _("Can only crop directories"));
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/delete.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/delete.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/delete.c Fri May 10 14:58:47 2013
@@ -110,7 +110,7 @@ static svn_error_t *
 create_delete_wq_items(svn_skel_t **work_items,
                        svn_wc__db_t *db,
                        const char *local_abspath,
-                       svn_kind_t kind,
+                       svn_node_kind_t kind,
                        svn_boolean_t conflicted,
                        apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
@@ -118,7 +118,7 @@ create_delete_wq_items(svn_skel_t **work
   *work_items = NULL;
 
   /* Schedule the on-disk delete */
-  if (kind == svn_kind_dir)
+  if (kind == svn_node_dir)
     SVN_ERR(svn_wc__wq_build_dir_remove(work_items, db, local_abspath,
                                         local_abspath,
                                         TRUE /* recursive */,
@@ -185,7 +185,7 @@ svn_wc__delete_many(svn_wc_context_t *wc
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_skel_t *work_items = NULL;
   apr_array_header_t *versioned_targets;
   const char *local_abspath;
@@ -244,7 +244,7 @@ svn_wc__delete_many(svn_wc_context_t *wc
         }
 
       if (status == svn_wc__db_status_normal
-          && kind == svn_kind_dir)
+          && kind == svn_node_dir)
         {
           svn_boolean_t is_wcroot;
           SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
@@ -323,7 +323,7 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
   svn_wc__db_t *db = wc_ctx->db;
   svn_error_t *err;
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_boolean_t conflicted;
   svn_skel_t *work_items = NULL;
   const char *repos_relpath;
@@ -363,7 +363,7 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
     }
 
   if (status == svn_wc__db_status_normal
-      && kind == svn_kind_dir)
+      && kind == svn_node_dir)
     {
       svn_boolean_t is_wcroot;
       SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, pool));
@@ -433,7 +433,7 @@ svn_wc__internal_remove_from_revision_co
                                     destroy_wf /* destroy_changes */,
                                     SVN_INVALID_REVNUM,
                                     svn_wc__db_status_not_present,
-                                    svn_kind_none,
+                                    svn_node_none,
                                     NULL, NULL,
                                     cancel_func, cancel_baton,
                                     scratch_pool));

Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/deprecated.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/deprecated.c Fri May 10 14:58:47 2013
@@ -32,6 +32,7 @@
 #include "svn_subst.h"
 #include "svn_pools.h"
 #include "svn_props.h"
+#include "svn_hash.h"
 #include "svn_time.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -85,8 +86,7 @@ traversal_info_update(void *baton,
     {
       dup_val = apr_pstrmemdup(dup_pool, old_val->data, old_val->len);
 
-      apr_hash_set(ub->traversal->externals_old, dup_path, APR_HASH_KEY_STRING,
-                   dup_val);
+      svn_hash_sets(ub->traversal->externals_old, dup_path, dup_val);
     }
 
   if (new_val)
@@ -95,12 +95,10 @@ traversal_info_update(void *baton,
       if (old_val != new_val)
         dup_val = apr_pstrmemdup(dup_pool, new_val->data, new_val->len);
 
-      apr_hash_set(ub->traversal->externals_new, dup_path, APR_HASH_KEY_STRING,
-                   dup_val);
+      svn_hash_sets(ub->traversal->externals_new, dup_path, dup_val);
     }
 
-  apr_hash_set(ub->traversal->depths, dup_path, APR_HASH_KEY_STRING,
-               svn_depth_to_word(depth));
+  svn_hash_sets(ub->traversal->depths, dup_path, svn_depth_to_word(depth));
 
   return SVN_NO_ERROR;
 }
@@ -138,19 +136,15 @@ gather_traversal_info(svn_wc_context_t *
                                 traversal_info->pool);
 
       if (gather_as_old)
-        apr_hash_set(traversal_info->externals_old,
-                     relpath, APR_HASH_KEY_STRING,
-                     svn__apr_hash_index_val(hi));
+        svn_hash_sets(traversal_info->externals_old, relpath,
+                      svn__apr_hash_index_val(hi));
 
       if (gather_as_new)
-        apr_hash_set(traversal_info->externals_new,
-                     relpath, APR_HASH_KEY_STRING,
-                     svn__apr_hash_index_val(hi));
-
-      apr_hash_set(traversal_info->depths,
-                   relpath, APR_HASH_KEY_STRING,
-                   apr_hash_get(ambient_depths, node_abspath,
-                                APR_HASH_KEY_STRING));
+        svn_hash_sets(traversal_info->externals_new, relpath,
+                      svn__apr_hash_index_val(hi));
+
+      svn_hash_sets(traversal_info->depths, relpath,
+                    svn_hash_gets(ambient_depths, node_abspath));
     }
 
   return SVN_NO_ERROR;
@@ -970,13 +964,13 @@ svn_wc_add3(const char *path,
   /* Make sure the caller gets the new access baton in the set. */
   if (svn_wc__adm_retrieve_internal2(wc_db, local_abspath, pool) == NULL)
     {
-      svn_kind_t kind;
+      svn_node_kind_t kind;
 
       SVN_ERR(svn_wc__db_read_kind(&kind, wc_db, local_abspath,
                                    FALSE /* allow_missing */,
                                    TRUE /* show_deleted */,
                                    FALSE /* show_hidden */, pool));
-      if (kind == svn_kind_dir)
+      if (kind == svn_node_dir)
         {
           svn_wc_adm_access_t *adm_access;
 
@@ -2357,8 +2351,7 @@ svn_wc_parse_externals_description(apr_h
           svn_wc_external_item_t *item;
           item = APR_ARRAY_IDX(list, i, svn_wc_external_item_t *);
 
-          apr_hash_set(*externals_p, item->target_dir,
-                       APR_HASH_KEY_STRING, item);
+          svn_hash_sets(*externals_p, item->target_dir, item);
         }
     }
   return SVN_NO_ERROR;
@@ -3148,8 +3141,7 @@ svn_wc_add_repos_file2(const char *dst_p
 
       /* If the new file is special, then we can simply open the given
          contents since it is already in normal form. */
-      if (apr_hash_get(new_props,
-                       SVN_PROP_SPECIAL, APR_HASH_KEY_STRING) != NULL)
+      if (svn_hash_gets(new_props, SVN_PROP_SPECIAL) != NULL)
         {
           SVN_ERR(svn_stream_open_readonly(&new_contents, new_text_path,
                                            pool, pool));
@@ -3162,8 +3154,7 @@ svn_wc_add_repos_file2(const char *dst_p
           apr_hash_t *keywords = NULL;
           svn_string_t *list;
 
-          list = apr_hash_get(new_props,
-                              SVN_PROP_KEYWORDS, APR_HASH_KEY_STRING);
+          list = svn_hash_gets(new_props, SVN_PROP_KEYWORDS);
           if (list != NULL)
             {
               /* Since we are detranslating, all of the keyword values
@@ -3177,9 +3168,8 @@ svn_wc_add_repos_file2(const char *dst_p
             }
 
           svn_subst_eol_style_from_value(&eol_style, &eol_str,
-                                         apr_hash_get(new_props,
-                                                      SVN_PROP_EOL_STYLE,
-                                                      APR_HASH_KEY_STRING));
+                                         svn_hash_gets(new_props,
+                                                       SVN_PROP_EOL_STYLE));
 
           if (svn_subst_translation_required(eol_style, eol_str, keywords,
                                              FALSE, FALSE))
@@ -3259,7 +3249,7 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
 {
   svn_boolean_t is_root;
   svn_boolean_t is_switched;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_error_t *err;
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -3275,7 +3265,7 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
       return svn_error_create(SVN_ERR_ENTRY_NOT_FOUND, err, err->message);
     }
 
-  *wc_root = is_root || (kind == svn_kind_dir && is_switched);
+  *wc_root = is_root || (kind == svn_node_dir && is_switched);
 
   return SVN_NO_ERROR;
 }
@@ -4581,9 +4571,9 @@ svn_wc_read_kind(svn_node_kind_t *kind,
                             show_hidden,
                             scratch_pool));
 
-  /*if (db_kind == svn_kind_dir)
+  /*if (db_kind == svn_node_dir)
     *kind = svn_node_dir;
-  else if (db_kind == svn_kind_file || db_kind == svn_kind_symlink)
+  else if (db_kind == svn_node_file || db_kind == svn_node_symlink)
     *kind = svn_node_file;
   else
     *kind = svn_node_none;*/



Mime
View raw message