Author: hwright
Date: Wed Apr 4 17:43:18 2012
New Revision: 1309500
URL: http://svn.apache.org/viewvc?rev=1309500&view=rev
Log:
On the ev2-export branch:
Make public a few helper functions, so that other parts of the library may use
them.
* subversion/libsvn_client/client.h
(svn_client__shim_callbacks_baton, svn_client__shim_fetch_props_func,
svn_client__shim_fetch_kind_func, svn_client__shim_fetch_base_func):
New.
* subversion/libsvn_client/util.c
(shim_callbacks_baton): Remove.
(rationalize_shim_path): Update struct name.
(fetch_props_func, fetch_kind_func, fetch_base_func): Rename with
svn_client__shim_ prefix.
(svn_client__get_shim_callbacks): Update type and function name references.
Modified:
subversion/branches/ev2-export/subversion/libsvn_client/client.h
subversion/branches/ev2-export/subversion/libsvn_client/util.c
Modified: subversion/branches/ev2-export/subversion/libsvn_client/client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/client.h?rev=1309500&r1=1309499&r2=1309500&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Wed Apr 4
17:43:18 2012
@@ -1079,6 +1079,36 @@ svn_client__get_normalized_stream(svn_st
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+
+struct svn_client__shim_callbacks_baton
+{
+ svn_wc_context_t *wc_ctx;
+ const char *anchor_abspath;
+};
+
+svn_error_t *
+svn_client__shim_fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+svn_error_t *
+svn_client__shim_fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool);
+
+svn_error_t *
+svn_client__shim_fetch_base_func(const char **filename,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* Return a set of callbacks to use with the Ev2 shims. */
svn_delta_shim_callbacks_t *
svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
Modified: subversion/branches/ev2-export/subversion/libsvn_client/util.c
URL:
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/util.c?rev=1309500&r1=1309499&r2=1309500&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/util.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/util.c Wed Apr 4
17:43:18 2012
@@ -376,15 +376,10 @@ svn_client__assert_homogeneous_target_ty
return SVN_NO_ERROR;
}
-struct shim_callbacks_baton
-{
- svn_wc_context_t *wc_ctx;
- const char *anchor_abspath;
-};
static svn_error_t *
rationalize_shim_path(const char **local_abspath,
- struct shim_callbacks_baton *scb,
+ struct svn_client__shim_callbacks_baton *scb,
const char *path,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -410,15 +405,15 @@ rationalize_shim_path(const char **local
return SVN_NO_ERROR;
}
-static svn_error_t *
-fetch_props_func(apr_hash_t **props,
- void *baton,
- const char *path,
- svn_revnum_t base_revision,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_error_t *
+svn_client__shim_fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- struct shim_callbacks_baton *scb = baton;
+ struct svn_client__shim_callbacks_baton *scb = baton;
const char *local_abspath;
/* Early out: if we didn't get an anchor_abspath, it means we don't have a
@@ -441,14 +436,14 @@ fetch_props_func(apr_hash_t **props,
return SVN_NO_ERROR;
}
-static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
- void *baton,
- const char *path,
- svn_revnum_t base_revision,
- apr_pool_t *scratch_pool)
+svn_error_t *
+svn_client__shim_fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool)
{
- struct shim_callbacks_baton *scb = baton;
+ struct svn_client__shim_callbacks_baton *scb = baton;
svn_node_kind_t node_kind;
const char *local_abspath;
@@ -470,15 +465,15 @@ fetch_kind_func(svn_kind_t *kind,
return SVN_NO_ERROR;
}
-static svn_error_t *
-fetch_base_func(const char **filename,
- void *baton,
- const char *path,
- svn_revnum_t base_revision,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_error_t *
+svn_client__shim_fetch_base_func(const char **filename,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- struct shim_callbacks_baton *scb = baton;
+ struct svn_client__shim_callbacks_baton *scb = baton;
const char *local_abspath;
svn_stream_t *pristine_stream;
svn_stream_t *temp_stream;
@@ -523,14 +518,15 @@ svn_client__get_shim_callbacks(svn_wc_co
{
svn_delta_shim_callbacks_t *callbacks =
svn_delta_shim_callbacks_default(result_pool);
- struct shim_callbacks_baton *scb = apr_pcalloc(result_pool, sizeof(*scb));
+ struct svn_client__shim_callbacks_baton *scb = apr_pcalloc(result_pool,
+ sizeof(*scb));
scb->wc_ctx = wc_ctx;
scb->anchor_abspath = apr_pstrdup(result_pool, anchor_abspath);
- callbacks->fetch_props_func = fetch_props_func;
- callbacks->fetch_kind_func = fetch_kind_func;
- callbacks->fetch_base_func = fetch_base_func;
+ callbacks->fetch_props_func = svn_client__shim_fetch_props_func;
+ callbacks->fetch_kind_func = svn_client__shim_fetch_kind_func;
+ callbacks->fetch_base_func = svn_client__shim_fetch_base_func;
callbacks->fetch_baton = scb;
return callbacks;