Author: rhuijben
Date: Sun Feb 22 12:30:30 2015
New Revision: 1661472
URL: http://svn.apache.org/r1661472
Log:
Remove some unused 'temporary' wc code (which lived since 1.7), which provided
information that always needed further filtering.
* subversion/include/private/svn_wc_private.h
(svn_wc__node_get_children): Remove function.
* subversion/libsvn_wc/node.c
(filter_and_make_absolute): Rename to...
(make_absolute): ... this and remove filtering support.
(svn_wc__node_get_children_of_working_node,
svn_wc__node_get_not_present_children): Update caller.
(svn_wc__node_get_children): Remove function.
* subversion/tests/libsvn_wc/op-depth-test.c
(test_children_of_replaced_dir): Directly use wc-db function.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_wc/node.c
subversion/trunk/subversion/tests/libsvn_wc/op-depth-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=1661472&r1=1661471&r2=1661472&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sun Feb 22
12:30:30 2015
@@ -415,22 +415,6 @@ svn_wc__node_get_not_present_children(co
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-
-/**
- * Like svn_wc__node_get_children_of_working_node(), except also include any
- * path that was a child of a deleted directory that existed at
- * @a dir_abspath, even if that directory is now scheduled to be replaced by
- * the working node at @a dir_abspath.
- */
-svn_error_t *
-svn_wc__node_get_children(const apr_array_header_t **children,
- svn_wc_context_t *wc_ctx,
- const char *dir_abspath,
- svn_boolean_t show_hidden,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
/**
* Fetch the repository information for the working version
* of the node at @a local_abspath into @a *revision, @a *repos_relpath,
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1661472&r1=1661471&r2=1661472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Sun Feb 22 12:30:30 2015
@@ -54,18 +54,14 @@
/* Set *CHILDREN_ABSPATHS to a new array of the full paths formed by joining
- * each name in REL_CHILDREN onto DIR_ABSPATH. If SHOW_HIDDEN is false then
- * omit any paths that are reported as 'hidden' by svn_wc__db_node_hidden().
+ * each name in REL_CHILDREN onto DIR_ABSPATH.
*
* Allocate the output array and its elements in RESULT_POOL. */
-static svn_error_t *
-filter_and_make_absolute(const apr_array_header_t **children_abspaths,
- svn_wc_context_t *wc_ctx,
- const char *dir_abspath,
- const apr_array_header_t *rel_children,
- svn_boolean_t show_hidden,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+static void
+make_absolute(const apr_array_header_t **children_abspaths,
+ const char *dir_abspath,
+ const apr_array_header_t *rel_children,
+ apr_pool_t *result_pool)
{
apr_array_header_t *children;
int i;
@@ -74,39 +70,13 @@ filter_and_make_absolute(const apr_array
sizeof(const char *));
for (i = 0; i < rel_children->nelts; i++)
{
- const char *child_abspath = svn_dirent_join(dir_abspath,
- APR_ARRAY_IDX(rel_children,
- i,
- const char *),
- result_pool);
-
- /* Don't add hidden nodes to *CHILDREN if we don't want them. */
- if (!show_hidden)
- {
- svn_wc__db_status_t status;
-
- SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
- wc_ctx->db, child_abspath,
- scratch_pool, scratch_pool));
-
- if (status == svn_wc__db_status_server_excluded
- || status == svn_wc__db_status_not_present
- || status == svn_wc__db_status_excluded)
- {
- continue;
- }
- }
-
- APR_ARRAY_PUSH(children, const char *) = child_abspath;
+ const char *name = APR_ARRAY_IDX(rel_children, i, const char *);
+ APR_ARRAY_PUSH(children, const char *) =
+ svn_dirent_join(dir_abspath, name,
+ result_pool);
}
*children_abspaths = children;
-
- return SVN_NO_ERROR;
}
@@ -117,14 +87,12 @@ svn_wc__node_get_children_of_working_nod
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- const apr_array_header_t *rel_children;
+ const apr_array_header_t *child_names;
- SVN_ERR(svn_wc__db_read_children_of_working_node(&rel_children,
+ SVN_ERR(svn_wc__db_read_children_of_working_node(&child_names,
wc_ctx->db, dir_abspath,
scratch_pool,
scratch_pool));
- SVN_ERR(filter_and_make_absolute(children, wc_ctx, dir_abspath,
- rel_children, TRUE /* no filter! */,
- result_pool, scratch_pool));
+ make_absolute(children, dir_abspath, child_names, result_pool);
return SVN_NO_ERROR;
}
@@ -135,40 +103,18 @@ svn_wc__node_get_not_present_children(co
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- const apr_array_header_t *rel_children;
+ const apr_array_header_t *child_names;
SVN_ERR(svn_wc__db_base_read_not_present_children(
- &rel_children,
+ &child_names,
wc_ctx->db, dir_abspath,
scratch_pool, scratch_pool));
- SVN_ERR(filter_and_make_absolute(children, wc_ctx, dir_abspath,
- rel_children, TRUE /* no filter! */,
- result_pool, scratch_pool));
+ make_absolute(children, dir_abspath, child_names, result_pool);
return SVN_NO_ERROR;
}
-
svn_error_t *
-svn_wc__node_get_children(const apr_array_header_t **children,
- svn_wc_context_t *wc_ctx,
- const char *dir_abspath,
- svn_boolean_t show_hidden,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const apr_array_header_t *rel_children;
-
- SVN_ERR(svn_wc__db_read_children(&rel_children, wc_ctx->db, dir_abspath,
- scratch_pool, scratch_pool));
- SVN_ERR(filter_and_make_absolute(children, wc_ctx, dir_abspath,
- rel_children, show_hidden,
- result_pool, scratch_pool));
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
svn_wc__internal_get_repos_info(svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1661472&r1=1661471&r2=1661472&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Sun Feb 22
12:30:30 2015
@@ -2783,8 +2783,8 @@ test_children_of_replaced_dir(const svn_
&children_array, b.wc_ctx->db, A_abspath, pool, pool));
SVN_ERR(CHECK_ARRAY(children_array, working_children_inc_hidden, pool));
- SVN_ERR(svn_wc__node_get_children(&children_array, b.wc_ctx, A_abspath,
- TRUE /* show_hidden */, pool, pool));
+ SVN_ERR(svn_wc__db_read_children(&children_array, b.wc_ctx->db, A_abspath,
+ pool, pool));
SVN_ERR(CHECK_ARRAY(children_array, all_children_inc_hidden, pool));
/* I am not testing svn_wc__node_get_children(show_hidden=FALSE) because