You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/08/20 17:31:36 UTC

svn commit: r1619127 [4/5] - in /subversion/branches/move-tracking-2: ./ build/generator/ notes/ notes/api-errata/1.8/ notes/api-errata/1.9/ subversion/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ sub...

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.c Wed Aug 20 15:31:32 2014
@@ -508,7 +508,7 @@ svn_wc__conflict_skel_add_prop_conflict(
 }
 
 /* A map for svn_wc_conflict_reason_t values. */
-static const svn_token_map_t local_change_map[] =
+static const svn_token_map_t reason_map[] =
 {
   { "edited",           svn_wc_conflict_reason_edited },
   { "obstructed",       svn_wc_conflict_reason_obstructed },
@@ -522,7 +522,7 @@ static const svn_token_map_t local_chang
   { NULL }
 };
 
-static const svn_token_map_t incoming_change_map[] =
+static const svn_token_map_t action_map[] =
 {
   { "edited",           svn_wc_conflict_action_edit },
   { "added",            svn_wc_conflict_action_add },
@@ -535,8 +535,8 @@ svn_error_t *
 svn_wc__conflict_skel_add_tree_conflict(svn_skel_t *conflict_skel,
                                         svn_wc__db_t *db,
                                         const char *wri_abspath,
-                                        svn_wc_conflict_reason_t local_change,
-                                        svn_wc_conflict_action_t incoming_change,
+                                        svn_wc_conflict_reason_t reason,
+                                        svn_wc_conflict_action_t action,
                                         const char *move_src_op_root_abspath,
                                         apr_pool_t *result_pool,
                                         apr_pool_t *scratch_pool)
@@ -549,12 +549,12 @@ svn_wc__conflict_skel_add_tree_conflict(
 
   SVN_ERR_ASSERT(!tree_conflict); /* ### Use proper error? */
 
-  SVN_ERR_ASSERT(local_change == svn_wc_conflict_reason_moved_away
+  SVN_ERR_ASSERT(reason == svn_wc_conflict_reason_moved_away
                  || !move_src_op_root_abspath); /* ### Use proper error? */
 
   tree_conflict = svn_skel__make_empty_list(result_pool);
 
-  if (local_change == svn_wc_conflict_reason_moved_away
+  if (reason == svn_wc_conflict_reason_moved_away
       && move_src_op_root_abspath)
     {
       const char *move_src_op_root_relpath;
@@ -568,13 +568,11 @@ svn_wc__conflict_skel_add_tree_conflict(
                             result_pool);
     }
 
-  svn_skel__prepend_str(
-                svn_token__to_word(incoming_change_map, incoming_change),
-                tree_conflict, result_pool);
-
-  svn_skel__prepend_str(
-                svn_token__to_word(local_change_map, local_change),
-                tree_conflict, result_pool);
+  svn_skel__prepend_str(svn_token__to_word(action_map, action),
+                        tree_conflict, result_pool);
+
+  svn_skel__prepend_str(svn_token__to_word(reason_map, reason),
+                        tree_conflict, result_pool);
 
   /* Tree conflicts have no marker files */
   markers = svn_skel__make_empty_list(result_pool);
@@ -930,8 +928,8 @@ svn_wc__conflict_read_prop_conflict(cons
 }
 
 svn_error_t *
-svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *local_change,
-                                    svn_wc_conflict_action_t *incoming_change,
+svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *reason,
+                                    svn_wc_conflict_action_t *action,
                                     const char **move_src_op_root_abspath,
                                     svn_wc__db_t *db,
                                     const char *wri_abspath,
@@ -956,28 +954,28 @@ svn_wc__conflict_read_tree_conflict(svn_
   c = c->next; /* Skip markers */
 
   {
-    int value = svn_token__from_mem(local_change_map, c->data, c->len);
+    int value = svn_token__from_mem(reason_map, c->data, c->len);
 
-    if (local_change)
+    if (reason)
       {
         if (value != SVN_TOKEN_UNKNOWN)
-          *local_change = value;
+          *reason = value;
         else
-          *local_change = svn_wc_conflict_reason_edited;
+          *reason = svn_wc_conflict_reason_edited;
       }
 
       is_moved_away = (value == svn_wc_conflict_reason_moved_away);
     }
   c = c->next;
 
-  if (incoming_change)
+  if (action)
     {
-      int value = svn_token__from_mem(incoming_change_map, c->data, c->len);
+      int value = svn_token__from_mem(action_map, c->data, c->len);
 
       if (value != SVN_TOKEN_UNKNOWN)
-        *incoming_change = value;
+        *action = value;
       else
-        *incoming_change = svn_wc_conflict_action_edit;
+        *action = svn_wc_conflict_action_edit;
     }
 
   c = c->next;
@@ -1049,68 +1047,7 @@ svn_wc__conflict_read_markers(const apr_
 
 /* --------------------------------------------------------------------
  */
-/* Helper for svn_wc__conflict_create_markers */
-static svn_skel_t *
-prop_conflict_skel_new(apr_pool_t *result_pool)
-{
-  svn_skel_t *operation = svn_skel__make_empty_list(result_pool);
-  svn_skel_t *result = svn_skel__make_empty_list(result_pool);
-
-  svn_skel__prepend(operation, result);
-  return result;
-}
-
-
-/* Helper for prop_conflict_skel_add */
-static void
-prepend_prop_value(const svn_string_t *value,
-                   svn_skel_t *skel,
-                   apr_pool_t *result_pool)
-{
-  svn_skel_t *value_skel = svn_skel__make_empty_list(result_pool);
-
-  if (value != NULL)
-    {
-      const void *dup = apr_pmemdup(result_pool, value->data, value->len);
-
-      svn_skel__prepend(svn_skel__mem_atom(dup, value->len, result_pool),
-                        value_skel);
-    }
-
-  svn_skel__prepend(value_skel, skel);
-}
-
 
-/* Helper for svn_wc__conflict_create_markers */
-static svn_error_t *
-prop_conflict_skel_add(
-  svn_skel_t *skel,
-  const char *prop_name,
-  const svn_string_t *original_value,
-  const svn_string_t *mine_value,
-  const svn_string_t *incoming_value,
-  const svn_string_t *incoming_base_value,
-  apr_pool_t *result_pool,
-  apr_pool_t *scratch_pool)
-{
-  svn_skel_t *prop_skel = svn_skel__make_empty_list(result_pool);
-
-  /* ### check that OPERATION has been filled in.  */
-
-  /* See notes/wc-ng/conflict-storage  */
-  prepend_prop_value(incoming_base_value, prop_skel, result_pool);
-  prepend_prop_value(incoming_value, prop_skel, result_pool);
-  prepend_prop_value(mine_value, prop_skel, result_pool);
-  prepend_prop_value(original_value, prop_skel, result_pool);
-  svn_skel__prepend_str(apr_pstrdup(result_pool, prop_name), prop_skel,
-                        result_pool);
-  svn_skel__prepend_str(SVN_WC__CONFLICT_KIND_PROP, prop_skel, result_pool);
-
-  /* Now we append PROP_SKEL to the end of the provided conflict SKEL.  */
-  svn_skel__append(skel, prop_skel);
-
-  return SVN_NO_ERROR;
-}
 
 svn_error_t *
 svn_wc__conflict_create_markers(svn_skel_t **work_items,
@@ -1140,10 +1077,8 @@ svn_wc__conflict_create_markers(svn_skel
 
       /* Ok, currently we have to do a few things for property conflicts:
          - Create a marker file
-         - Create a WQ item that sets the marker name
-         - Create a WQ item that fills the marker with the expected data
-
-         This can be simplified once we really store conflict_skel in wc.db */
+         - Store the name in the conflict_skel
+         - Create a WQ item that fills the marker with the expected data */
 
       SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
 
@@ -1175,65 +1110,9 @@ svn_wc__conflict_create_markers(svn_skel
         svn_skel__prepend_str(marker_relpath, prop_conflict->children->next,
                             result_pool);
       }
-
-      /* Store the data in the WQ item in the same format used as 1.7.
-         Once we store the data in DB it is easier to just read it back
-         from the workqueue */
-      {
-        svn_skel_t *prop_data;
-        apr_hash_index_t *hi;
-        apr_hash_t *old_props;
-        apr_hash_t *mine_props;
-        apr_hash_t *their_original_props;
-        apr_hash_t *their_props;
-        apr_hash_t *conflicted_props;
-
-        SVN_ERR(svn_wc__conflict_read_prop_conflict(NULL,
-                                                    &mine_props,
-                                                    &their_original_props,
-                                                    &their_props,
-                                                    &conflicted_props,
-                                                    db, local_abspath,
-                                                    conflict_skel,
-                                                    scratch_pool,
-                                                    scratch_pool));
-
-        if (operation == svn_wc_operation_merge)
-          SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
-                                                 scratch_pool, scratch_pool));
-        else
-          old_props = their_original_props;
-
-        prop_data = prop_conflict_skel_new(result_pool);
-
-        for (hi = apr_hash_first(scratch_pool, conflicted_props);
-             hi;
-             hi = apr_hash_next(hi))
-          {
-            const char *propname = apr_hash_this_key(hi);
-
-            SVN_ERR(prop_conflict_skel_add(
-                            prop_data, propname,
-                            old_props
-                                    ? svn_hash_gets(old_props, propname)
-                                    : NULL,
-                            mine_props
-                                    ? svn_hash_gets(mine_props, propname)
-                                    : NULL,
-                            their_props
-                                    ? svn_hash_gets(their_props, propname)
-                                      : NULL,
-                            their_original_props
-                                    ? svn_hash_gets(their_original_props, propname)
-                                      : NULL,
-                            result_pool, scratch_pool));
-          }
-
-        SVN_ERR(svn_wc__wq_build_prej_install(work_items,
-                                              db, local_abspath,
-                                              prop_data,
-                                              scratch_pool, scratch_pool));
-      }
+      SVN_ERR(svn_wc__wq_build_prej_install(work_items,
+                                            db, local_abspath,
+                                            scratch_pool, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -1273,10 +1152,12 @@ generate_propconflict(svn_boolean_t *con
                       const svn_string_t *incoming_new_val,
                       svn_wc_conflict_resolver_func2_t conflict_func,
                       void *conflict_baton,
+                      svn_cancel_func_t cancel_func,
+                      void *cancel_baton,
                       apr_pool_t *scratch_pool)
 {
   svn_wc_conflict_result_t *result = NULL;
-  svn_wc_conflict_description3_t *cdesc;
+  svn_wc_conflict_description2_t *cdesc;
   const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
   svn_node_kind_t kind;
   const svn_string_t *new_value = NULL;
@@ -1293,7 +1174,7 @@ generate_propconflict(svn_boolean_t *con
                              svn_dirent_local_style(local_abspath,
                                                     scratch_pool));
 
-  cdesc = svn_wc_conflict_description_create_prop3(
+  cdesc = svn_wc_conflict_description_create_prop2(
                 local_abspath,
                 (kind == svn_node_dir) ? svn_node_dir : svn_node_file,
                 propname, scratch_pool);
@@ -1312,6 +1193,7 @@ generate_propconflict(svn_boolean_t *con
                                   svn_io_file_del_on_pool_cleanup,
                                   scratch_pool));
       cdesc->my_abspath = svn_dirent_join(dirpath, file_name, scratch_pool);
+      cdesc->prop_value_working = working_val;
     }
 
   if (incoming_new_val)
@@ -1322,7 +1204,11 @@ generate_propconflict(svn_boolean_t *con
                                   incoming_new_val->len,
                                   svn_io_file_del_on_pool_cleanup,
                                   scratch_pool));
-      cdesc->their_abspath = svn_dirent_join(dirpath, file_name, scratch_pool);
+
+      /* ### For property conflicts, cd2 stores prop_reject_abspath in
+       * ### their_abspath, and stores theirs_abspath in merged_file. */
+      cdesc->merged_file = svn_dirent_join(dirpath, file_name, scratch_pool);
+      cdesc->prop_value_incoming_new = incoming_new_val;
     }
 
   if (!base_val && !incoming_old_val)
@@ -1388,6 +1274,9 @@ generate_propconflict(svn_boolean_t *con
                                   svn_io_file_del_on_pool_cleanup, scratch_pool));
       cdesc->base_abspath = svn_dirent_join(dirpath, file_name, scratch_pool);
 
+      cdesc->prop_value_base = base_val;
+      cdesc->prop_value_incoming_old = incoming_old_val;
+
       if (working_val && incoming_new_val)
         {
           svn_stream_t *mergestream;
@@ -1395,18 +1284,22 @@ generate_propconflict(svn_boolean_t *con
           svn_diff_file_options_t *options =
             svn_diff_file_options_create(scratch_pool);
 
-          SVN_ERR(svn_stream_open_unique(&mergestream,
-                                         &cdesc->prop_reject_abspath,
+          SVN_ERR(svn_stream_open_unique(&mergestream, &cdesc->prop_reject_abspath,
                                          NULL, svn_io_file_del_on_pool_cleanup,
                                          scratch_pool, scratch_pool));
           SVN_ERR(svn_diff_mem_string_diff3(&diff, conflict_base_val,
                                             working_val,
                                             incoming_new_val, options, scratch_pool));
-          SVN_ERR(svn_diff_mem_string_output_merge2(mergestream, diff,
+          SVN_ERR(svn_diff_mem_string_output_merge3(mergestream, diff,
                    conflict_base_val, working_val,
                    incoming_new_val, NULL, NULL, NULL, NULL,
-                   svn_diff_conflict_display_modified_latest, scratch_pool));
+                   svn_diff_conflict_display_modified_latest,
+                   cancel_func, cancel_baton, scratch_pool));
           SVN_ERR(svn_stream_close(mergestream));
+
+          /* ### For property conflicts, cd2 stores prop_reject_abspath in
+           * ### their_abspath, and stores theirs_abspath in merged_file. */
+          cdesc->their_abspath = cdesc->prop_reject_abspath;
         }
     }
 
@@ -1425,8 +1318,8 @@ generate_propconflict(svn_boolean_t *con
     cdesc->reason = svn_wc_conflict_reason_edited;
 
   /* Invoke the interactive conflict callback. */
-  SVN_ERR(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
-                        conflict_baton, scratch_pool, scratch_pool));
+  SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+                        scratch_pool));
   if (result == NULL)
     {
       *conflict_remains = TRUE;
@@ -1472,7 +1365,7 @@ generate_propconflict(svn_boolean_t *con
         {
           svn_stringbuf_t *merged_stringbuf;
 
-          if (!cdesc->merged_abspath && !result->merged_file)
+          if (!cdesc->merged_file && !result->merged_file)
             return svn_error_create
                 (SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
                  NULL, _("Conflict callback violated API:"
@@ -1481,7 +1374,7 @@ generate_propconflict(svn_boolean_t *con
           SVN_ERR(svn_stringbuf_from_file2(&merged_stringbuf,
                                            result->merged_file ?
                                                 result->merged_file :
-                                                cdesc->merged_abspath,
+                                                cdesc->merged_file,
                                            scratch_pool));
           new_value = svn_stringbuf__morph_into_string(merged_stringbuf);
           *conflict_remains = FALSE;
@@ -1534,6 +1427,8 @@ merge_showing_conflicts(const char **cho
                         const char *detranslated_target,
                         const char *right_abspath,
                         svn_io_file_del_t delete_when,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
@@ -1562,12 +1457,12 @@ merge_showing_conflicts(const char **cho
                                 left_abspath,
                                 detranslated_target, right_abspath,
                                 diff3_options, scratch_pool));
-  SVN_ERR(svn_diff_file_output_merge2(chosen_stream, diff,
+  SVN_ERR(svn_diff_file_output_merge3(chosen_stream, diff,
                                       left_abspath,
                                       detranslated_target,
                                       right_abspath,
                                       NULL, NULL, NULL, NULL, /* markers */
-                                      style,
+                                      style, cancel_func, cancel_baton,
                                       scratch_pool));
   SVN_ERR(svn_stream_close(chosen_stream));
 
@@ -1603,8 +1498,10 @@ eval_text_conflict_func_result(svn_skel_
                                const apr_array_header_t *merge_options,
                                const char *left_abspath,
                                const char *right_abspath,
-                               const char *merged_abspath,
+                               const char *merged_file,
                                const char *detranslated_target,
+                               svn_cancel_func_t cancel_func,
+                               void *cancel_baton,
                                apr_pool_t *result_pool,
                                apr_pool_t *scratch_pool)
 {
@@ -1651,6 +1548,7 @@ eval_text_conflict_func_result(svn_skel_
                                           right_abspath,
                                           /* ### why not same as other caller? */
                                           svn_io_file_del_none,
+                                          cancel_func, cancel_baton,
                                           scratch_pool, scratch_pool));
           remove_source = TRUE;
           *is_resolved = TRUE;
@@ -1665,7 +1563,7 @@ eval_text_conflict_func_result(svn_skel_
            good to use". */
       case svn_wc_conflict_choose_merged:
         {
-          install_from_abspath = merged_abspath;
+          install_from_abspath = merged_file;
           *is_resolved = TRUE;
           break;
         }
@@ -1777,10 +1675,12 @@ resolve_text_conflict(svn_skel_t **work_
                       svn_boolean_t *was_resolved,
                       svn_wc__db_t *db,
                       const char *local_abspath,
-                      svn_wc_conflict_description3_t *cdesc,
+                      svn_wc_conflict_description2_t *cdesc,
                       const apr_array_header_t *merge_options,
                       svn_wc_conflict_resolver_func2_t conflict_func,
                       void *conflict_baton,
+                      svn_cancel_func_t cancel_func,
+                      void *cancel_baton,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
 {
@@ -1793,8 +1693,8 @@ 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(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
-                        conflict_baton, scratch_pool, scratch_pool));
+  SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+                        scratch_pool));
   if (result == NULL)
     return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
                             _("Conflict callback violated API:"
@@ -1808,7 +1708,7 @@ resolve_text_conflict(svn_skel_t **work_
                                     merged-file first: */
                                 result->merged_file
                                   ? result->merged_file
-                                  : cdesc->merged_abspath,
+                                  : cdesc->merged_file,
                                 result_pool, scratch_pool));
     }
 
@@ -1824,8 +1724,9 @@ resolve_text_conflict(svn_skel_t **work_
                                              /* ### Sure this is an abspath? */
                                              result->merged_file
                                                ? result->merged_file
-                                               : cdesc->merged_abspath,
+                                               : cdesc->merged_file,
                                              cdesc->my_abspath,
+                                             cancel_func, cancel_baton,
                                              result_pool, scratch_pool));
       *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
     }
@@ -1847,7 +1748,7 @@ resolve_text_conflict(svn_skel_t **work_
  * Allocate results in RESULT_POOL.  SCRATCH_POOL is used for temporary
  * allocations. */
 static svn_error_t *
-read_text_conflict_desc(svn_wc_conflict_description3_t **desc,
+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,
@@ -1859,7 +1760,7 @@ read_text_conflict_desc(svn_wc_conflict_
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
-  *desc = svn_wc_conflict_description_create_text3(local_abspath, result_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;
@@ -1872,7 +1773,7 @@ read_text_conflict_desc(svn_wc_conflict_
                                               db, local_abspath,
                                               conflict_skel,
                                               result_pool, scratch_pool));
-  (*desc)->merged_abspath = apr_pstrdup(result_pool, local_abspath);
+  (*desc)->merged_file = apr_pstrdup(result_pool, local_abspath);
 
   return SVN_NO_ERROR;
 }
@@ -1887,7 +1788,7 @@ read_text_conflict_desc(svn_wc_conflict_
  * Allocate results in RESULT_POOL.  SCRATCH_POOL is used for temporary
  * allocations. */
 static svn_error_t *
-read_tree_conflict_desc(svn_wc_conflict_description3_t **desc,
+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,
@@ -1898,11 +1799,11 @@ read_tree_conflict_desc(svn_wc_conflict_
                         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_wc_conflict_reason_t reason;
+  svn_wc_conflict_action_t action;
 
   SVN_ERR(svn_wc__conflict_read_tree_conflict(
-            &local_change, &incoming_change, NULL,
+            &reason, &action, NULL,
             db, local_abspath, conflict_skel, scratch_pool, scratch_pool));
 
   if (left_version)
@@ -1912,12 +1813,12 @@ read_tree_conflict_desc(svn_wc_conflict_
   else
     tc_kind = svn_node_file; /* Avoid assertion */
 
-  *desc = svn_wc_conflict_description_create_tree3(local_abspath, tc_kind,
+  *desc = svn_wc_conflict_description_create_tree2(local_abspath, tc_kind,
                                                    operation,
                                                    left_version, right_version,
                                                    result_pool);
-  (*desc)->reason = local_change;
-  (*desc)->action = incoming_change;
+  (*desc)->reason = reason;
+  (*desc)->action = action;
 
   return SVN_NO_ERROR;
 }
@@ -2020,6 +1921,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                           ? svn_hash_gets(their_props, propname)
                                           : NULL,
                                         resolver_func, resolver_baton,
+                                        cancel_func, cancel_baton,
                                         iterpool));
 
           if (conflict_remains)
@@ -2038,7 +1940,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
     {
       svn_skel_t *work_items;
       svn_boolean_t was_resolved;
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
       apr_hash_t *props;
 
       SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
@@ -2055,6 +1957,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                     db, local_abspath, desc,
                                     merge_options,
                                     resolver_func, resolver_baton,
+                                    cancel_func, cancel_baton,
                                     scratch_pool, scratch_pool));
 
       if (was_resolved)
@@ -2068,6 +1971,8 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                      scratch_pool));
             }
           SVN_ERR(svn_wc__mark_resolved_text_conflict(db, local_abspath,
+                                                      cancel_func,
+                                                      cancel_baton,
                                                       scratch_pool));
         }
     }
@@ -2075,7 +1980,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
   if (tree_conflicted)
     {
       svn_wc_conflict_result_t *result;
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
 
       SVN_ERR(read_tree_conflict_desc(&desc,
                                       db, local_abspath, conflict_skel,
@@ -2083,8 +1988,8 @@ svn_wc__conflict_invoke_resolver(svn_wc_
                                       scratch_pool, scratch_pool));
 
       /* Tell the resolver func about this conflict. */
-      SVN_ERR(resolver_func(&result, svn_wc__cd3_to_cd2(desc, scratch_pool),
-                            resolver_baton, scratch_pool, scratch_pool));
+      SVN_ERR(resolver_func(&result, desc, resolver_baton, scratch_pool,
+                            scratch_pool));
 
       /* Ignore the result. We cannot apply it here since this code runs
        * during an update or merge operation. Tree conflicts are always
@@ -2121,6 +2026,7 @@ read_prop_conflict_descs(apr_array_heade
                          apr_pool_t *scratch_pool)
 {
   const char *prop_reject_file;
+  apr_hash_t *base_props;
   apr_hash_t *my_props;
   apr_hash_t *their_old_props;
   apr_hash_t *their_props;
@@ -2140,23 +2046,28 @@ read_prop_conflict_descs(apr_array_heade
   if ((! create_tempfiles) || apr_hash_count(conflicted_props) == 0)
     {
       /* Legacy prop conflict with only a .reject file. */
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
 
-      desc  = svn_wc_conflict_description_create_prop3(local_abspath,
+      desc  = svn_wc_conflict_description_create_prop2(local_abspath,
                                                        node_kind,
                                                        "", result_pool);
 
+      /* ### For property conflicts, cd2 stores prop_reject_abspath in
+       * ### their_abspath, and stores theirs_abspath in merged_file. */
       desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+      desc->their_abspath = desc->prop_reject_abspath;
 
       desc->operation = operation;
       desc->src_left_version = left_version;
       desc->src_right_version = right_version;
 
-      APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
+      APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t *) = desc;
 
       return SVN_NO_ERROR;
     }
 
+  SVN_ERR(svn_wc__db_base_get_props(&base_props, db, local_abspath,
+                                    result_pool, scratch_pool));
   iterpool = svn_pool_create(scratch_pool);
   for (hi = apr_hash_first(scratch_pool, conflicted_props);
        hi;
@@ -2166,11 +2077,11 @@ read_prop_conflict_descs(apr_array_heade
       svn_string_t *old_value;
       svn_string_t *my_value;
       svn_string_t *their_value;
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
 
       svn_pool_clear(iterpool);
 
-      desc = svn_wc_conflict_description_create_prop3(local_abspath,
+      desc = svn_wc_conflict_description_create_prop2(local_abspath,
                                                       node_kind,
                                                       propname,
                                                       result_pool);
@@ -2201,12 +2112,13 @@ read_prop_conflict_descs(apr_array_heade
       else
         desc->reason = svn_wc_conflict_reason_edited;
 
+      /* ### For property conflicts, cd2 stores prop_reject_abspath in
+       * ### their_abspath, and stores theirs_abspath in merged_file. */
       desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+      desc->their_abspath = desc->prop_reject_abspath;
+
+      desc->prop_value_base = svn_hash_gets(base_props, propname);
 
-      /* ### This should be changed. The conflict description for
-       * ### props should contain these values as svn_string_t,
-       * ### rather than in temporary files. We need to rev the
-       * ### conflict description struct for this. */
       if (my_value)
         {
           svn_stream_t *s;
@@ -2218,6 +2130,8 @@ read_prop_conflict_descs(apr_array_heade
           len = my_value->len;
           SVN_ERR(svn_stream_write(s, my_value->data, &len));
           SVN_ERR(svn_stream_close(s));
+
+          desc->prop_value_working = svn_string_dup(my_value, result_pool);
         }
 
       if (their_value)
@@ -2225,12 +2139,16 @@ read_prop_conflict_descs(apr_array_heade
           svn_stream_t *s;
           apr_size_t len;
 
-          SVN_ERR(svn_stream_open_unique(&s, &desc->their_abspath, NULL,
+          /* ### For property conflicts, cd2 stores prop_reject_abspath in
+           * ### their_abspath, and stores theirs_abspath in merged_file. */
+          SVN_ERR(svn_stream_open_unique(&s, &desc->merged_file, NULL,
                                          svn_io_file_del_on_pool_cleanup,
                                          result_pool, iterpool));
           len = their_value->len;
           SVN_ERR(svn_stream_write(s, their_value->data, &len));
           SVN_ERR(svn_stream_close(s));
+
+          desc->prop_value_incoming_new = svn_string_dup(their_value, result_pool);
         }
 
       if (old_value)
@@ -2244,9 +2162,11 @@ read_prop_conflict_descs(apr_array_heade
           len = old_value->len;
           SVN_ERR(svn_stream_write(s, old_value->data, &len));
           SVN_ERR(svn_stream_close(s));
+
+          desc->prop_value_incoming_old = svn_string_dup(old_value, result_pool);
         }
 
-      APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
+      APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t *) = desc;
     }
   svn_pool_destroy(iterpool);
 
@@ -2278,7 +2198,7 @@ svn_wc__read_conflicts(const apr_array_h
     {
       /* Some callers expect not NULL */
       *conflicts = apr_array_make(result_pool, 0,
-                                  sizeof(svn_wc_conflict_description3_t *));;
+                                  sizeof(svn_wc_conflict_description2_t *));;
       return SVN_NO_ERROR;
     }
 
@@ -2288,7 +2208,7 @@ svn_wc__read_conflicts(const apr_array_h
                                      result_pool, scratch_pool));
 
   cflcts = apr_array_make(result_pool, 4,
-                          sizeof(svn_wc_conflict_description3_t *));
+                          sizeof(svn_wc_conflict_description2_t *));
 
   if (locations && locations->nelts > 0)
     left_version = APR_ARRAY_IDX(locations, 0, const svn_wc_conflict_version_t *);
@@ -2309,26 +2229,26 @@ svn_wc__read_conflicts(const apr_array_h
 
   if (text_conflicted)
     {
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
 
       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_description3_t *) = desc;
+      APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description2_t *) = desc;
     }
 
   if (tree_conflicted)
     {
-      svn_wc_conflict_description3_t *desc;
+      svn_wc_conflict_description2_t *desc;
 
       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_description3_t *) = desc;
+      APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description2_t *) = desc;
     }
 
   *conflicts = cflcts;
@@ -2467,6 +2387,7 @@ resolve_text_conflict_on_node(svn_boolea
                                             conflict_new,
                                             /* ### why not same as other caller? */
                                             svn_io_file_del_on_pool_cleanup,
+                                            cancel_func, cancel_baton,
                                             scratch_pool, scratch_pool));
           }
         else
@@ -2891,6 +2812,8 @@ resolve_tree_conflict_on_node(svn_boolea
 svn_error_t *
 svn_wc__mark_resolved_text_conflict(svn_wc__db_t *db,
                                     const char *local_abspath,
+                                    svn_cancel_func_t cancel_func,
+                                    void *cancel_baton,
                                     apr_pool_t *scratch_pool)
 {
   svn_boolean_t ignored_result;
@@ -2899,7 +2822,7 @@ svn_wc__mark_resolved_text_conflict(svn_
                            &ignored_result,
                            db, local_abspath,
                            svn_wc_conflict_choose_merged, NULL,
-                           NULL, NULL,
+                           cancel_func, cancel_baton,
                            scratch_pool));
 }
 
@@ -2962,12 +2885,12 @@ conflict_status_walker(void *baton,
 
   for (i = 0; i < conflicts->nelts; i++)
     {
-      const svn_wc_conflict_description3_t *cd;
+      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_description3_t *);
+      cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *);
 
       svn_pool_clear(iterpool);
 
@@ -2980,9 +2903,7 @@ conflict_status_walker(void *baton,
                                     _("No conflict-callback and no "
                                       "pre-defined conflict-choice provided"));
 
-          SVN_ERR(cswb->conflict_func(&result,
-                                      svn_wc__cd3_to_cd2(cd, scratch_pool),
-                                      cswb->conflict_baton,
+          SVN_ERR(cswb->conflict_func(&result, cd, cswb->conflict_baton,
                                       iterpool, iterpool));
 
           my_choice = result->choice;

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/conflicts.h Wed Aug 20 15:31:32 2014
@@ -432,6 +432,8 @@ svn_wc__conflict_invoke_resolver(svn_wc_
 svn_error_t *
 svn_wc__mark_resolved_text_conflict(svn_wc__db_t *db,
                                     const char *local_abspath,
+                                    svn_cancel_func_t cancel_func,
+                                    void *cancel_baton,
                                     apr_pool_t *scratch_pool);
 
 /* Mark as resolved any prop conflicts on the node at DB/LOCAL_ABSPATH.  */

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/deprecated.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/deprecated.c Wed Aug 20 15:31:32 2014
@@ -2735,11 +2735,9 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
   if (old_status->conflicted)
     {
-      const svn_wc_conflict_description3_t *tree_conflict;
       const svn_wc_conflict_description2_t *tree_conflict2;
-      SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, wc_ctx, local_abspath,
+      SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict2, wc_ctx, local_abspath,
                                         scratch_pool, scratch_pool));
-      tree_conflict2 = svn_wc__cd3_to_cd2(tree_conflict, scratch_pool);
       (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict2, result_pool);
     }
 
@@ -4791,96 +4789,8 @@ svn_wc_read_kind(svn_node_kind_t *kind,
 }
 
 svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_text2(const char *local_abspath,
-                                         apr_pool_t *result_pool)
-{
-  svn_wc_conflict_description2_t *conflict;
-
-  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
-  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
-  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
-  conflict->node_kind = svn_node_file;
-  conflict->kind = svn_wc_conflict_kind_text;
-  conflict->action = svn_wc_conflict_action_edit;
-  conflict->reason = svn_wc_conflict_reason_edited;
-  return conflict;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_prop2(const char *local_abspath,
-                                         svn_node_kind_t node_kind,
-                                         const char *property_name,
-                                         apr_pool_t *result_pool)
-{
-  svn_wc_conflict_description2_t *conflict;
-
-  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
-  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
-  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
-  conflict->node_kind = node_kind;
-  conflict->kind = svn_wc_conflict_kind_property;
-  conflict->property_name = apr_pstrdup(result_pool, property_name);
-  return conflict;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_tree2(
-  const char *local_abspath,
-  svn_node_kind_t node_kind,
-  svn_wc_operation_t operation,
-  const svn_wc_conflict_version_t *src_left_version,
-  const svn_wc_conflict_version_t *src_right_version,
-  apr_pool_t *result_pool)
-{
-  svn_wc_conflict_description2_t *conflict;
-
-  SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
-  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
-  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
-  conflict->node_kind = node_kind;
-  conflict->kind = svn_wc_conflict_kind_tree;
-  conflict->operation = operation;
-  conflict->src_left_version = svn_wc_conflict_version_dup(src_left_version,
-                                                           result_pool);
-  conflict->src_right_version = svn_wc_conflict_version_dup(src_right_version,
-                                                            result_pool);
-  return conflict;
-}
-
-svn_wc_conflict_description2_t *
 svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
                                   apr_pool_t *pool)
 {
-  svn_wc_conflict_description2_t *new_conflict;
-
-  new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
-
-  /* Shallow copy all members. */
-  *new_conflict = *conflict;
-
-  if (conflict->local_abspath)
-    new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
-  if (conflict->property_name)
-    new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
-  if (conflict->mime_type)
-    new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
-  if (conflict->base_abspath)
-    new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
-  if (conflict->their_abspath)
-    new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
-  if (conflict->my_abspath)
-    new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
-  if (conflict->merged_file)
-    new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
-  if (conflict->src_left_version)
-    new_conflict->src_left_version =
-      svn_wc_conflict_version_dup(conflict->src_left_version, pool);
-  if (conflict->src_right_version)
-    new_conflict->src_right_version =
-      svn_wc_conflict_version_dup(conflict->src_right_version, pool);
-
-  return new_conflict;
+  return svn_wc_conflict_description2_dup(conflict, pool);
 }

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/entries.c Wed Aug 20 15:31:32 2014
@@ -464,9 +464,9 @@ read_one_entry(const svn_wc_entry_t **ne
 
           for (j = 0; j < child_conflicts->nelts; j++)
             {
-              const svn_wc_conflict_description3_t *conflict =
+              const svn_wc_conflict_description2_t *conflict =
                 APR_ARRAY_IDX(child_conflicts, j,
-                              svn_wc_conflict_description3_t *);
+                              svn_wc_conflict_description2_t *);
 
               if (conflict->kind == svn_wc_conflict_kind_tree)
                 {
@@ -1894,13 +1894,13 @@ write_entry(struct write_baton **entry_n
       skel = skel->children;
       while (skel)
         {
-          svn_wc_conflict_description3_t *conflict;
+          svn_wc_conflict_description2_t *conflict;
           svn_skel_t *new_skel;
           const char *key;
 
           /* *CONFLICT is allocated so it is safe to use a non-const pointer */
           SVN_ERR(svn_wc__deserialize_conflict(
-                             (const svn_wc_conflict_description3_t**)&conflict,
+                             (const svn_wc_conflict_description2_t**)&conflict,
                                                skel,
                                                svn_dirent_join(root_abspath,
                                                                local_relpath,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/externals.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/externals.c Wed Aug 20 15:31:32 2014
@@ -417,8 +417,6 @@ struct edit_baton
   /* Introducing a new file external */
   svn_boolean_t added;
 
-  svn_wc_conflict_resolver_func2_t conflict_func;
-  void *conflict_baton;
   svn_cancel_func_t cancel_func;
   void *cancel_baton;
   svn_wc_notify_func2_t notify_func;
@@ -991,8 +989,6 @@ svn_wc__get_file_external_editor(const s
                                  const char *recorded_url,
                                  const svn_opt_revision_t *recorded_peg_rev,
                                  const svn_opt_revision_t *recorded_rev,
-                                 svn_wc_conflict_resolver_func2_t conflict_func,
-                                 void *conflict_baton,
                                  svn_cancel_func_t cancel_func,
                                  void *cancel_baton,
                                  svn_wc_notify_func2_t notify_func,
@@ -1041,8 +1037,6 @@ svn_wc__get_file_external_editor(const s
   else
     eb->recorded_revision = SVN_INVALID_REVNUM; /* Not fixed/HEAD */
 
-  eb->conflict_func = conflict_func;
-  eb->conflict_baton = conflict_baton;
   eb->cancel_func = cancel_func;
   eb->cancel_baton = cancel_baton;
   eb->notify_func = notify_func;

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/info.c Wed Aug 20 15:31:32 2014
@@ -52,7 +52,7 @@ svn_wc_info_dup(const svn_wc_info_t *inf
       for (i = 0; i < info->conflicts->nelts; i++)
         {
           APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *)
-            = svn_wc__conflict_description2_dup(
+            = svn_wc_conflict_description2_dup(
                 APR_ARRAY_IDX(info->conflicts, i,
                               const svn_wc_conflict_description2_t *),
                 pool);
@@ -310,16 +310,10 @@ build_info_for_node(svn_wc__info2_t **in
                                 local_abspath, result_pool, scratch_pool));
 
   if (conflicted)
-    {
-      const apr_array_header_t *conflicts;
-
-      SVN_ERR(svn_wc__read_conflicts(&conflicts, db,
-                                     local_abspath,
-                                     TRUE /* ### create tempfiles */,
-                                     result_pool, scratch_pool));
-      wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
-                                                          result_pool);
-    }
+    SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, db,
+                                   local_abspath,
+                                   TRUE /* ### create tempfiles */,
+                                   result_pool, scratch_pool));
   else
     wc_info->conflicts = NULL;
 
@@ -540,7 +534,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
        hi = apr_hash_next(hi))
     {
       const char *this_abspath = apr_hash_this_key(hi);
-      const svn_wc_conflict_description3_t *tree_conflict;
+      const svn_wc_conflict_description2_t *tree_conflict;
       svn_wc__info2_t *info;
       const apr_array_header_t *conflicts;
 
@@ -572,14 +566,13 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
         continue;
 
       tree_conflict = APR_ARRAY_IDX(conflicts, 0,
-                                    const svn_wc_conflict_description3_t *);
+                                    const svn_wc_conflict_description2_t *);
 
       if (!depth_includes(local_abspath, depth, tree_conflict->local_abspath,
                           tree_conflict->node_kind, iterpool))
         continue;
 
-      info->wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
-                                                                iterpool);
+      info->wc_info->conflicts = conflicts;
       SVN_ERR(receiver(receiver_baton, this_abspath, info, iterpool));
     }
   svn_pool_destroy(iterpool);

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/merge.c Wed Aug 20 15:31:32 2014
@@ -392,6 +392,8 @@ do_text_merge(svn_boolean_t *contains_co
               const char *target_label,
               const char *left_label,
               const char *right_label,
+              svn_cancel_func_t cancel_func,
+              void *cancel_baton,
               apr_pool_t *pool)
 {
   svn_diff_t *diff;
@@ -416,13 +418,14 @@ do_text_merge(svn_boolean_t *contains_co
 
   ostream = svn_stream_from_aprfile2(result_f, TRUE, pool);
 
-  SVN_ERR(svn_diff_file_output_merge2(ostream, diff,
+  SVN_ERR(svn_diff_file_output_merge3(ostream, diff,
                                       left, detranslated_target, right,
                                       left_marker,
                                       target_marker,
                                       right_marker,
                                       "=======", /* separator */
                                       svn_diff_conflict_display_modified_original_latest,
+                                      cancel_func, cancel_baton,
                                       pool));
   SVN_ERR(svn_stream_close(ostream));
 
@@ -871,6 +874,7 @@ merge_text_file(svn_skel_t **work_items,
                           target_label,
                           left_label,
                           right_label,
+                          cancel_func, cancel_baton,
                           pool));
 
   SVN_ERR(svn_io_file_close(result_f, pool));

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/props.c Wed Aug 20 15:31:32 2014
@@ -66,6 +66,8 @@
 static svn_error_t *
 prop_conflict_from_skel(const svn_string_t **conflict_desc,
                         const svn_skel_t *skel,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool);
 
@@ -76,13 +78,16 @@ prop_conflict_from_skel(const svn_string
 static svn_error_t *
 append_prop_conflict(svn_stream_t *stream,
                      const svn_skel_t *prop_skel,
+                     svn_cancel_func_t cancel_func,
+                     void *cancel_baton,
                      apr_pool_t *pool)
 {
   /* TODO:  someday, perhaps prefix each conflict_description with a
      timestamp or something? */
   const svn_string_t *conflict_desc;
 
-  SVN_ERR(prop_conflict_from_skel(&conflict_desc, prop_skel, pool, pool));
+  SVN_ERR(prop_conflict_from_skel(&conflict_desc, prop_skel,
+                                  cancel_func, cancel_baton, pool, pool));
 
   return svn_stream_puts(stream, conflict_desc->data);
 }
@@ -544,6 +549,8 @@ maybe_prop_value(const svn_skel_t *skel,
 static svn_error_t *
 prop_conflict_from_skel(const svn_string_t **conflict_desc,
                         const svn_skel_t *skel,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
@@ -653,13 +660,15 @@ prop_conflict_from_skel(const svn_string
           style = svn_diff_conflict_display_modified_original_latest;
           stream = svn_stream_from_stringbuf(buf, scratch_pool);
           SVN_ERR(svn_stream_skip(stream, buf->len));
-          SVN_ERR(svn_diff_mem_string_output_merge2(stream, diff,
+          SVN_ERR(svn_diff_mem_string_output_merge3(stream, diff,
                                                     incoming_base_ascii,
                                                     mine_ascii,
                                                     incoming_ascii,
                                                     incoming_base_marker, mine_marker,
                                                     incoming_marker, separator,
-                                                    style, scratch_pool));
+                                                    style,
+                                                    cancel_func, cancel_baton,
+                                                    scratch_pool));
           SVN_ERR(svn_stream_close(stream));
 
           *conflict_desc = svn_string_create_from_buf(buf, result_pool);
@@ -702,6 +711,8 @@ svn_wc__create_prejfile(const char **tmp
                         svn_wc__db_t *db,
                         const char *local_abspath,
                         const svn_skel_t *conflict_skel,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
@@ -723,7 +734,8 @@ svn_wc__create_prejfile(const char **tmp
     {
       svn_pool_clear(iterpool);
 
-      SVN_ERR(append_prop_conflict(stream, scan, iterpool));
+      SVN_ERR(append_prop_conflict(stream, scan, cancel_func, cancel_baton,
+                                   iterpool));
     }
 
   SVN_ERR(svn_stream_close(stream));

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/props.h?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/props.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/props.h Wed Aug 20 15:31:32 2014
@@ -144,6 +144,8 @@ svn_wc__create_prejfile(const char **tmp
                         svn_wc__db_t *db,
                         const char *local_abspath,
                         const svn_skel_t *conflict_skel,
+                        svn_cancel_func_t cancel_func,
+                        void *cancel_baton,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool);
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.c Wed Aug 20 15:31:32 2014
@@ -196,7 +196,7 @@ read_node_version_info(const svn_wc_conf
 
 
 svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
                              const svn_skel_t *skel,
                              const char *dir_path,
                              apr_pool_t *result_pool,
@@ -211,7 +211,7 @@ svn_wc__deserialize_conflict(const svn_w
   const svn_wc_conflict_version_t *src_left_version;
   const svn_wc_conflict_version_t *src_right_version;
   int n;
-  svn_wc_conflict_description3_t *new_conflict;
+  svn_wc_conflict_description2_t *new_conflict;
 
   if (!is_valid_conflict_skel(skel))
     return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
@@ -266,7 +266,7 @@ svn_wc__deserialize_conflict(const svn_w
   SVN_ERR(read_node_version_info(&src_right_version, skel->next,
                                  result_pool, scratch_pool));
 
-  new_conflict = svn_wc_conflict_description_create_tree3(victim_abspath,
+  new_conflict = svn_wc_conflict_description_create_tree2(victim_abspath,
     node_kind, operation, src_left_version, src_right_version,
     result_pool);
   new_conflict->action = action;
@@ -329,7 +329,7 @@ prepend_version_info_skel(svn_skel_t *pa
 
 svn_error_t *
 svn_wc__serialize_conflict(svn_skel_t **skel,
-                           const svn_wc_conflict_description3_t *conflict,
+                           const svn_wc_conflict_description2_t *conflict,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool)
 {
@@ -353,13 +353,13 @@ svn_wc__serialize_conflict(svn_skel_t **
   else
     SVN_ERR(prepend_version_info_skel(c_skel, &null_version, result_pool));
 
-  /* reason */
-  skel_prepend_enum(c_skel, svn_wc__conflict_reason_map, conflict->reason,
-                    result_pool);
-
-  /* action */
-  skel_prepend_enum(c_skel, svn_wc__conflict_action_map, conflict->action,
-                    result_pool);
+  /* local change */
+  skel_prepend_enum(c_skel, svn_wc__conflict_reason_map,
+                    conflict->reason, result_pool);
+
+  /* incoming change */
+  skel_prepend_enum(c_skel, svn_wc__conflict_action_map,
+                    conflict->action, result_pool);
 
   /* operation */
   skel_prepend_enum(c_skel, svn_wc__operation_map, conflict->operation,
@@ -367,8 +367,10 @@ svn_wc__serialize_conflict(svn_skel_t **
 
   /* node_kind */
   SVN_ERR_ASSERT(conflict->node_kind == svn_node_dir
-                 || conflict->node_kind == svn_node_file);
-  skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind, result_pool);
+                 || conflict->node_kind == svn_node_file
+                 || conflict->node_kind == svn_node_none);
+  skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind,
+                    result_pool);
 
   /* Victim path (escaping separator chars). */
   victim_basename = svn_dirent_basename(conflict->local_abspath, result_pool);
@@ -401,7 +403,7 @@ svn_wc__del_tree_conflict(svn_wc_context
 
 svn_error_t *
 svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
-                          const svn_wc_conflict_description3_t *conflict,
+                          const svn_wc_conflict_description2_t *conflict,
                           apr_pool_t *scratch_pool)
 {
   svn_boolean_t existing_conflict;
@@ -409,10 +411,9 @@ svn_wc__add_tree_conflict(svn_wc_context
   svn_error_t *err;
 
   SVN_ERR_ASSERT(conflict != NULL);
-  SVN_ERR_ASSERT(conflict->operation == svn_wc_operation_merge
-                 || (conflict->reason != svn_wc_conflict_reason_moved_away
-                     && conflict->reason != svn_wc_conflict_reason_moved_here)
-                );
+  SVN_ERR_ASSERT(conflict->operation == svn_wc_operation_merge ||
+                 (conflict->reason != svn_wc_conflict_reason_moved_away &&
+                  conflict->reason != svn_wc_conflict_reason_moved_here));
 
   /* Re-adding an existing tree conflict victim is an error. */
   err = svn_wc__internal_conflicted_p(NULL, NULL, &existing_conflict,
@@ -473,7 +474,7 @@ svn_wc__add_tree_conflict(svn_wc_context
 
 
 svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
                           svn_wc_context_t *wc_ctx,
                           const char *local_abspath,
                           apr_pool_t *result_pool,
@@ -495,13 +496,13 @@ svn_wc__get_tree_conflict(const svn_wc_c
 
   for (i = 0; i < conflicts->nelts; i++)
     {
-      const svn_wc_conflict_description3_t *desc;
+      const svn_wc_conflict_description2_t *desc;
 
-      desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
+      desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
 
       if (desc->kind == svn_wc_conflict_kind_tree)
         {
-          *tree_conflict = svn_wc__conflict_description3_dup(desc, result_pool);
+          *tree_conflict = svn_wc_conflict_description2_dup(desc, result_pool);
           return SVN_NO_ERROR;
         }
     }

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.h?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/tree_conflicts.h Wed Aug 20 15:31:32 2014
@@ -62,18 +62,18 @@ extern "C" {
 
 svn_error_t *
 svn_wc__serialize_conflict(svn_skel_t **skel,
-                           const svn_wc_conflict_description3_t *conflict,
+                           const svn_wc_conflict_description2_t *conflict,
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
 
-/* Parse a newly allocated svn_wc_conflict_description3_t object from the
+/* Parse a newly allocated svn_wc_conflict_description2_t object from the
  * provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL.
  * DIR_PATH is the path to the WC directory whose conflicts are being read.
  * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
                              const svn_skel_t *skel,
                              const char *dir_path,
                              apr_pool_t *result_pool,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/update_editor.c Wed Aug 20 15:31:32 2014
@@ -832,6 +832,8 @@ complete_conflict(svn_skel_t *conflict,
   svn_wc_conflict_version_t *target_version;
   svn_boolean_t is_complete;
 
+  SVN_ERR_ASSERT(new_repos_relpath);
+
   if (!conflict)
     return SVN_NO_ERROR; /* Not conflicted */
 
@@ -850,15 +852,12 @@ complete_conflict(svn_skel_t *conflict,
   else
     original_version = NULL;
 
-  if (new_repos_relpath)
-    target_version = svn_wc_conflict_version_create2(eb->repos_root,
-                                                        eb->repos_uuid,
-                                                        new_repos_relpath,
-                                                        *eb->target_revision,
-                                                        target_kind,
-                                                        result_pool);
-  else
-    target_version = NULL;
+  target_version = svn_wc_conflict_version_create2(eb->repos_root,
+                                                   eb->repos_uuid,
+                                                   new_repos_relpath,
+                                                   *eb->target_revision,
+                                                   target_kind,
+                                                   result_pool);
 
   if (eb->switch_repos_relpath)
     SVN_ERR(svn_wc__conflict_skel_set_op_switch(conflict,
@@ -1697,6 +1696,7 @@ delete_entry(const char *path,
   const char *base = svn_relpath_basename(path, NULL);
   const char *local_abspath;
   const char *repos_relpath;
+  const char *deleted_repos_relpath;
   svn_node_kind_t kind;
   svn_revnum_t old_revision;
   svn_boolean_t conflicted;
@@ -1881,8 +1881,14 @@ delete_entry(const char *path,
         SVN_ERR_MALFUNCTION();  /* other reasons are not expected here */
     }
 
+  /* Calculate the repository-relative path of the entry which was
+   * deleted. For updates it's the same as REPOS_RELPATH but for
+   * switches it is within the switch target. */
+  SVN_ERR(calculate_repos_relpath(&deleted_repos_relpath, local_abspath,
+                                  repos_relpath, eb, pb, scratch_pool,
+                                  scratch_pool));
   SVN_ERR(complete_conflict(tree_conflict, eb, local_abspath, repos_relpath,
-                            old_revision, NULL,
+                            old_revision, deleted_repos_relpath,
                             (kind == svn_node_dir)
                                 ? svn_node_dir
                                 : svn_node_file,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/upgrade.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/upgrade.c Wed Aug 20 15:31:32 2014
@@ -654,8 +654,8 @@ ensure_repos_info(svn_wc_entry_t *entry,
 
 /*
  * Read tree conflict descriptions from @a conflict_data.  Set @a *conflicts
- * to a hash of pointers to svn_wc_conflict_description3_t objects indexed by
- * svn_wc_conflict_description3_t.local_abspath, all newly allocated in @a
+ * to a hash of pointers to svn_wc_conflict_description2_t objects indexed by
+ * svn_wc_conflict_description2_t.local_abspath, all newly allocated in @a
  * pool.  @a dir_path is the path to the working copy directory whose conflicts
  * are being read.  The conflicts read are the tree conflicts on the immediate
  * child nodes of @a dir_path.  Do all allocations in @a pool.
@@ -692,7 +692,7 @@ read_tree_conflicts(apr_hash_t **conflic
   iterpool = svn_pool_create(pool);
   for (skel = skel->children; skel != NULL; skel = skel->next)
     {
-      const svn_wc_conflict_description3_t *conflict;
+      const svn_wc_conflict_description2_t *conflict;
 
       svn_pool_clear(iterpool);
       SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path,
@@ -727,7 +727,7 @@ migrate_single_tree_conflict_data(svn_sq
        hi;
        hi = apr_hash_next(hi))
     {
-      const svn_wc_conflict_description3_t *conflict = apr_hash_this_val(hi);
+      const svn_wc_conflict_description2_t *conflict = apr_hash_this_val(hi);
       const char *conflict_relpath;
       const char *conflict_data;
       svn_sqlite__stmt_t *stmt;
@@ -1431,7 +1431,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s
   if (tree_conflict_data)
     {
       svn_skel_t *tc_skel;
-      const svn_wc_conflict_description3_t *tc;
+      const svn_wc_conflict_description2_t *tc;
       const char *local_abspath;
 
       if (!conflict_data)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/util.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/util.c Wed Aug 20 15:31:32 2014
@@ -188,11 +188,11 @@ svn_wc_match_ignore_list(const char *str
   return svn_cstring_match_glob_list(str, list);
 }
 
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_text3(const char *local_abspath,
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_text2(const char *local_abspath,
                                          apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description3_t *conflict;
+  svn_wc_conflict_description2_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -205,13 +205,13 @@ svn_wc_conflict_description_create_text3
   return conflict;
 }
 
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_prop3(const char *local_abspath,
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_prop2(const char *local_abspath,
                                          svn_node_kind_t node_kind,
                                          const char *property_name,
                                          apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description3_t *conflict;
+  svn_wc_conflict_description2_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -223,8 +223,8 @@ svn_wc_conflict_description_create_prop3
   return conflict;
 }
 
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_tree3(
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_tree2(
   const char *local_abspath,
   svn_node_kind_t node_kind,
   svn_wc_operation_t operation,
@@ -232,7 +232,7 @@ svn_wc_conflict_description_create_tree3
   const svn_wc_conflict_version_t *src_right_version,
   apr_pool_t *result_pool)
 {
-  svn_wc_conflict_description3_t *conflict;
+  svn_wc_conflict_description2_t *conflict;
 
   SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
 
@@ -248,12 +248,37 @@ svn_wc_conflict_description_create_tree3
   return conflict;
 }
 
+svn_wc_conflict_version_t *
+svn_wc_conflict_version_create2(const char *repos_url,
+                                const char *repos_uuid,
+                                const char *repos_relpath,
+                                svn_revnum_t revision,
+                                svn_node_kind_t kind,
+                                apr_pool_t *result_pool)
+{
+  svn_wc_conflict_version_t *version;
+
+  version = apr_pcalloc(result_pool, sizeof(*version));
+
+    SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_canonical(repos_url, result_pool)
+                             && svn_relpath_is_canonical(repos_relpath)
+                             && SVN_IS_VALID_REVNUM(revision)
+                             /* ### repos_uuid can be NULL :( */);
+
+  version->repos_url = repos_url;
+  version->peg_rev = revision;
+  version->path_in_repos = repos_relpath;
+  version->node_kind = kind;
+  version->repos_uuid = repos_uuid;
 
-svn_wc_conflict_description3_t *
-svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t *conflict,
+  return version;
+}
+
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description2_dup(const svn_wc_conflict_description2_t *conflict,
                                   apr_pool_t *pool)
 {
-  svn_wc_conflict_description3_t *new_conflict;
+  svn_wc_conflict_description2_t *new_conflict;
 
   new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
 
@@ -272,8 +297,8 @@ svn_wc__conflict_description3_dup(const 
     new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
   if (conflict->my_abspath)
     new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
-  if (conflict->merged_abspath)
-    new_conflict->merged_abspath = apr_pstrdup(pool, conflict->merged_abspath);
+  if (conflict->merged_file)
+    new_conflict->merged_file = apr_pstrdup(pool, conflict->merged_file);
   if (conflict->src_left_version)
     new_conflict->src_left_version =
       svn_wc_conflict_version_dup(conflict->src_left_version, pool);
@@ -281,36 +306,27 @@ svn_wc__conflict_description3_dup(const 
     new_conflict->src_right_version =
       svn_wc_conflict_version_dup(conflict->src_right_version, pool);
 
-  return new_conflict;
-}
-
-svn_wc_conflict_version_t *
-svn_wc_conflict_version_create2(const char *repos_url,
-                                const char *repos_uuid,
-                                const char *repos_relpath,
-                                svn_revnum_t revision,
-                                svn_node_kind_t kind,
-                                apr_pool_t *result_pool)
-{
-  svn_wc_conflict_version_t *version;
-
-  version = apr_pcalloc(result_pool, sizeof(*version));
-
-    SVN_ERR_ASSERT_NO_RETURN(svn_uri_is_canonical(repos_url, result_pool)
-                             && svn_relpath_is_canonical(repos_relpath)
-                             && SVN_IS_VALID_REVNUM(revision)
-                             /* ### repos_uuid can be NULL :( */);
-
-  version->repos_url = repos_url;
-  version->peg_rev = revision;
-  version->path_in_repos = repos_relpath;
-  version->node_kind = kind;
-  version->repos_uuid = repos_uuid;
+  /* ### For property conflicts, cd2 stores prop_reject_abspath in
+   * ### their_abspath, and stores theirs_abspath in merged_file. */
+  if (conflict->prop_reject_abspath)
+    new_conflict->prop_reject_abspath = new_conflict->their_abspath;
+
+  if (conflict->prop_value_base)
+    new_conflict->prop_value_base =
+      svn_string_dup(conflict->prop_value_base, pool);
+  if (conflict->prop_value_working)
+    new_conflict->prop_value_working =
+      svn_string_dup(conflict->prop_value_working, pool);
+  if (conflict->prop_value_incoming_old)
+    new_conflict->prop_value_incoming_old =
+      svn_string_dup(conflict->prop_value_incoming_old, pool);
+  if (conflict->prop_value_incoming_new)
+    new_conflict->prop_value_incoming_new =
+      svn_string_dup(conflict->prop_value_incoming_new, pool);
 
-  return version;
+  return new_conflict;
 }
 
-
 svn_wc_conflict_version_t *
 svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version,
                             apr_pool_t *result_pool)
@@ -339,91 +355,6 @@ svn_wc_conflict_version_dup(const svn_wc
   return new_version;
 }
 
-apr_array_header_t *
-svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
-                               apr_pool_t *result_pool)
-{
-  apr_array_header_t *new_conflicts;
-  int i;
-
-  new_conflicts = apr_array_make(result_pool, conflicts->nelts,
-                                 sizeof (svn_wc_conflict_description2_t *));
-
-  for (i = 0; i < conflicts->nelts; i++)
-    {
-      svn_wc_conflict_description3_t *cd;
-      svn_wc_conflict_description2_t *cd2;
-      
-      cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
-      cd2 = svn_wc__cd3_to_cd2(cd, result_pool);
-      APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *) = cd2;
-    }
-
-  return new_conflicts;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
-                   apr_pool_t *result_pool)
-{
-  svn_wc_conflict_description2_t *new_conflict;
-
-  if (conflict == NULL)
-    return NULL;
-
-  new_conflict = apr_pcalloc(result_pool, sizeof(*new_conflict));
-
-  if (conflict->local_abspath)
-    new_conflict->local_abspath = apr_pstrdup(result_pool,
-                                              conflict->local_abspath);
-  new_conflict->node_kind = conflict->node_kind;
-  new_conflict->kind = conflict->kind;
-  if (conflict->property_name)
-    new_conflict->property_name = apr_pstrdup(result_pool,
-                                              conflict->property_name);
-  new_conflict->is_binary = conflict->is_binary;
-  if (conflict->mime_type)
-    new_conflict->mime_type = apr_pstrdup(result_pool, conflict->mime_type);
-  new_conflict->action = conflict->action;
-  new_conflict->reason = conflict->reason;
-  if (conflict->base_abspath)
-    new_conflict->base_abspath = apr_pstrdup(result_pool,
-                                             conflict->base_abspath);
-
-  if (conflict->kind == svn_wc_conflict_kind_property)
-    {
-      /* For property conflicts, cd2 stored prop_reject_abspath in
-       * their_abspath, and stored theirs_abspath in merged_file. */
-      if (conflict->prop_reject_abspath)
-        new_conflict->their_abspath = apr_pstrdup(result_pool,
-                                                  conflict->prop_reject_abspath);
-      if (conflict->their_abspath)
-        new_conflict->merged_file = apr_pstrdup(result_pool,
-                                                conflict->their_abspath);
-    }
-  else
-    {
-      if (conflict->their_abspath)
-        new_conflict->their_abspath = apr_pstrdup(result_pool,
-                                                  conflict->their_abspath);
-
-      if (conflict->merged_abspath)
-        new_conflict->merged_file = apr_pstrdup(result_pool,
-                                                conflict->merged_abspath);
-    }
-  if (conflict->my_abspath)
-    new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath);
-  new_conflict->operation = conflict->operation;
-  if (conflict->src_left_version)
-    new_conflict->src_left_version =
-      svn_wc_conflict_version_dup(conflict->src_left_version, result_pool);
-  if (conflict->src_right_version)
-    new_conflict->src_right_version =
-      svn_wc_conflict_version_dup(conflict->src_right_version, result_pool);
-
-  return new_conflict;
-}
-
 svn_wc_conflict_description_t *
 svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict,
                   apr_pool_t *result_pool)

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/wc.h Wed Aug 20 15:31:32 2014
@@ -676,7 +676,7 @@ svn_wc__write_check(svn_wc__db_t *db,
                     const char *local_abspath,
                     apr_pool_t *scratch_pool);
 
-/* Read into CONFLICTS svn_wc_conflict_description3_t* structs
+/* Read into CONFLICTS svn_wc_conflict_description2_t* structs
  * for all conflicts that have LOCAL_ABSPATH as victim.
  *
  * Victim must be versioned or be part of a tree conflict.

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.c Wed Aug 20 15:31:32 2014
@@ -1086,6 +1086,70 @@ svn_wc__wq_build_sync_file_flags(svn_ske
 
 /* OP_PREJ_INSTALL  */
 
+/* Helper for run_prej_install.  Originally in conflict.c */
+static svn_skel_t *
+prop_conflict_skel_new(apr_pool_t *result_pool)
+{
+  svn_skel_t *operation = svn_skel__make_empty_list(result_pool);
+  svn_skel_t *result = svn_skel__make_empty_list(result_pool);
+
+  svn_skel__prepend(operation, result);
+  return result;
+}
+
+/* Helper for prop_conflict_skel_add.  Originally in conflict.c */
+static void
+prepend_prop_value(const svn_string_t *value,
+                   svn_skel_t *skel,
+                   apr_pool_t *result_pool)
+{
+  svn_skel_t *value_skel = svn_skel__make_empty_list(result_pool);
+
+  if (value != NULL)
+    {
+      const void *dup = apr_pmemdup(result_pool, value->data, value->len);
+
+      svn_skel__prepend(svn_skel__mem_atom(dup, value->len, result_pool),
+                        value_skel);
+    }
+
+  svn_skel__prepend(value_skel, skel);
+}
+
+
+/* Helper for run_prej_install.  Originally in conflict.c */
+static svn_error_t *
+prop_conflict_skel_add(
+  svn_skel_t *skel,
+  const char *prop_name,
+  const svn_string_t *original_value,
+  const svn_string_t *mine_value,
+  const svn_string_t *incoming_value,
+  const svn_string_t *incoming_base_value,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool)
+{
+  svn_skel_t *prop_skel = svn_skel__make_empty_list(result_pool);
+
+  /* ### check that OPERATION has been filled in.  */
+
+  /* See notes/wc-ng/conflict-storage  */
+  prepend_prop_value(incoming_base_value, prop_skel, result_pool);
+  prepend_prop_value(incoming_value, prop_skel, result_pool);
+  prepend_prop_value(mine_value, prop_skel, result_pool);
+  prepend_prop_value(original_value, prop_skel, result_pool);
+  svn_skel__prepend_str(apr_pstrdup(result_pool, prop_name), prop_skel,
+                        result_pool);
+  svn_skel__prepend_str(SVN_WC__CONFLICT_KIND_PROP, prop_skel, result_pool);
+
+  /* Now we append PROP_SKEL to the end of the provided conflict SKEL.  */
+  svn_skel__append(skel, prop_skel);
+
+  return SVN_NO_ERROR;
+}
+
+
+
 static svn_error_t *
 run_prej_install(work_item_baton_t *wqb,
                  svn_wc__db_t *db,
@@ -1116,14 +1180,70 @@ run_prej_install(work_item_baton_t *wqb,
                                               scratch_pool, scratch_pool));
 
   if (arg1->next != NULL)
-    prop_conflict_skel = arg1->next;
+    prop_conflict_skel = arg1->next; /* Before Subversion 1.9 */
   else
-    SVN_ERR_MALFUNCTION();  /* ### wc_db can't provide it ... yet.  */
+    {
+      svn_wc_operation_t operation;
+      apr_hash_index_t *hi;
+      apr_hash_t *old_props;
+      apr_hash_t *mine_props;
+      apr_hash_t *their_original_props;
+      apr_hash_t *their_props;
+      apr_hash_t *conflicted_props;
+
+      SVN_ERR(svn_wc__conflict_read_info(&operation, NULL, NULL, NULL, NULL,
+                                         db, local_abspath,
+                                         conflicts,
+                                         scratch_pool, scratch_pool));
+
+      /* Create the data in the skel in the same format used as 1.7 */
+      SVN_ERR(svn_wc__conflict_read_prop_conflict(NULL,
+                                                  &mine_props,
+                                                  &their_original_props,
+                                                  &their_props,
+                                                  &conflicted_props,
+                                                  db, local_abspath,
+                                                  conflicts,
+                                                  scratch_pool,
+                                                  scratch_pool));
+
+      if (operation == svn_wc_operation_merge)
+        SVN_ERR(svn_wc__db_read_pristine_props(&old_props, db, local_abspath,
+                                                scratch_pool, scratch_pool));
+      else
+        old_props = their_original_props;
+
+      prop_conflict_skel = prop_conflict_skel_new(scratch_pool);
+
+      for (hi = apr_hash_first(scratch_pool, conflicted_props);
+           hi;
+           hi = apr_hash_next(hi))
+        {
+          const char *propname = apr_hash_this_key(hi);
+
+          SVN_ERR(prop_conflict_skel_add(
+                          prop_conflict_skel, propname,
+                          old_props
+                                  ? svn_hash_gets(old_props, propname)
+                                  : NULL,
+                          mine_props
+                                  ? svn_hash_gets(mine_props, propname)
+                                  : NULL,
+                          their_props
+                                  ? svn_hash_gets(their_props, propname)
+                                    : NULL,
+                          their_original_props
+                                  ? svn_hash_gets(their_original_props, propname)
+                                    : NULL,
+                          scratch_pool, scratch_pool));
+        }
+    }
 
   /* Construct a property reject file in the temporary area.  */
   SVN_ERR(svn_wc__create_prejfile(&tmp_prejfile_abspath,
                                   db, local_abspath,
                                   prop_conflict_skel,
+                                  cancel_func, cancel_baton,
                                   scratch_pool, scratch_pool));
 
   /* ... and atomically move it into place.  */
@@ -1139,21 +1259,21 @@ svn_error_t *
 svn_wc__wq_build_prej_install(svn_skel_t **work_item,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              svn_skel_t *conflict_skel,
+                              /*svn_skel_t *conflict_skel,*/
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool)
 {
   const char *local_relpath;
   *work_item = svn_skel__make_empty_list(result_pool);
 
-  /* ### gotta have this, today  */
-  SVN_ERR_ASSERT(conflict_skel != NULL);
-
   SVN_ERR(svn_wc__db_to_relpath(&local_relpath, db, local_abspath,
                                 local_abspath, result_pool, scratch_pool));
 
-  if (conflict_skel != NULL)
-    svn_skel__prepend(conflict_skel, *work_item);
+  /* ### In Subversion 1.7 and 1.8 we created a legacy property conflict skel
+         here:
+    if (conflict_skel != NULL)
+      svn_skel__prepend(conflict_skel, *work_item);
+   */
   svn_skel__prepend_str(local_relpath, *work_item, result_pool);
   svn_skel__prepend_str(OP_PREJ_INSTALL, *work_item, result_pool);
 
@@ -1489,8 +1609,11 @@ svn_wc__wq_run(svn_wc__db_t *db,
   {
     static int count = 0;
     const char *count_env_var = getenv("SVN_DEBUG_WORK_QUEUE");
+    int count_env_val;
+
+    SVN_ERR(svn_cstring_atoi(&count_env_val, count_env_var));
 
-    if (count_env_var && ++count == atoi(count_env_var))
+    if (count_env_var && ++count == count_env_val)
       return svn_error_create(SVN_ERR_CANCELLED, NULL, "fake cancel");
   }
 #endif

Modified: subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.h?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_wc/workqueue.h Wed Aug 20 15:31:32 2014
@@ -181,22 +181,12 @@ svn_wc__wq_build_sync_file_flags(svn_ske
 
 
 /* Set *WORK_ITEM to a new work item that will install a property reject
-   file for LOCAL_ABSPATH into the working copy. The property conflicts will
-   be taken from CONFLICT_SKEL.
-
-   ### Caution: Links CONFLICT_SKEL into the *WORK_ITEM, which involves
-       modifying *CONFLICT_SKEL.
-
-   ### TODO: Make CONFLICT_SKEL 'const' and dup it into RESULT_POOL.
-
-   ### TODO: If CONFLICT_SKEL is NULL, take property conflicts from wc_db
-       for the given DB/LOCAL_ABSPATH.
+   file for LOCAL_ABSPATH into the working copy.
  */
 svn_error_t *
 svn_wc__wq_build_prej_install(svn_skel_t **work_item,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              svn_skel_t *conflict_skel,
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 

Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/util.c Wed Aug 20 15:31:32 2014
@@ -177,10 +177,10 @@ get_last_history_rev(svn_revnum_t *revis
   const char *ignored;
 
   /* Get an initial HISTORY baton. */
-  SVN_ERR(svn_fs_node_history(&history, root, path, pool));
+  SVN_ERR(svn_fs_node_history2(&history, root, path, pool, pool));
 
   /* Now get the first *real* point of interesting history. */
-  SVN_ERR(svn_fs_history_prev(&history, history, FALSE, pool));
+  SVN_ERR(svn_fs_history_prev2(&history, history, FALSE, pool, pool));
 
   /* Fetch the location information for this history step. */
   return svn_fs_history_location(&ignored, revision, history, pool);

Modified: subversion/branches/move-tracking-2/subversion/po/es.po
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/po/es.po?rev=1619127&r1=1619126&r2=1619127&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/po/es.po [UTF-8] (original)
+++ subversion/branches/move-tracking-2/subversion/po/es.po [UTF-8] Wed Aug 20 15:31:32 2014
@@ -53,7 +53,7 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: subversion 1.7\n"
+"Project-Id-Version: subversion 1.9\n"
 "Report-Msgid-Bugs-To: dev@subversion.apache.org\n"
 "POT-Creation-Date: 2010-11-12 08:49-0600\n"
 "PO-Revision-Date: 2009-02-19 14:22-0200\n"