You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/03/22 15:48:09 UTC

svn commit: r1459815 - in /subversion/trunk/subversion: include/private/svn_editor.h include/svn_delta.h include/svn_ra_svn.h libsvn_client/client.h libsvn_ra_serf/ra_serf.h

Author: cmpilato
Date: Fri Mar 22 14:48:08 2013
New Revision: 1459815

URL: http://svn.apache.org/r1459815
Log:
Privatize some editor-v2-only APIs.

* subversion/include/svn_delta.h
  (svn_delta_fetch_props_func_t, svn_delta_fetch_kind_func_t,
   svn_delta_fetch_base_func_t, svn_delta_shim_callbacks_t,
   svn_delta_shim_callbacks_default): Temporarily (until post-1.8)
    move these from here...

* subversion/include/private/svn_editor.h
  (svn_delta_fetch_props_func_t, svn_delta_fetch_kind_func_t,
   svn_delta_fetch_base_func_t, svn_delta_shim_callbacks_t,
   svn_delta_shim_callbacks_default): ...to here.

* subversion/include/svn_ra_svn.h,
* subversion/libsvn_client/client.h,
* subversion/libsvn_ra_serf/ra_serf.h
  Now also include "private/svn_editor.h".

Suggested by: rhuijben

Modified:
    subversion/trunk/subversion/include/private/svn_editor.h
    subversion/trunk/subversion/include/svn_delta.h
    subversion/trunk/subversion/include/svn_ra_svn.h
    subversion/trunk/subversion/libsvn_client/client.h
    subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h

