You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/22 00:21:22 UTC

svn commit: r1095834 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_wc/node.c svn/status.c

Author: rhuijben
Date: Thu Apr 21 22:21:22 2011
New Revision: 1095834

URL: http://svn.apache.org/viewvc?rev=1095834&view=rev
Log:
Remove a node api for information that is available via a public api.

* subversion/include/private/svn_wc_private.h
  (svn_wc__node_check_conflicts): Remove function.

* subversion/libsvn_wc/node.c
  (svn_wc__node_check_conflicts): Remove function.

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

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/svn/status.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=1095834&r1=1095833&r2=1095834&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Thu Apr 21 22:21:22 2011
@@ -607,25 +607,6 @@ svn_wc__node_is_file_external(svn_boolea
                               apr_pool_t *scratch_pool);
 
 /**
- * Check what kinds of conflicts we have on @a local_abspath.
- *
- * We could have returned the conflicts at once if it wasn't for the fact
- * that there can be multiple prop conflicts.
- *
- * One or two of @a prop_conflicted, @a text_conflicted and @a
- * tree_conflicted can be NULL if we're not interested in that particular
- * value.
- */
-svn_error_t *
-svn_wc__node_check_conflicts(svn_boolean_t *prop_conflicted,
-                             svn_boolean_t *text_conflicted,
-                             svn_boolean_t *tree_conflicted,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool);
-
-/**
  * A hack to remove the last entry from libsvn_client.  This simply fetches an
  * some values from WC-NG, and puts the needed bits into the output parameters,
  * allocated in @a result_pool.

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1095834&r1=1095833&r2=1095834&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Thu Apr 21 22:21:22 2011
@@ -1123,42 +1123,6 @@ svn_wc__node_is_file_external(svn_boolea
 }
 
 svn_error_t *
-svn_wc__node_check_conflicts(svn_boolean_t *prop_conflicted,
-                             svn_boolean_t *text_conflicted,
-                             svn_boolean_t *tree_conflicted,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool)
-{
-  const apr_array_header_t *conflicts;
-  int i;
-
-  if (prop_conflicted)
-    *prop_conflicted = FALSE;
-  if (text_conflicted)
-    *text_conflicted = FALSE;
-  if (tree_conflicted)
-    *tree_conflicted = FALSE;
-
-  SVN_ERR(svn_wc__db_read_conflicts(&conflicts, wc_ctx->db, local_abspath,
-                                    result_pool, scratch_pool));
-
-  for (i = 0; i < conflicts->nelts; i++)
-    {
-      const svn_wc_conflict_description2_t *cd;
-      cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
-      if (prop_conflicted && cd->kind == svn_wc_conflict_kind_property)
-        *prop_conflicted = TRUE;
-      else if (text_conflicted && cd->kind == svn_wc_conflict_kind_text)
-        *text_conflicted = TRUE;
-      else if (tree_conflicted && cd->kind == svn_wc_conflict_kind_tree)
-        *tree_conflicted = TRUE;
-    }
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
 svn_wc__internal_node_get_schedule(svn_wc_schedule_t *schedule,
                                    svn_boolean_t *copied,
                                    svn_wc__db_t *db,

Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1095834&r1=1095833&r2=1095834&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Thu Apr 21 22:21:22 2011
@@ -153,10 +153,10 @@ print_status(const char *path,
       svn_boolean_t tree_conflicted;
       svn_error_t *err;
 
-      err = svn_wc__node_check_conflicts(&prop_conflicted,
-                                         &text_conflicted,
-                                         &tree_conflicted, ctx->wc_ctx,
-                                         local_abspath, pool, pool);
+      err = svn_wc_conflicted_p3(&prop_conflicted,
+                                 &text_conflicted,
+                                 &tree_conflicted, ctx->wc_ctx,
+                                 local_abspath, pool);
 
       if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
         svn_error_clear(err);
@@ -311,9 +311,8 @@ svn_cl__print_status_xml(const char *pat
     return SVN_NO_ERROR;
 
   if (status->conflicted)
-    SVN_ERR(svn_wc__node_check_conflicts(NULL, NULL, &tree_conflicted,
-                                         ctx->wc_ctx, local_abspath, pool,
-                                         pool));
+    SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
+                                 ctx->wc_ctx, local_abspath, pool));
 
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
                         "path", svn_dirent_local_style(path, pool), NULL);