subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1562052 - in /subversion/trunk: build.conf subversion/include/svn_client.h subversion/include/svn_client_mtcc.h subversion/libsvn_client/mtcc.c subversion/svnmucc/svnmucc.c subversion/tests/libsvn_client/mtcc-test.c
Date Tue, 28 Jan 2014 12:42:04 GMT
Author: rhuijben
Date: Tue Jan 28 12:42:04 2014
New Revision: 1562052

URL: http://svn.apache.org/r1562052
Log:
Extract the mtcc public api to its own header.

* build.conf
  (libsvn_client): Export functions in svn_client_mtcc.h.

* subversion/include/svn_client.h
  (svn_client_mtcc_t,
   svn_client_mtcc_create,
   svn_client_mtcc_add_add_file,
   svn_client_mtcc_add_copy,
   svn_client_mtcc_add_delete,
   svn_client_mtcc_add_mkdir,
   svn_client_mtcc_add_move,
   svn_client_mtcc_add_propset,
   svn_client_mtcc_add_update_file,
   svn_client_mtcc_check_path,
   svn_client_mtcc_commit): Move to svn_client_mtcc.h

* subversion/include/svn_client_mtcc.h
  New header.

* subversion/libsvn_client/mtcc.c
  (includes): Add svn_client_mtcc.h.

* subversion/svnmucc/svnmucc.c
  (includes): Add svn_client_mtcc.h. Remove a few unused headers.

* subversion/tests/libsvn_client/mtcc-test.c
  (SVN_DEPRECATED): Remove unneeded define.
  (includes): Add svn_client_mtcc.h and remove a few unused headers.

Added:
    subversion/trunk/subversion/include/svn_client_mtcc.h   (with props)
Modified:
    subversion/trunk/build.conf
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/mtcc.c
    subversion/trunk/subversion/svnmucc/svnmucc.c
    subversion/trunk/subversion/tests/libsvn_client/mtcc-test.c

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1562052&r1=1562051&r2=1562052&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Tue Jan 28 12:42:04 2014
@@ -248,7 +248,7 @@ type = lib
 path = subversion/libsvn_client
 libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr
 install = lib
