Author: rhuijben
Date: Wed Aug 20 15:49:26 2014
New Revision: 1619130

URL: http://svn.apache.org/r1619130
Log:
Following up on r1619121 and r1619129, stop creating legacy property conflict
marker skels in the workqueue, by using the new direct DB option of the marker
write code added in r1619129.

* subversion/libsvn_wc/workqueue.c
  (prop_conflict_skel_new,
   prepend_prop_value,
   prop_conflict_skel_add): Remove function.
  (run_prej_install): Just pass a NULL property marker skel to
    svn_wc__create_prejfile instead of creating a legacy skel here.

Modified:
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=1619130&r1=1619129&r2=1619130&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Wed Aug 20 15:49:26 2014
@@ -1086,70 +1086,6 @@ 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,
@@ -1182,62 +1118,7 @@ run_prej_install(work_item_baton_t *wqb,
   if (arg1->next != NULL)
     prop_conflict_skel = arg1->next; /* Before Subversion 1.9 */
   else
-    {
-      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));
-        }
-    }
+    prop_conflict_skel = NULL; /* Read from DB */
 
   /* Construct a property reject file in the temporary area.  */
   SVN_ERR(svn_wc__create_prejfile(&tmp_prejfile_abspath,


Reply via email to