You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/05/16 06:19:27 UTC

svn commit: r1339003 - in /subversion/branches/ev2-export/subversion/libsvn_client: client.h util.c

Author: hwright
Date: Wed May 16 04:19:26 2012
New Revision: 1339003

URL: http://svn.apache.org/viewvc?rev=1339003&view=rev
Log:
On the ev2-export branch:
Rip out a bunch of shim code we no longer use.

* 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,
   svn_client__get_shim_callbacks): Remove.

* subversion/libsvn_client/util.c
  (svn_client__shim_fetch_props_func,
   svn_client__shim_fetch_kind_func,
   svn_client__shim_fetch_base_func,
   svn_client__get_shim_callbacks): Remove.

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=1339003&r1=1339002&r2=1339003&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Wed May 16 04:19:26 2012
@@ -1124,42 +1124,6 @@ svn_client__get_detranslated_stream(svn_
                                     apr_pool_t *result_pool,
                                     apr_pool_t *scratch_pool);
 
-
-struct svn_client__shim_callbacks_baton
-{
-  svn_wc_context_t *wc_ctx;
-  apr_hash_t *relpath_map;
-};
-
-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,
-                               apr_hash_t *relpath_map,
-                               apr_pool_t *result_pool);
-
 /* Return true if KIND is a revision kind that is dependent on the working
  * copy. Otherwise, return false. */
 #define SVN_CLIENT__REVKIND_NEEDS_WC(kind)                                 \

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=1339003&r1=1339002&r2=1339003&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/util.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/util.c Wed May 16 04:19:26 2012
@@ -390,122 +390,3 @@ svn_client__assert_homogeneous_target_ty
 
   return SVN_NO_ERROR;
 }
-
-
-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 svn_client__shim_callbacks_baton *scb = baton;
-  const char *local_abspath;
-
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
-  if (!local_abspath)
-    {
-      *props = apr_hash_make(result_pool);
-      return SVN_NO_ERROR;
-    }
-
-  SVN_ERR(svn_wc_get_pristine_props(props, scb->wc_ctx, local_abspath,
-                                    result_pool, scratch_pool));
-
-  if (!*props)
-    *props = apr_hash_make(result_pool);
-
-  return SVN_NO_ERROR;
-}
-
-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 svn_client__shim_callbacks_baton *scb = baton;
-  svn_node_kind_t node_kind;
-  const char *local_abspath;
-
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
-  if (!local_abspath)
-    {
-      *kind = svn_kind_unknown;
-      return SVN_NO_ERROR;
-    }
-
-  SVN_ERR(svn_wc_read_kind(&node_kind, scb->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
-
-  return SVN_NO_ERROR;
-}
-
-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 svn_client__shim_callbacks_baton *scb = baton;
-  const char *local_abspath;
-  svn_stream_t *pristine_stream;
-  svn_stream_t *temp_stream;
-  svn_error_t *err;
-
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
-  if (!local_abspath)
-    {
-      *filename = NULL;
-      return SVN_NO_ERROR;
-    }
-
-  err = svn_wc_get_pristine_contents2(&pristine_stream, scb->wc_ctx,
-                                      local_abspath, scratch_pool,
-                                      scratch_pool);
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-    {
-      svn_error_clear(err);
-      *filename = NULL;
-      return SVN_NO_ERROR;
-    }
-  else if (err)
-    return svn_error_trace(err);
-
-  SVN_ERR(svn_stream_open_unique(&temp_stream, filename, NULL,
-                                 svn_io_file_del_on_pool_cleanup,
-                                 result_pool, scratch_pool));
-  SVN_ERR(svn_stream_copy3(pristine_stream, temp_stream, NULL, NULL,
-                           scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-svn_delta_shim_callbacks_t *
-svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
-                               apr_hash_t *relpath_map,
-                               apr_pool_t *result_pool)
-{
-  svn_delta_shim_callbacks_t *callbacks =
-                            svn_delta_shim_callbacks_default(result_pool);
-  struct svn_client__shim_callbacks_baton *scb = apr_pcalloc(result_pool,
-                                                             sizeof(*scb));
-
-  scb->wc_ctx = wc_ctx;
-  if (relpath_map)
-    scb->relpath_map = relpath_map;
-  else
-    scb->relpath_map = apr_hash_make(result_pool);
-
-  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;
-}