-msvc-export = svn_client.h private/svn_client_private.h
+msvc-export = svn_client.h svn_client_mtcc.h private/svn_client_private.h
 
 # Routines for binary diffing and tree-deltas
 [libsvn_delta]

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1562052&r1=1562051&r2=1562052&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Tue Jan 28 12:42:04 2014
@@ -6653,189 +6653,6 @@ svn_client_open_ra_session(svn_ra_sessio
 
 /** @} end group: Client session related functions */
 
-/**
- *
- * @defgroup clnt_mtcc Multi Command Context related functions
- *
- * @{
- *
- */
-
-/** This is a structure which stores a list of repository commands
- * that can be played to a repository as a single operation
- *
- * Use svn_client_mtcc_create() to create instances
- *
- * @since New in 1.9.
- */
-typedef struct svn_client_mtcc_t svn_client_mtcc_t;
-
-/** Creates a new multicommand context for an operation on @a anchor_url and
- * its descendants.
- *
- * Allocate the context in @a result_pool and perform temporary allocations in
- * @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_create(svn_client_mtcc_t **mtcc,
-                       const char *anchor_url,
-                       svn_revnum_t base_revision,
-                       svn_client_ctx_t *ctx,
-                       apr_pool_t *result_pool,
-                       apr_pool_t *scratch_pool);
-
-/** Adds a file add operation of @a relpath to @a mtcc. If @a src_checksum
- * is not null it will be provided to the repository to verify if the file
- * was transfered succesfull.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @note The current implementation keeps @a src_stream open until @a mtcc
- * is committed.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_add_file(const char *relpath,
-                             svn_stream_t *src_stream,
-                             const svn_checksum_t *src_checksum,
-                             svn_client_mtcc_t *mtcc,
-                             apr_pool_t *scratch_pool);
-
-/** Adds a copy operation of the node @a src_relpath at revision @a revision
- * to @a dst_relpath to @a mtcc.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_copy(const char *src_relpath,
-                         svn_revnum_t revision,
-                         const char *dst_relpath,
-                         svn_client_mtcc_t *mtcc,
-                         apr_pool_t *scratch_pool);
-
-/** Adds a delete of @a relpath to @a mtcc.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_delete(const char *relpath,
-                          svn_client_mtcc_t *mtcc,
-                          apr_pool_t *scratch_pool);
-
-/** Adds an mkdir operation of @a relpath to @a mtcc.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_mkdir(const char *relpath,
-                          svn_client_mtcc_t *mtcc,
-                          apr_pool_t *scratch_pool);
-
-
-/** Adds a move operation of the node @a src_relpath to @a dst_relpath to
- * @a mtcc.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_move(const char *src_relpath,
-                         const char *dst_relpath,
-                         svn_client_mtcc_t *mtcc,
-                         apr_pool_t *scratch_pool);
-
-/** Adds a propset operation for the property @a propname to @a propval
- * (which can be NULL for a delete) on @a relpath to @a mtcc.
- *
- * If @a skip_checks is not FALSE Subversion defined properties are verified
- * for correctness like svn_client_propset_remote()
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_propset(const char *relpath,
-                            const char *propname,
-                            const svn_string_t *propval,
-                            svn_boolean_t skip_checks,
-                            svn_client_mtcc_t *mtcc,
-                            apr_pool_t *scratch_pool);
-
-
-/** Adds an update file operation for @a relpath to @a mtcc.
- *
- * The final version of the file is provided with @a src_stream. If @a
- * src_checksum is provided it will be provided to the repository to verify
- * the final result.
- *
- * If @a base_checksum is provided it will be used by the repository to verify
- * if the base file matches this checksum.
- *
- * If @a base_stream is not NULL only the binary diff from @a base_stream to
- * @a src_stream is written to the repository.
- *
- * Perform temporary allocations in @a scratch_pool.
- *
- * @note Callers should assume that the mtcc requires @a src_stream and @a
- * base_stream to be valid until @a mtcc is committed.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_add_update_file(const char *relpath,
-                                svn_stream_t *src_stream,
-                                const svn_checksum_t *src_checksum,
-                                svn_stream_t *base_stream,
-                                const svn_checksum_t *base_checksum,
-                                svn_client_mtcc_t *mtcc,
-                                apr_pool_t *scratch_pool);
-
-/** Obtains the kind of node at @a relpath in the current state of @a mtcc.
- * This value might be from the cache (in case of modifications, copies)
- * or fetched from the repository.
- *
- * If @a check_repository is TRUE, verify the node type with the repository at
- * least once and cache the result for further checks.
- *
- * When a node does not exist this functions sets @a *kind to @c svn_node_node.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_check_path(svn_node_kind_t *kind,
-                           const char *relpath,
-                           svn_boolean_t check_repository,
-                           svn_client_mtcc_t *mtcc,
-                           apr_pool_t *scratch_pool);
-
-/** Commits all operations stored in @a mtcc as a new revision and destroys
- * @a mtcc.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_client_mtcc_commit(apr_hash_t *revprop_table,
-                       svn_commit_callback2_t commit_callback,
-                       void *commit_baton,
-                       svn_client_mtcc_t *mtcc,
-                       apr_pool_t *scratch_pool);
-
-
-/** @} end group: Multi Command Context related functions */
-
-
-
 /** @} */
 
 #ifdef __cplusplus

Added: subversion/trunk/subversion/include/svn_client_mtcc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client_mtcc.h?rev=1562052&view=auto
==============================================================================
--- subversion/trunk/subversion/include/svn_client_mtcc.h (added)
+++ subversion/trunk/subversion/include/svn_client_mtcc.h Tue Jan 28 12:42:04 2014
@@ -0,0 +1,226 @@
+/**
+ * @copyright
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file svn_client_mtcc.h
+ * @brief Subversion multicommand client support
+ *
+ * Requires:  The working copy library and client library.
+ * Provides:  High level multicommand api.
+ * Used By:   Client programs, svnmucc.
+ */
+
+#ifndef SVN_CLIENT_MTCC_H
+#define SVN_CLIENT_MTCC_H
+
+#include "svn_client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/**
+ *
+ * @defgroup clnt_mtcc Multi Command Context related functions
+ *
+ * @{
+ *
+ */
+
+/** This is a structure which stores a list of repository commands
+ * that can be played to a repository as a single operation
+ *
+ * Use svn_client_mtcc_create() to create instances
+ *
+ * @since New in 1.9.
+ */
+typedef struct svn_client_mtcc_t svn_client_mtcc_t;
+
+/** Creates a new multicommand context for an operation on @a anchor_url and
+ * its descendants.
+ *
+ * Allocate the context in @a result_pool and perform temporary allocations in
+ * @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_create(svn_client_mtcc_t **mtcc,
+                       const char *anchor_url,
+                       svn_revnum_t base_revision,
+                       svn_client_ctx_t *ctx,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+/** Adds a file add operation of @a relpath to @a mtcc. If @a src_checksum
+ * is not null it will be provided to the repository to verify if the file
+ * was transfered succesfull.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @note The current implementation keeps @a src_stream open until @a mtcc
+ * is committed.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_add_file(const char *relpath,
+                             svn_stream_t *src_stream,
+                             const svn_checksum_t *src_checksum,
+                             svn_client_mtcc_t *mtcc,
+                             apr_pool_t *scratch_pool);
+
+/** Adds a copy operation of the node @a src_relpath at revision @a revision
+ * to @a dst_relpath to @a mtcc.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_copy(const char *src_relpath,
+                         svn_revnum_t revision,
+                         const char *dst_relpath,
+                         svn_client_mtcc_t *mtcc,
+                         apr_pool_t *scratch_pool);
+
+/** Adds a delete of @a relpath to @a mtcc.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_delete(const char *relpath,
+                          svn_client_mtcc_t *mtcc,
+                          apr_pool_t *scratch_pool);
+
+/** Adds an mkdir operation of @a relpath to @a mtcc.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_mkdir(const char *relpath,
+                          svn_client_mtcc_t *mtcc,
+                          apr_pool_t *scratch_pool);
+
+
+/** Adds a move operation of the node @a src_relpath to @a dst_relpath to
+ * @a mtcc.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_move(const char *src_relpath,
+                         const char *dst_relpath,
+                         svn_client_mtcc_t *mtcc,
+                         apr_pool_t *scratch_pool);
+
+/** Adds a propset operation for the property @a propname to @a propval
+ * (which can be NULL for a delete) on @a relpath to @a mtcc.
+ *
+ * If @a skip_checks is not FALSE Subversion defined properties are verified
+ * for correctness like svn_client_propset_remote()
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_propset(const char *relpath,
+                            const char *propname,
+                            const svn_string_t *propval,
+                            svn_boolean_t skip_checks,
+                            svn_client_mtcc_t *mtcc,
+                            apr_pool_t *scratch_pool);
+
+
+/** Adds an update file operation for @a relpath to @a mtcc.
+ *
+ * The final version of the file is provided with @a src_stream. If @a
+ * src_checksum is provided it will be provided to the repository to verify
+ * the final result.
+ *
+ * If @a base_checksum is provided it will be used by the repository to verify
+ * if the base file matches this checksum.
+ *
+ * If @a base_stream is not NULL only the binary diff from @a base_stream to
+ * @a src_stream is written to the repository.
+ *
+ * Perform temporary allocations in @a scratch_pool.
+ *
+ * @note Callers should assume that the mtcc requires @a src_stream and @a
+ * base_stream to be valid until @a mtcc is committed.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_add_update_file(const char *relpath,
+                                svn_stream_t *src_stream,
+                                const svn_checksum_t *src_checksum,
+                                svn_stream_t *base_stream,
+                                const svn_checksum_t *base_checksum,
+                                svn_client_mtcc_t *mtcc,
+                                apr_pool_t *scratch_pool);
+
+/** Obtains the kind of node at @a relpath in the current state of @a mtcc.
+ * This value might be from the cache (in case of modifications, copies)
+ * or fetched from the repository.
+ *
+ * If @a check_repository is TRUE, verify the node type with the repository at
+ * least once and cache the result for further checks.
+ *
+ * When a node does not exist this functions sets @a *kind to @c svn_node_node.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_check_path(svn_node_kind_t *kind,
+                           const char *relpath,
+                           svn_boolean_t check_repository,
+                           svn_client_mtcc_t *mtcc,
+                           apr_pool_t *scratch_pool);
+
+/** Commits all operations stored in @a mtcc as a new revision and destroys
+ * @a mtcc.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_mtcc_commit(apr_hash_t *revprop_table,
+                       svn_commit_callback2_t commit_callback,
+                       void *commit_baton,
+                       svn_client_mtcc_t *mtcc,
+                       apr_pool_t *scratch_pool);
+
+
+/** @} end group: Multi Command Context related functions */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif  /* SVN_CLIENT_MTCC_H */

Propchange: subversion/trunk/subversion/include/svn_client_mtcc.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/trunk/subversion/libsvn_client/mtcc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mtcc.c?rev=1562052&r1=1562051&r2=1562052&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mtcc.c (original)
+++ subversion/trunk/subversion/libsvn_client/mtcc.c Tue Jan 28 12:42:04 2014
@@ -29,6 +29,9 @@
 #include "svn_pools.h"
 #include "svn_subst.h"
 
+#include "svn_client_mtcc.h"
+
+
 #include "svn_private_config.h"
 
 #include "client.h"

Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1562052&r1=1562051&r2=1562052&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Tue Jan 28 12:42:04 2014
@@ -43,21 +43,19 @@
 #include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
+#include "svn_client_mtcc.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
 #include "svn_error.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_props.h"
-#include "svn_ra.h"
 #include "svn_string.h"
 #include "svn_subst.h"
 #include "svn_utf.h"
 #include "svn_version.h"
 
 #include "private/svn_cmdline_private.h"
-#include "private/svn_ra_private.h"
-#include "private/svn_string_private.h"
 
 /* Version compatibility check */
 static svn_error_t *

Modified: subversion/trunk/subversion/tests/libsvn_client/mtcc-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_client/mtcc-test.c?rev=1562052&r1=1562051&r2=1562052&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_client/mtcc-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_client/mtcc-test.c Tue Jan 28 12:42:04 2014
@@ -21,15 +21,10 @@
  * ====================================================================
  */
 
-#define SVN_DEPRECATED
-
-#include "svn_mergeinfo.h"
 #include "svn_pools.h"
 #include "svn_props.h"
 #include "svn_client.h"
-#include "svn_repos.h"
-#include "svn_subst.h"
-#include "private/svn_wc_private.h"
+#include "svn_client_mtcc.h"
 
 #include "../svn_test.h"
 #include "../svn_test_fs.h"



Mime
View raw message