Author: stsp
Date: Tue Jul  2 11:42:43 2013
New Revision: 1498888

URL: http://svn.apache.org/r1498888
Log:
Update svn_wc__get_tree_conflict() to svn_wc_conflict_description3_t.

No functional change yet, since tree conflicts are currently described in the
same way by svn_wc_conflict_description3_t and svn_wc_conflict_description2_t.

* subversion/include/private/svn_wc_private.h
  (svn_wc__get_tree_conflict): Update declaration.

* subversion/libsvn_wc/deprecated.c
  (svn_wc__status2_from_3): Update caller.

* subversion/libsvn_wc/tree_conflicts.c
  (svn_wc__get_tree_conflict): Return svn_wc_conflict_description3_t.

* subversion/svn/status.c
  (print_status): Update caller.

* subversion/tests/libsvn_wc/conflict-data-test.c
  (compare_conflict): Use svn_wc_conflict_description3_t for actual and
   expected conflict data.
  (tree_conflict_create): Return svn_wc_conflict_description3_t.
  (test_read_write_tree_conflicts): Use svn_wc_conflict_description3_t.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
    subversion/trunk/subversion/svn/status.c
    subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1498888&r1=1498887&r2=1498888&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Tue Jul  2 
11:42:43 2013
@@ -293,7 +293,7 @@ svn_wc__close_db(const char *external_ab
  * use @a scratch_pool for temporary allocations.
  */
 svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
                           svn_wc_context_t *wc_ctx,
                           const char *victim_abspath,
                           apr_pool_t *result_pool,

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1498888&r1=1498887&r2=1498888&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Jul  2 11:42:43 2013
@@ -2678,10 +2678,12 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
   if (old_status->conflicted)
     {
-      const svn_wc_conflict_description2_t *tree_conflict;
+      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,
                                         scratch_pool, scratch_pool));
-      (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict, result_pool);
+      tree_conflict2 = svn_wc__cd3_to_cd2(tree_conflict2, scratch_pool);
+      (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict2, 
result_pool);
     }
 
   (*status)->switched = old_status->switched;

Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.c?rev=1498888&r1=1498887&r2=1498888&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.c Tue Jul  2 11:42:43 
2013
@@ -473,7 +473,7 @@ svn_wc__add_tree_conflict(svn_wc_context
 
 
 svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
                           svn_wc_context_t *wc_ctx,
                           const char *local_abspath,
                           apr_pool_t *result_pool,
@@ -501,7 +501,7 @@ svn_wc__get_tree_conflict(const svn_wc_c
 
       if (desc->kind == svn_wc_conflict_kind_tree)
         {
-          *tree_conflict = svn_wc__cd3_to_cd2(desc, result_pool);
+          *tree_conflict = svn_wc__conflict_description3_dup(desc, 
result_pool);
           return SVN_NO_ERROR;
         }
     }

Modified: subversion/trunk/subversion/svn/status.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1498888&r1=1498887&r2=1498888&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Tue Jul  2 11:42:43 2013
@@ -269,14 +269,15 @@ print_status(const char *cwd_abspath, co
 
       if (tree_conflicted)
         {
-          const svn_wc_conflict_description2_t *tree_conflict;
+          const svn_wc_conflict_description3_t *tree_conflict;
           SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx,
                                             local_abspath, pool, pool));
           SVN_ERR_ASSERT(tree_conflict != NULL);
 
           tree_status_code = 'C';
           SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
-                            &desc, tree_conflict, pool));
+                            &desc, svn_wc__cd3_to_cd2(tree_conflict, pool),
+                            pool));
           tree_desc_line = apr_psprintf(pool, "\n      >   %s", desc);
           (*tree_conflicts)++;
         }

Modified: subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1498888&r1=1498887&r2=1498888&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c Tue Jul  2 
11:42:43 2013
@@ -88,8 +88,8 @@ compare_version(const svn_wc_conflict_ve
  * (including names of temporary files), or are both NULL.  Return an
  * error if not. */
 static svn_error_t *
-compare_conflict(const svn_wc_conflict_description2_t *actual,
-                 const svn_wc_conflict_description2_t *expected)
+compare_conflict(const svn_wc_conflict_description3_t *actual,
+                 const svn_wc_conflict_description3_t *expected)
 {
   if (actual == NULL && expected == NULL)
     return SVN_NO_ERROR;
@@ -181,7 +181,7 @@ compare_prop_conflict(const svn_wc_confl
 }
 
 /* Create and return a tree conflict description */
-static svn_wc_conflict_description2_t *
+static svn_wc_conflict_description3_t *
 tree_conflict_create(const char *local_abspath,
                      svn_node_kind_t node_kind,
                      svn_wc_operation_t operation,
@@ -198,14 +198,14 @@ tree_conflict_create(const char *local_a
                      apr_pool_t *result_pool)
 {
   svn_wc_conflict_version_t *left, *right;
-  svn_wc_conflict_description2_t *conflict;
+  svn_wc_conflict_description3_t *conflict;
 
   left = svn_wc_conflict_version_create2(left_repo, NULL, left_path,
                                          left_revnum, left_kind, result_pool);
   right = svn_wc_conflict_version_create2(right_repo, NULL, right_path,
                                           right_revnum, right_kind,
                                           result_pool);
-  conflict = svn_wc_conflict_description_create_tree2(
+  conflict = svn_wc_conflict_description_create_tree3(
                     local_abspath, node_kind, operation,
                     left, right, result_pool);
   conflict->action = action;
@@ -285,7 +285,7 @@ test_read_write_tree_conflicts(const svn
 
   const char *parent_abspath;
   const char *child1_abspath, *child2_abspath;
-  svn_wc_conflict_description2_t *conflict1, *conflict2;
+  svn_wc_conflict_description3_t *conflict1, *conflict2;
 
   SVN_ERR(svn_test__sandbox_create(&sbox, "read_write_tree_conflicts", opts, 
pool));
   parent_abspath = svn_dirent_join(sbox.wc_abspath, "A", pool);
@@ -316,9 +316,11 @@ test_read_write_tree_conflicts(const svn
 
   /* Write */
   SVN_ERR(svn_wc__add_tree_conflict(sbox.wc_ctx, /*child1_abspath,*/
-                                    conflict1, pool));
+                                    svn_wc__cd3_to_cd2(conflict1, pool),
+                                    pool));
   SVN_ERR(svn_wc__add_tree_conflict(sbox.wc_ctx, /*child2_abspath,*/
-                                    conflict2, pool));
+                                    svn_wc__cd3_to_cd2(conflict2, pool),
+                                    pool));
 
   /* Query (conflict1 through WC-DB API, conflict2 through WC API) */
   {
@@ -337,7 +339,7 @@ test_read_write_tree_conflicts(const svn
 
   /* Read conflicts back */
   {
-    const svn_wc_conflict_description2_t *read_conflict;
+    const svn_wc_conflict_description3_t *read_conflict;
 
     SVN_ERR(svn_wc__get_tree_conflict(&read_conflict, sbox.wc_ctx,
                                       child1_abspath, pool, pool));


Reply via email to