subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1339207 - in /subversion/branches/ev2-export/subversion: include/svn_ra.h libsvn_ra/ra_loader.c libsvn_ra/ra_loader.h
Date Wed, 16 May 2012 14:53:00 GMT
Author: hwright
Date: Wed May 16 14:52:59 2012
New Revision: 1339207

URL: http://svn.apache.org/viewvc?rev=1339207&view=rev
Log:
On the ev2-export branch:
Remove a public added-on-this-branch function for retrieving an Ev2 editor from
the RA layer.  This is already a similiar function on trunk, which we now use
exclusively on the branch.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_commit_editor4): Remove.
  (svn_ra__register_editor_shim_callbacks): Don't bother caching the callbacks
    locally.
 
* subversion/libsvn_ra/ra_loader.h
  (svn_ra_session_t): Remove local cache of the shim callbacks.

* subversion/include/svn_ra.h
  (svn_ra_get_commit_editor4): Remove.
  (svn_ra_get_commit_editor3): Undeprecate.

Modified:
    subversion/branches/ev2-export/subversion/include/svn_ra.h
    subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
    subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h

Modified: subversion/branches/ev2-export/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_ra.h?rev=1339207&r1=1339206&r2=1339207&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_ra.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_ra.h Wed May 16 14:52:59 2012
@@ -884,28 +884,8 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
  *
  * Use @a pool for memory allocation.
  *
- * @since New in 1.8.
- */
-svn_error_t *
-svn_ra_get_commit_editor4(svn_ra_session_t *session,
-                          svn_editor_t **editor,
-                          apr_hash_t *revprop_table,
-                          svn_commit_callback2_t callback,
-                          void *callback_baton,
-                          apr_hash_t *lock_tokens,
-                          svn_boolean_t keep_locks,
-                          svn_cancel_func_t cancel_func,
-                          void *cancel_baton,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool);
-
-/**
- * Same as svn_ra_get_commit_editor4(), but returns a #svn_delta_editor_t.
- *
  * @since New in 1.5.
- * @deprecated Provided for backward compatibility with the 1.7 API.
  */
-SVN_DEPRECATED
 svn_error_t *
 svn_ra_get_commit_editor3(svn_ra_session_t *session,
                           const svn_delta_editor_t **editor,

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c?rev=1339207&r1=1339206&r2=1339207&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c Wed May 16 14:52:59 2012
@@ -760,75 +760,6 @@ svn_error_t *svn_ra_get_commit_editor3(s
                                             lock_tokens, keep_locks, pool);
 }
 
-svn_error_t *
-svn_ra_get_commit_editor4(svn_ra_session_t *session,
-                          svn_editor_t **editor,
-                          apr_hash_t *revprop_table,
-                          svn_commit_callback2_t callback,
-                          void *callback_baton,
-                          apr_hash_t *lock_tokens,
-                          svn_boolean_t keep_locks,
-                          svn_cancel_func_t cancel_func,
-                          void *cancel_baton,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
-{
-  const svn_delta_editor_t *deditor;
-  void *dedit_baton;
-  /* Allocate this in a pool, since the callback will be called long after
-     this function as returned. */
-  struct ccw_baton *ccwb = apr_palloc(result_pool, sizeof(*ccwb));
-  struct svn_delta__extra_baton *exb;
-  svn_delta__unlock_func_t unlock_func;
-  void *unlock_baton;
-  svn_boolean_t send_abs_paths;
-  const char *repos_root;
-  const char *session_url;
-  const char *base_relpath;
-
-  ccwb->original_callback = callback;
-  ccwb->original_baton = callback_baton;
-  ccwb->session = session;
-
-  SVN_ERR(session->vtable->get_commit_editor(session, &deditor, &dedit_baton,
-                                             revprop_table,
-                                             callback
-                                                 ? commit_callback_wrapper
-                                                 : NULL,
-                                             callback ? ccwb : NULL,
-                                             lock_tokens, keep_locks,
-                                             result_pool));
-
-  /* Get or calculate the appropriate repos root and base relpath. */
-  SVN_ERR(svn_ra_get_repos_root2(session, &repos_root, scratch_pool));
-  SVN_ERR(svn_ra_get_session_url(session, &session_url, scratch_pool));
-  base_relpath = svn_uri_skip_ancestor(repos_root, session_url, scratch_pool);
-
-  /* Create the Ev2 editor from the Ev1 editor provided by the RA layer. */
-  SVN_ERR(svn_delta__editor_from_delta(editor, &exb,
-                                   &unlock_func, &unlock_baton,
-                                   deditor, dedit_baton, &send_abs_paths,
-                                   repos_root, base_relpath,
-                                   cancel_func, cancel_baton,
-                                   session->shim_callbacks->fetch_kind_func,
-                                   session->shim_callbacks->fetch_baton,
-                                   session->shim_callbacks->fetch_props_func,
-                                   session->shim_callbacks->fetch_baton,
-                                   scratch_pool, result_pool));
-
-  /* Since we're (currently) just wrapping an existing Ev1 editor, we have
-     to call any start_edit handler it may provide.  We've got a couple of
-     options to do so: Implement a wrapper editor and call the start_edit
-     callback upon the first invocation of any of the underlying editor's
-     functions; or, just assume our consumer is going to eventually use the
-     editor it is asking for, and call the start edit callback now.  For
-     simplicity's sake, we do the latter. */
-  if (exb->start_edit)
-    SVN_ERR(exb->start_edit(exb->baton, SVN_INVALID_REVNUM));
-
-  return SVN_NO_ERROR;
-}
-
 svn_error_t *svn_ra_get_file(svn_ra_session_t *session,
                              const char *path,
                              svn_revnum_t revision,
@@ -1465,11 +1396,8 @@ svn_error_t *
 svn_ra__register_editor_shim_callbacks(svn_ra_session_t *session,
                                        svn_delta_shim_callbacks_t *callbacks)
 {
-  /* We save these locally, as well as provide them to the RA layers. */
-  session->shim_callbacks = callbacks;
-
-  return svn_error_trace(session->vtable->register_editor_shim_callbacks(
-                                                        session, callbacks));
+  SVN_ERR(session->vtable->register_editor_shim_callbacks(session, callbacks));
+  return SVN_NO_ERROR;
 }
 
 

Modified: subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h?rev=1339207&r1=1339206&r2=1339207&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.h Wed May 16 14:52:59 2012
@@ -329,9 +329,6 @@ struct svn_ra_session_t {
 
   /* Private data for the RA implementation. */
   void *priv;
-
-  /* A set of shim callbacks for use by libsvn_ra. */
-  svn_delta_shim_callbacks_t *shim_callbacks;
 };
 
 /* Each libsvn_ra_foo defines a function named svn_ra_foo__init of this type.



Mime
View raw message