Modified: subversion/trunk/subversion/include/private/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_editor.h?rev=1459815&r1=1459814&r2=1459815&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_editor.h (original)
+++ subversion/trunk/subversion/include/private/svn_editor.h Fri Mar 22 14:48:08 2013
@@ -38,6 +38,86 @@
 extern "C" {
 #endif /* __cplusplus */
 
+
+/*** Temporarily private stuff (should move to svn_delta.h when Editor
+     V2 is made public) ***/
+
+/** Callback to retrieve a node's entire set of properties.  This is
+ * needed by the various editor shims in order to effect backwards
+ * compatibility.
+ *
+ * Implementations should set @a *props to the hash of properties
+ * associated with @a path in @a base_revision, allocating that hash
+ * and its contents in @a result_pool, and should use @a scratch_pool
+ * for temporary allocations.
+ *
+ * @a baton is an implementation-specific closure.
+ */
+typedef svn_error_t *(*svn_delta_fetch_props_func_t)(
+  apr_hash_t **props,
+  void *baton,
+  const char *path,
+  svn_revnum_t base_revision,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool
+  );
+
+/** Callback to retrieve a node's kind.  This is needed by the various
+ * editor shims in order to effect backwards compatibility.
+ *
+ * Implementations should set @a *kind to the node kind of @a path in
+ * @a base_revision, using @a scratch_pool for temporary allocations.
+ *
+ * @a baton is an implementation-specific closure.
+ */
+typedef svn_error_t *(*svn_delta_fetch_kind_func_t)(
+  svn_node_kind_t *kind,
+  void *baton,
+  const char *path,
+  svn_revnum_t base_revision,
+  apr_pool_t *scratch_pool
+  );
+
+/** Callback to fetch the name of a file to use as a delta base.
+ *
+ * Implementations should set @a *filename to the name of a file
+ * suitable for use as a delta base for @a path in @a base_revision
+ * (allocating @a *filename from @a result_pool), or to @c NULL if the
+ * base stream is empty.  @a scratch_pool is provided for temporary
+ * allocations.
+ *
+ * @a baton is an implementation-specific closure.
+ */
+typedef svn_error_t *(*svn_delta_fetch_base_func_t)(
+  const char **filename,
+  void *baton,
+  const char *path,
+  svn_revnum_t base_revision,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool
+  );
+
+/** Collection of callbacks used for the shim code.  This structure
+ * may grow additional fields in the future.  Therefore, always use
+ * svn_delta_shim_callbacks_default() to allocate new instances of it.
+ */
+typedef struct svn_delta_shim_callbacks_t
+{
+  svn_delta_fetch_props_func_t fetch_props_func;
+  svn_delta_fetch_kind_func_t fetch_kind_func;
+  svn_delta_fetch_base_func_t fetch_base_func;
+  void *fetch_baton;
+} svn_delta_shim_callbacks_t;
+
+/** Return a collection of default shim functions in @a result_pool.
+ *
+ * @since New in 1.8.
+ */
+svn_delta_shim_callbacks_t *
+svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
+
+
+
 /** Transforming trees ("editing").
  *
  * In Subversion, we have a number of occasions where we transform a tree

Modified: subversion/trunk/subversion/include/svn_delta.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_delta.h?rev=1459815&r1=1459814&r2=1459815&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_delta.h (original)
+++ subversion/trunk/subversion/include/svn_delta.h Fri Mar 22 14:48:08 2013
@@ -1119,89 +1119,6 @@ typedef struct svn_delta_editor_t
 svn_delta_editor_t *
 svn_delta_default_editor(apr_pool_t *pool);
 
-/** Callback to retrieve a node's entire set of properties.  This is
- * needed by the various editor shims in order to effect backwards
- * compatibility.
- *
- * Implementations should set @a *props to the hash of properties
- * associated with @a path in @a base_revision, allocating that hash
- * and its contents in @a result_pool, and should use @a scratch_pool
- * for temporary allocations.
- *
- * @a baton is an implementation-specific closure.
- *
- * @since New in 1.8.
- */
-typedef svn_error_t *(*svn_delta_fetch_props_func_t)(
-  apr_hash_t **props,
-  void *baton,
-  const char *path,
-  svn_revnum_t base_revision,
-  apr_pool_t *result_pool,
-  apr_pool_t *scratch_pool
-  );
-
-/** Callback to retrieve a node's kind.  This is needed by the various
- * editor shims in order to effect backwards compatibility.
- *
- * Implementations should set @a *kind to the node kind of @a path in
- * @a base_revision, using @a scratch_pool for temporary allocations.
- *
- * @a baton is an implementation-specific closure.
- *
- * @since New in 1.8.
- */
-typedef svn_error_t *(*svn_delta_fetch_kind_func_t)(
-  svn_node_kind_t *kind,
-  void *baton,
-  const char *path,
-  svn_revnum_t base_revision,
-  apr_pool_t *scratch_pool
-  );
-
-/** Callback to fetch the name of a file to use as a delta base.
- *
- * Implementations should set @a *filename to the name of a file
- * suitable for use as a delta base for @a path in @a base_revision
- * (allocating @a *filename from @a result_pool), or to @c NULL if the
- * base stream is empty.  @a scratch_pool is provided for temporary
- * allocations.
- *
- * @a baton is an implementation-specific closure.
- *
- * @since New in 1.8.
- */
-typedef svn_error_t *(*svn_delta_fetch_base_func_t)(
-  const char **filename,
-  void *baton,
-  const char *path,
-  svn_revnum_t base_revision,
-  apr_pool_t *result_pool,
-  apr_pool_t *scratch_pool
-  );
-
-/** Collection of callbacks used for the shim code.  This structure
- * may grow additional fields in the future.  Therefore, always use
- * svn_delta_shim_callbacks_default() to allocate new instances of it.
- *
- * @since New in 1.8.
- */
-typedef struct svn_delta_shim_callbacks_t
-{
-  svn_delta_fetch_props_func_t fetch_props_func;
-  svn_delta_fetch_kind_func_t fetch_kind_func;
-  svn_delta_fetch_base_func_t fetch_base_func;
-  void *fetch_baton;
-} svn_delta_shim_callbacks_t;
-
-/** Return a collection of default shim functions in @a result_pool.
- *
- * @since New in 1.8.
- */
-svn_delta_shim_callbacks_t *
-svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
-
-
 /** A text-delta window handler which does nothing.
  *
  * Editors can return this handler from @c apply_textdelta if they don't

Modified: subversion/trunk/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra_svn.h?rev=1459815&r1=1459814&r2=1459815&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_ra_svn.h (original)
+++ subversion/trunk/subversion/include/svn_ra_svn.h Fri Mar 22 14:48:08 2013
@@ -38,6 +38,7 @@
 #include "svn_string.h"
 #include "svn_config.h"
 #include "svn_delta.h"
+#include "private/svn_editor.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: subversion/trunk/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1459815&r1=1459814&r2=1459815&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Fri Mar 22 14:48:08 2013
@@ -38,6 +38,7 @@
 #include "private/svn_magic.h"
 #include "private/svn_client_private.h"
 #include "private/svn_diff_tree.h"
+#include "private/svn_editor.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1459815&r1=1459814&r2=1459815&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Fri Mar 22 14:48:08 2013
@@ -40,6 +40,7 @@
 
 #include "private/svn_dav_protocol.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_editor.h"
 
 #include "blncache.h"