Author: rhuijben
Date: Wed Feb 20 18:31:19 2013
New Revision: 1448340
URL: http://svn.apache.org/r1448340
Log:
Following up on r1448339, also make the status externals processing
completely part of the status processing.
* subversion/libsvn_client/client.h
(svn_client__do_external_status): Remove prototype.
* subversion/libsvn_client/externals.c
(svn_client__do_external_status): Remove function here...
* subversion/libsvn_client/status.c
(do_external_status): ... that can just be placed here as static.
(svn_client_status5): Update caller.
Modified:
subversion/trunk/subversion/libsvn_client/client.h
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/libsvn_client/status.c
Modified: subversion/trunk/subversion/libsvn_client/client.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1448340&r1=1448339&r2=1448340&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Wed Feb 20 18:31:19 2013
@@ -1034,28 +1034,6 @@ svn_client__export_externals(apr_hash_t
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-
-/* Perform status operations on each external in EXTERNAL_MAP, a const char *
- local_abspath of all externals mapping to the const char* defining_abspath.
- All other options are the same as those passed to svn_client_status().
-
- If ANCHOR_ABSPATH and ANCHOR-RELPATH are not null, use them to provide
- properly formatted relative paths
- */
-svn_error_t *
-svn_client__do_external_status(svn_client_ctx_t *ctx,
- apr_hash_t *external_map,
- svn_depth_t depth,
- svn_boolean_t get_all,
- svn_boolean_t update,
- svn_boolean_t no_ignore,
- const char *anchor_abspath,
- const char *anchor_relpath,
- svn_client_status_func_t status_func,
- void *status_baton,
- apr_pool_t *scratch_pool);
-
-
/* Baton for svn_client__dirent_fetcher */
struct svn_client__dirent_fetcher_baton_t
{
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1448340&r1=1448339&r2=1448340&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Wed Feb 20 18:31:19
2013
@@ -1141,85 +1141,3 @@ svn_client__export_externals(apr_hash_t
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_client__do_external_status(svn_client_ctx_t *ctx,
- apr_hash_t *external_map,
- svn_depth_t depth,
- svn_boolean_t get_all,
- svn_boolean_t update,
- svn_boolean_t no_ignore,
- const char *anchor_abspath,
- const char *anchor_relpath,
- svn_client_status_func_t status_func,
- void *status_baton,
- apr_pool_t *scratch_pool)
-{
- apr_hash_index_t *hi;
- apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-
- /* Loop over the hash of new values (we don't care about the old
- ones). This is a mapping of versioned directories to property
- values. */
- for (hi = apr_hash_first(scratch_pool, external_map);
- hi;
- hi = apr_hash_next(hi))
- {
- svn_node_kind_t external_kind;
- const char *local_abspath = svn__apr_hash_index_key(hi);
- const char *defining_abspath = svn__apr_hash_index_val(hi);
- svn_node_kind_t kind;
- svn_opt_revision_t opt_rev;
- const char *status_path;
-
- svn_pool_clear(iterpool);
-
- /* Obtain information on the expected external. */
- SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
- &opt_rev.value.number,
- ctx->wc_ctx, defining_abspath,
- local_abspath, FALSE,
- iterpool, iterpool));
-
- if (external_kind != svn_node_dir)
- continue;
-
- SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool));
- if (kind != svn_node_dir)
- continue;
-
- if (SVN_IS_VALID_REVNUM(opt_rev.value.number))
- opt_rev.kind = svn_opt_revision_number;
- else
- opt_rev.kind = svn_opt_revision_unspecified;
-
- /* Tell the client we're starting an external status set. */
- if (ctx->notify_func2)
- ctx->notify_func2(
- ctx->notify_baton2,
- svn_wc_create_notify(local_abspath,
- svn_wc_notify_status_external,
- iterpool), iterpool);
-
- status_path = local_abspath;
- if (anchor_abspath)
- {
- status_path = svn_dirent_join(anchor_relpath,
- svn_dirent_skip_ancestor(anchor_abspath,
- status_path),
- iterpool);
- }
-
- /* And then do the status. */
- SVN_ERR(svn_client_status5(NULL, ctx, status_path, &opt_rev, depth,
- get_all, update, no_ignore, FALSE, FALSE,
- NULL, status_func, status_baton,
- iterpool));
- }
-
- /* Destroy SUBPOOL and (implicitly) ITERPOOL. */
- svn_pool_destroy(iterpool);
-
- return SVN_NO_ERROR;
-}
-
Modified: subversion/trunk/subversion/libsvn_client/status.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1448340&r1=1448339&r2=1448340&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Wed Feb 20 18:31:19 2013
@@ -236,6 +236,92 @@ static svn_ra_reporter3_t lock_fetch_rep
reporter_abort_report
};
+/* Perform status operations on each external in EXTERNAL_MAP, a const char *
+ local_abspath of all externals mapping to the const char* defining_abspath.
+ All other options are the same as those passed to svn_client_status().
+
+ If ANCHOR_ABSPATH and ANCHOR-RELPATH are not null, use them to provide
+ properly formatted relative paths */
+static svn_error_t *
+do_external_status(svn_client_ctx_t *ctx,
+ apr_hash_t *external_map,
+ svn_depth_t depth,
+ svn_boolean_t get_all,
+ svn_boolean_t update,
+ svn_boolean_t no_ignore,
+ const char *anchor_abspath,
+ const char *anchor_relpath,
+ svn_client_status_func_t status_func,
+ void *status_baton,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_index_t *hi;
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+
+ /* Loop over the hash of new values (we don't care about the old
+ ones). This is a mapping of versioned directories to property
+ values. */
+ for (hi = apr_hash_first(scratch_pool, external_map);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ svn_node_kind_t external_kind;
+ const char *local_abspath = svn__apr_hash_index_key(hi);
+ const char *defining_abspath = svn__apr_hash_index_val(hi);
+ svn_node_kind_t kind;
+ svn_opt_revision_t opt_rev;
+ const char *status_path;
+
+ svn_pool_clear(iterpool);
+
+ /* Obtain information on the expected external. */
+ SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+ &opt_rev.value.number,
+ ctx->wc_ctx, defining_abspath,
+ local_abspath, FALSE,
+ iterpool, iterpool));
+
+ if (external_kind != svn_node_dir)
+ continue;
+
+ SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool));
+ if (kind != svn_node_dir)
+ continue;
+
+ if (SVN_IS_VALID_REVNUM(opt_rev.value.number))
+ opt_rev.kind = svn_opt_revision_number;
+ else
+ opt_rev.kind = svn_opt_revision_unspecified;
+
+ /* Tell the client we're starting an external status set. */
+ if (ctx->notify_func2)
+ ctx->notify_func2(
+ ctx->notify_baton2,
+ svn_wc_create_notify(local_abspath,
+ svn_wc_notify_status_external,
+ iterpool), iterpool);
+
+ status_path = local_abspath;
+ if (anchor_abspath)
+ {
+ status_path = svn_dirent_join(anchor_relpath,
+ svn_dirent_skip_ancestor(anchor_abspath,
+ status_path),
+ iterpool);
+ }
+
+ /* And then do the status. */
+ SVN_ERR(svn_client_status5(NULL, ctx, status_path, &opt_rev, depth,
+ get_all, update, no_ignore, FALSE, FALSE,
+ NULL, status_func, status_baton,
+ iterpool));
+ }
+
+ /* Destroy SUBPOOL and (implicitly) ITERPOOL. */
+ svn_pool_destroy(iterpool);
+
+ return SVN_NO_ERROR;
+}
/*** Public Interface. ***/
@@ -527,11 +613,11 @@ svn_client_status5(svn_revnum_t *result_
pool, pool));
- SVN_ERR(svn_client__do_external_status(ctx, external_map,
- depth, get_all,
- update, no_ignore,
- sb.anchor_abspath,
sb.anchor_relpath,
- status_func, status_baton, pool));
+ SVN_ERR(do_external_status(ctx, external_map,
+ depth, get_all,
+ update, no_ignore,
+ sb.anchor_abspath, sb.anchor_relpath,
+ status_func, status_baton, pool));
}
return SVN_NO_ERROR;