You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/15 10:52:18 UTC

svn commit: r1532250 [9/37] - in /subversion/branches/cache-server: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/emacs/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/ser...

Modified: subversion/branches/cache-server/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_client_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_client_private.h Tue Oct 15 08:52:06 2013
@@ -147,6 +147,37 @@ svn_client__ra_session_from_path2(svn_ra
                                  svn_client_ctx_t *ctx,
                                  apr_pool_t *pool);
 
+/* Given PATH_OR_URL, which contains either a working copy path or an
+   absolute URL, a peg revision PEG_REVISION, and a desired revision
+   REVISION, find the path at which that object exists in REVISION,
+   following copy history if necessary.  If REVISION is younger than
+   PEG_REVISION, then check that PATH_OR_URL is the same node in both
+   PEG_REVISION and REVISION, and return @c
+   SVN_ERR_CLIENT_UNRELATED_RESOURCES if it is not the same node.
+
+   If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
+   for a URL or 'working' for a WC path.  If REVISION->kind is
+   'unspecified', the operative revision is the peg revision.
+
+   Store the actual location of the object in *RESOLVED_LOC_P.
+
+   RA_SESSION should be an open RA session pointing at the URL of
+   PATH_OR_URL, or NULL, in which case this function will open its own
+   temporary session.
+
+   Use authentication baton cached in CTX to authenticate against the
+   repository.
+
+   Use POOL for all allocations. */
+svn_error_t *
+svn_client__resolve_rev_and_url(svn_client__pathrev_t **resolved_loc_p,
+                                svn_ra_session_t *ra_session,
+                                const char *path_or_url,
+                                const svn_opt_revision_t *peg_revision,
+                                const svn_opt_revision_t *revision,
+                                svn_client_ctx_t *ctx,
+                                apr_pool_t *pool);
+
 /** Return @c SVN_ERR_ILLEGAL_TARGET if TARGETS contains a mixture of
  * URLs and paths; otherwise return SVN_NO_ERROR.
  *
@@ -169,29 +200,6 @@ svn_client__create_status(svn_client_sta
                           apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool);
 
-/* Set *ANCESTOR_URL and *ANCESTOR_REVISION to the URL and revision,
- * respectively, of the youngest common ancestor of the two locations
- * PATH_OR_URL1@REV1 and PATH_OR_URL2@REV2.  Set *ANCESTOR_RELPATH to
- * NULL and *ANCESTOR_REVISION to SVN_INVALID_REVNUM if they have no
- * common ancestor.  This function assumes that PATH_OR_URL1@REV1 and
- * PATH_OR_URL2@REV2 both refer to the same repository.
- *
- * Use the authentication baton cached in CTX to authenticate against
- * the repository.
- *
- * See also svn_client__get_youngest_common_ancestor().
- */
-svn_error_t *
-svn_client__youngest_common_ancestor(const char **ancestor_url,
-                                     svn_revnum_t *ancestor_rev,
-                                     const char *path_or_url1,
-                                     const svn_opt_revision_t *revision1,
-                                     const char *path_or_url2,
-                                     const svn_opt_revision_t *revision2,
-                                     svn_client_ctx_t *ctx,
-                                     apr_pool_t *result_pool,
-                                     apr_pool_t *scratch_pool);
-
 /* Get the repository location of the base node at LOCAL_ABSPATH.
  *
  * A pathrev_t wrapper around svn_wc__node_get_base().
@@ -260,6 +268,45 @@ svn_client__copy_foreign(const char *url
                          svn_client_ctx_t *ctx,
                          apr_pool_t *scratch_pool);
 
+/* Same as the public svn_client_mergeinfo_log2 API, except for the addition
+ * of the TARGET_MERGEINFO_CATALOG and RESULT_POOL parameters.
+ *
+ * If TARGET_MERGEINFO_CATALOG is NULL then this acts exactly as the public
+ * API.  If *TARGET_MERGEINFO_CATALOG is NULL, then *TARGET_MERGEINFO_CATALOG
+ * is set to the a mergeinfo catalog representing the mergeinfo on
+ * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH, (like the public API only
+ * depths of svn_depth_empty or svn_depth_infinity are supported) allocated in
+ * RESULT_POOL.  Finally, if *TARGET_MERGEINFO_CATALOG is non-NULL, then it is
+ * assumed to be a mergeinfo catalog representing the mergeinfo on
+ * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH.
+ *
+ * The keys for the subtree mergeinfo are the repository root-relative
+ * paths of TARGET_PATH_OR_URL and/or its subtrees, regardless of whether
+ * TARGET_PATH_OR_URL is a URL or WC path.
+ *
+ * If RA_SESSION is not NULL, use it to obtain merge information instead of
+ * opening a new session. The session might be reparented after usage, so
+ * callers should reparent the session back to their original location if
+ * needed.
+ */
+svn_error_t *
+svn_client__mergeinfo_log(svn_boolean_t finding_merged,
+                          const char *target_path_or_url,
+                          const svn_opt_revision_t *target_peg_revision,
+                          svn_mergeinfo_catalog_t *target_mergeinfo_catalog,
+                          const char *source_path_or_url,
+                          const svn_opt_revision_t *source_peg_revision,
+                          const svn_opt_revision_t *source_start_revision,
+                          const svn_opt_revision_t *source_end_revision,
+                          svn_log_entry_receiver_t log_receiver,
+                          void *log_receiver_baton,
+                          svn_boolean_t discover_changed_paths,
+                          svn_depth_t depth,
+                          const apr_array_header_t *revprops,
+                          svn_client_ctx_t *ctx,
+                          svn_ra_session_t *ra_session,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/cache-server/subversion/include/private/svn_delta_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_delta_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_delta_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_delta_private.h Tue Oct 15 08:52:06 2013
@@ -101,26 +101,6 @@ svn_delta__delta_from_editor(const svn_d
                              struct svn_delta__extra_baton *exb,
                              apr_pool_t *pool);
 
-/**
- * Get the data from IN, compress it according to the specified
- * COMPRESSION_LEVEL and write the result to OUT.
- * SVN_DELTA_COMPRESSION_LEVEL_NONE is valid for COMPRESSION_LEVEL.
- */
-svn_error_t *
-svn__compress(svn_string_t *in,
-              svn_stringbuf_t *out,
-              int compression_level);
-
-/**
- * Get the compressed data from IN, decompress it and write the result to
- * OUT.  Return an error if the decompressed size is larger than LIMIT.
- */
-svn_error_t *
-svn__decompress(svn_string_t *in,
-                svn_stringbuf_t *out,
-                apr_size_t limit);
-
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/cache-server/subversion/include/private/svn_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_editor.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_editor.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_editor.h Tue Oct 15 08:52:06 2013
@@ -270,7 +270,6 @@ svn_delta_shim_callbacks_default(apr_poo
  *      svn_editor_setcb_delete() \n
  *      svn_editor_setcb_copy() \n
  *      svn_editor_setcb_move() \n
- *      svn_editor_setcb_rotate() \n
  *      svn_editor_setcb_complete() \n
  *      svn_editor_setcb_abort()
  *
@@ -293,7 +292,6 @@ svn_delta_shim_callbacks_default(apr_poo
  *      svn_editor_delete() \n
  *      svn_editor_copy() \n
  *      svn_editor_move() \n
- *      svn_editor_rotate()
  *    \n\n
  *    Just before each callback invocation is carried out, the @a cancel_func
  *    that was passed to svn_editor_create() is invoked to poll any
@@ -325,7 +323,7 @@ svn_delta_shim_callbacks_default(apr_poo
  * In order to reduce complexity of callback receivers, the editor callbacks
  * must be driven in adherence to these rules:
  *
- * - If any path is added (with add_*) or deleted/moved/rotated, then
+ * - If any path is added (with add_*) or deleted/moved, then
  *   an svn_editor_alter_directory() call must be made for its parent
  *   directory with the target/eventual set of children.
  *
@@ -344,15 +342,13 @@ svn_delta_shim_callbacks_default(apr_poo
  *   its children, if a directory) may be copied many times, and are
  *   otherwise subject to the Once Rule. The destination path of a copy
  *   or move may have alter_* operations applied, but not add_* or delete.
- *   If the destination path of a copy, move, or rotate is a directory,
+ *   If the destination path of a copy or move is a directory,
  *   then its children are subject to the Once Rule. The source path of
  *   a move (and its child paths) may be referenced in add_*, or as the
  *   destination of a copy (where these new or copied nodes are subject
- *   to the Once Rule). Paths listed in a rotation are both sources and
- *   destinations, so they may not be referenced again in an add_* or a
- *   deletion; these paths may have alter_* operations applied.
+ *   to the Once Rule).
  *
- * - The ancestor of an added, copied-here, moved-here, rotated, or
+ * - The ancestor of an added, copied-here, moved-here, or
  *   modified node may not be deleted. The ancestor may not be moved
  *   (instead: perform the move, *then* the edits).
  *
@@ -375,10 +371,6 @@ svn_delta_shim_callbacks_default(apr_poo
  *   by a delete... that is fine. It is simply that svn_editor_move()
  *   should be used to describe a semantic move.
  *
- * - Paths mentioned in svn_editor_rotate() may have their properties
- *   and contents edited (via alter_* calls) by a previous or later call,
- *   but they may not be subject to a later move, rotate, or deletion.
- *
  * - One of svn_editor_complete() or svn_editor_abort() must be called
  *   exactly once, which must be the final call the driver invokes.
  *   Invoking svn_editor_complete() must imply that the set of changes has
@@ -573,9 +565,9 @@ typedef svn_error_t *(*svn_editor_cb_alt
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
-  apr_hash_t *props,
   const svn_checksum_t *checksum,
   svn_stream_t *contents,
+  apr_hash_t *props,
   apr_pool_t *scratch_pool);
 
 /** @see svn_editor_alter_symlink(), svn_editor_t.
@@ -585,8 +577,8 @@ typedef svn_error_t *(*svn_editor_cb_alt
   void *baton,
   const char *relpath,
   svn_revnum_t revision,
-  apr_hash_t *props,
   const char *target,
+  apr_hash_t *props,
   apr_pool_t *scratch_pool);
 
 /** @see svn_editor_delete(), svn_editor_t.
@@ -620,15 +612,6 @@ typedef svn_error_t *(*svn_editor_cb_mov
   svn_revnum_t replaces_rev,
   apr_pool_t *scratch_pool);
 
-/** @see svn_editor_rotate(), svn_editor_t.
- * @since New in 1.8.
- */
-typedef svn_error_t *(*svn_editor_cb_rotate_t)(
-  void *baton,
-  const apr_array_header_t *relpaths,
-  const apr_array_header_t *revisions,
-  apr_pool_t *scratch_pool);
-
 /** @see svn_editor_complete(), svn_editor_t.
  * @since New in 1.8.
  */
@@ -790,17 +773,6 @@ svn_editor_setcb_move(svn_editor_t *edit
                       svn_editor_cb_move_t callback,
                       apr_pool_t *scratch_pool);
 
-/** Sets the #svn_editor_cb_rotate_t callback in @a editor
- * to @a callback.
- * @a scratch_pool is used for temporary allocations (if any).
- * @see also svn_editor_setcb_many().
- * @since New in 1.8.
- */
-svn_error_t *
-svn_editor_setcb_rotate(svn_editor_t *editor,
-                        svn_editor_cb_rotate_t callback,
-                        apr_pool_t *scratch_pool);
-
 /** Sets the #svn_editor_cb_complete_t callback in @a editor
  * to @a callback.
  * @a scratch_pool is used for temporary allocations (if any).
@@ -841,7 +813,6 @@ typedef struct svn_editor_cb_many_t
   svn_editor_cb_delete_t cb_delete;
   svn_editor_cb_copy_t cb_copy;
   svn_editor_cb_move_t cb_move;
-  svn_editor_cb_rotate_t cb_rotate;
   svn_editor_cb_complete_t cb_complete;
   svn_editor_cb_abort_t cb_abort;
 
@@ -1020,9 +991,9 @@ svn_error_t *
 svn_editor_alter_file(svn_editor_t *editor,
                       const char *relpath,
                       svn_revnum_t revision,
-                      apr_hash_t *props,
                       const svn_checksum_t *checksum,
-                      svn_stream_t *contents);
+                      svn_stream_t *contents,
+                      apr_hash_t *props);
 
 /** Drive @a editor's #svn_editor_cb_alter_symlink_t callback.
  *
@@ -1047,8 +1018,8 @@ svn_error_t *
 svn_editor_alter_symlink(svn_editor_t *editor,
                          const char *relpath,
                          svn_revnum_t revision,
-                         apr_hash_t *props,
-                         const char *target);
+                         const char *target,
+                         apr_hash_t *props);
 
 /** Drive @a editor's #svn_editor_cb_delete_t callback.
  *
@@ -1093,7 +1064,7 @@ svn_editor_copy(svn_editor_t *editor,
  * expect to find this node.  That is, @a src_relpath at the start of
  * the whole edit and @a src_relpath at @a src_revision must lie within
  * the same node-rev (aka history-segment).  This is just like the
- * revisions specified to svn_editor_delete() and svn_editor_rotate().
+ * revisions specified to svn_editor_delete().
  *
  * For a description of @a replaces_rev, see svn_editor_add_file().
  *
@@ -1110,36 +1081,6 @@ svn_editor_move(svn_editor_t *editor,
                 const char *dst_relpath,
                 svn_revnum_t replaces_rev);
 
-/** Drive @a editor's #svn_editor_cb_rotate_t callback.
- *
- * Perform a rotation among multiple nodes in the target tree.
- *
- * The @a relpaths and @a revisions arrays (pair-wise) specify nodes in the
- * tree which are located at a path and expected to be at a specific
- * revision. These nodes are simultaneously moved in a rotation pattern.
- * For example, the node at index 0 of @a relpaths and @a revisions will
- * be moved to the relpath specified at index 1 of @a relpaths. The node
- * at index 1 will be moved to the location at index 2. The node at index
- * N-1 will be moved to the relpath specified at index 0.
- *
- * The simplest form of this operation is to swap nodes A and B. One may
- * think to move A to a temporary location T, then move B to A, then move
- * T to B. However, this last move violations the Once Rule by moving T
- * (which had already by edited by the move from A). In order to keep the
- * restrictions against multiple moves of a single node, the rotation
- * operation is needed for certain types of tree edits.
- *
- * ### what happens if one of the paths of the rotation is not "within" the
- * ### receiver's set of paths?
- *
- * For all restrictions on driving the editor, see #svn_editor_t.
- * @since New in 1.8.
- */
-svn_error_t *
-svn_editor_rotate(svn_editor_t *editor,
-                  const apr_array_header_t *relpaths,
-                  const apr_array_header_t *revisions);
-
 /** Drive @a editor's #svn_editor_cb_complete_t callback.
  *
  * Send word that the edit has been completed successfully.

Modified: subversion/branches/cache-server/subversion/include/private/svn_io_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_io_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_io_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_io_private.h Tue Oct 15 08:52:06 2013
@@ -90,6 +90,11 @@ svn_stream__set_is_buffered(svn_stream_t
 svn_boolean_t
 svn_stream__is_buffered(svn_stream_t *stream);
 
+/** Return the underlying file, if any, associated with the stream, or
+ * NULL if not available.  Accessing the file bypasses the stream.
+ */
+apr_file_t *
+svn_stream__aprfile(svn_stream_t *stream);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/cache-server/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_mutex.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_mutex.h Tue Oct 15 08:52:06 2013
@@ -21,7 +21,7 @@
  * @endcopyright
  *
  * @file svn_mutex.h
- * @brief Strutures and functions for mutual exclusion
+ * @brief Structures and functions for mutual exclusion
  */
 
 #ifndef SVN_MUTEX_H
@@ -72,7 +72,7 @@ svn_mutex__init(svn_mutex__t **mutex,
  * thread to release the mutex again. Recursive locking are not supported.
  *
  * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock
- * aquisition and release.
+ * acquisition and release.
  */
 svn_error_t *
 svn_mutex__lock(svn_mutex__t *mutex);
@@ -88,19 +88,19 @@ svn_mutex__lock(svn_mutex__t *mutex);
  * reported in the return value.
  *
  * @note You should use #SVN_MUTEX__WITH_LOCK instead of explicit lock
- * aquisition and release.
+ * acquisition and release.
  */
 svn_error_t *
 svn_mutex__unlock(svn_mutex__t *mutex,
                   svn_error_t *err);
 
-/** Aquires the @a mutex, executes the expression @a expr and finally
+/** Acquires the @a mutex, executes the expression @a expr and finally
  * releases the @a mutex. If any of these steps fail, the function using
  * this macro will return an #svn_error_t. This macro guarantees that
  * the @a mutex will always be unlocked again if it got locked successfully
  * by the first step.
  *
- * @note Prefer using this macro instead of explicit lock aquisition and
+ * @note Prefer using this macro instead of explicit lock acquisition and
  * release.
  */
 #define SVN_MUTEX__WITH_LOCK(mutex, expr)               \

Modified: subversion/branches/cache-server/subversion/include/private/svn_ra_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_ra_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_ra_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_ra_private.h Tue Oct 15 08:52:06 2013
@@ -39,15 +39,23 @@
 extern "C" {
 #endif /* __cplusplus */
 
-/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error
-   message referencing PATH_OR_URL, if the "server" pointed to by
-   RA_SESSION doesn't support Merge Tracking (e.g. is pre-1.5).
-   Perform temporary allocations in POOL. */
+/* Equivalent to svn_ra__assert_capable_server()
+   for SVN_RA_CAPABILITY_MERGEINFO. */
 svn_error_t *
 svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session,
                                         const char *path_or_url,
                                         apr_pool_t *pool);
 
+/* Return an error with code SVN_ERR_UNSUPPORTED_FEATURE, and an error
+   message referencing PATH_OR_URL, if the "server" pointed to by
+   RA_SESSION doesn't support CAPABILITY (an SVN_RA_CAPABILITY_* constant).
+   Perform temporary allocations in POOL. */
+svn_error_t *
+svn_ra__assert_capable_server(svn_ra_session_t *ra_session,
+                              const char *capability,
+                              const char *path_or_url,
+                              apr_pool_t *pool);
+
 
 /*** Operational Locks ***/
 

Modified: subversion/branches/cache-server/subversion/include/private/svn_ra_svn_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_ra_svn_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_ra_svn_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_ra_svn_private.h Tue Oct 15 08:52:06 2013
@@ -83,6 +83,15 @@ svn_ra_svn__write_word(svn_ra_svn_conn_t
                        apr_pool_t *pool,
                        const char *word);
 
+/** Write a boolean over the net.
+ *
+ * Writes will be buffered until the next read or flush.
+ */
+svn_error_t *
+svn_ra_svn__write_boolean(svn_ra_svn_conn_t *conn,
+                          apr_pool_t *pool,
+                          svn_boolean_t value);
+
 /** Write a list of properties over the net.  @a props is allowed to be NULL,
  * in which case an empty list will be written out.
  *
@@ -186,6 +195,7 @@ svn_ra_svn__skip_leading_garbage(svn_ra_
      w     const char **          Word
      b     svn_boolean_t *        Word ("true" or "false")
      B     apr_uint64_t *         Word ("true" or "false")
+     3     svn_tristate_t *       Word ("true" or "false")
      l     apr_array_header_t **  List
      (                            Begin tuple
      )                            End tuple
@@ -196,14 +206,18 @@ svn_ra_svn__skip_leading_garbage(svn_ra_
  * the end of the specification.  So if @a fmt is "c?cc" and @a list
  * contains two elements, an error will result.
  *
- * 'B' is similar to 'b', but may be used in the optional tuple specification.
- * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
+ * '3' is similar to 'b', but may be used in the optional tuple specification.
+ * It returns #svn_tristate_true, #svn_tristate_false or #svn_tristate_unknown.
+ *
+ * 'B' is similar to '3', but it returns @c TRUE, @c FALSE, or
+ * #SVN_RA_SVN_UNSPECIFIED_NUMBER.  'B' is deprecated; new code should
+ * use '3' instead.
  *
  * If an optional part of a tuple contains no data, 'r' values will be
- * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
- * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
- * will be set to @c NULL.  'b' may not appear inside an optional
- * tuple specification; use 'B' instead.
+ * set to @c SVN_INVALID_REVNUM; 'n' and 'B' values will be set to
+ * #SVN_RA_SVN_UNSPECIFIED_NUMBER; 's', 'c', 'w', and 'l' values
+ * will be set to @c NULL; and '3' values will be set to #svn_tristate_unknown
+ * 'b' may not appear inside an optional tuple specification; use '3' instead.
  */
 svn_error_t *
 svn_ra_svn__parse_tuple(const apr_array_header_t *list,
@@ -819,6 +833,77 @@ svn_ra_svn__write_cmd_finish_replay(svn_
 /**
  * @}
  */
+
+/**
+ * @defgroup svn_send_data sending data structures over ra_svn
+ * @{
+ */
+
+/** Send a changed path (as part of transmitting a log entry) over connection
+ * @a conn.  Use @a pool for allocations.
+ *
+ * @see svn_log_changed_path2_t for a description of the other parameters.
+ */
+svn_error_t *
+svn_ra_svn__write_data_log_changed_path(svn_ra_svn_conn_t *conn,
+                                        apr_pool_t *pool,
+                                        const char *path,
+                                        char action,
+                                        const char *copyfrom_path,
+                                        svn_revnum_t copyfrom_rev,
+                                        svn_node_kind_t node_kind,
+                                        svn_boolean_t text_modified,
+                                        svn_boolean_t props_modified);
+
+/** Send a the details of a log entry (as part of transmitting a log entry
+ * and without revprops and changed paths) over connection @a conn.
+ * Use @a pool for allocations.
+ *
+ * @a author, @a date and @a message have been extracted and removed from
+ * the revprops to follow.  @a has_children is taken directly from the
+ * #svn_log_entry_t struct.  @a revision is too, except when it equals
+ * #SVN_INVALID_REVNUM.  In that case, @a revision must be 0 and
+ * @a invalid_revnum be set to TRUE.  @a revprop_count is the number of
+ * revprops that will follow in the revprops list.
+ */
+svn_error_t *
+svn_ra_svn__write_data_log_entry(svn_ra_svn_conn_t *conn,
+                                 apr_pool_t *pool,
+                                 svn_revnum_t revision,
+                                 const svn_string_t *author,
+                                 const svn_string_t *date,
+                                 const svn_string_t *message,
+                                 svn_boolean_t has_children,
+                                 svn_boolean_t invalid_revnum,
+                                 unsigned revprop_count);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup svn_read_data reading data structures from ra_svn
+ * @{
+ */
+
+/** Take the data tuple ITEMS received over ra_svn and convert it to the
+ * a changed path (as part of receiving a log entry).
+ *
+ * @see svn_log_changed_path2_t for a description of the output parameters.
+ */
+svn_error_t *
+svn_ra_svn__read_data_log_changed_entry(const apr_array_header_t *items,
+                                        svn_string_t **cpath,
+                                        const char **action,
+                                        const char **copy_path,
+                                        svn_revnum_t *copy_rev,
+                                        const char **kind_str,
+                                        apr_uint64_t *text_mods,
+                                        apr_uint64_t *prop_mods);
+/**
+ * @}
+ */
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/cache-server/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_repos_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_repos_private.h Tue Oct 15 08:52:06 2013
@@ -32,16 +32,28 @@
 #include "svn_types.h"
 #include "svn_repos.h"
 #include "svn_editor.h"
+#include "svn_config.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
 
-/** Validate that property @a name is valid for use in a Subversion
- * repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't.  For some
- * "svn:" properties, also validate the @a value, and return
- * @c SVN_ERR_BAD_PROPERTY_VALUE if it is not valid.
+/** Validate that property @a name with @a value is valid (as an addition
+ * or edit or deletion) in a Subversion repository.  Return an error if not.
+ *
+ * If @a value is NULL, return #SVN_NO_ERROR to indicate that any property
+ * may be deleted, even an invalid one.  Otherwise, if the @a name is not
+ * of kind #svn_prop_regular_kind (see #svn_prop_kind_t), return
+ * #SVN_ERR_REPOS_BAD_ARGS.  Otherwise, for some "svn:" properties, also
+ * perform some validations on the @a value (e.g., for such properties,
+ * typically the @a value must be in UTF-8 with LF linefeeds), and return
+ * #SVN_ERR_BAD_PROPERTY_VALUE if it is not valid.
+ *
+ * Validations may be added in future releases, for example, for
+ * newly-added #SVN_PROP_PREFIX properties.  However, user-defined
+ * (non-#SVN_PROP_PREFIX) properties will never have their @a value
+ * validated in any way.
  *
  * Use @a pool for temporary allocations.
  *
@@ -113,6 +125,66 @@ svn_repos__replay_ev2(svn_fs_root_t *roo
                       void *authz_read_baton,
                       apr_pool_t *scratch_pool);
 
+/* Given a PATH which might be a relative repo URL (^/), an absolute
+ * local repo URL (file://), an absolute path outside of the repo
+ * or a location in the Windows registry.
+ *
+ * Retrieve the configuration data that PATH points at and parse it into
+ * CFG_P allocated in POOL.
+ *
+ * If PATH cannot be parsed as a config file then an error is returned.  The
+ * contents of CFG_P is then undefined.  If MUST_EXIST is TRUE, a missing
+ * authz file is also an error.
+ *
+ * REPOS_ROOT points at the root of the repos you are
+ * going to apply the authz against, can be NULL if you are sure that you
+ * don't have a repos relative URL in PATH. */
+svn_error_t *
+svn_repos__retrieve_config(svn_config_t **cfg_p,
+                           const char *path,
+                           svn_boolean_t must_exist,
+                           apr_pool_t *pool);
+
+/**
+ * @defgroup svn_config_pool Configuration object pool API
+ * @{
+ */
+
+/* Opaque thread-safe factory and container for configuration objects.
+ *
+ * Instances handed out are read-only and may be given to multiple callers
+ * from multiple threads.  Configuration objects no longer referenced by
+ * any user may linger for a while before being cleaned up.
+ */
+typedef struct svn_repos__config_pool_t svn_repos__config_pool_t;
+
+/* Create a new configuration pool object with a minim lifetime determined
+ * by POOL and return it in *CONFIG_POOL.  References to any configuration
+ * in the *CONFIG_POOL will keep the latter alive beyond POOL cleanup.
+ */
+svn_error_t *
+svn_repos__config_pool_create(svn_repos__config_pool_t **config_pool,
+                              apr_pool_t *pool);
+
+/* Set *CFG to a read-only reference to the current contents of the
+ * configuration specified by PATH.  If the latter is a URL, we read the
+ * data from a local repository.  REGISTRY: urls are not supported.
+ * CONFIG_POOL will store the configuration and make further callers use
+ * the same instance if the content matches.
+ *
+ * POOL determines the minimum lifetime of *CFG.
+ *
+ * Note: The read-only behavior is not enforced, yet. 
+ */
+svn_error_t *
+svn_repos__config_pool_get(svn_config_t **cfg,
+                           svn_repos__config_pool_t *config_pool,
+                           const char *path,
+                           apr_pool_t *pool);
+
+/** @} */
+
+
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/cache-server/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_string_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_string_private.h Tue Oct 15 08:52:06 2013
@@ -136,6 +136,14 @@ svn_stringbuf__morph_into_string(svn_str
 apr_status_t
 svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
 
+/** Like strtoul but with a fixed base of 10 and without overflow checks.
+ * This allows the compiler to generate massively faster (4x on 64bit LINUX)
+ * code.  Overflow checks may be added on the caller side where you might
+ * want to test for a more specific value range anyway.
+ */
+unsigned long
+svn__strtoul(const char *buffer, const char **end);
+
 /** Number of chars needed to represent signed (19 places + sign + NUL) or
  * unsigned (20 places + NUL) integers as strings.
  */
@@ -167,6 +175,32 @@ svn__ui64toa_sep(apr_uint64_t number, ch
 char *
 svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
 
+
+/** Writes the @a number as base36-encoded string into @a dest. The latter
+ * must provide space for at least #SVN_INT64_BUFFER_SIZE characters.
+ * Returns the number chars written excluding the terminating NUL.
+ *
+ * @note The actual maximum buffer requirement is much shorter than
+ * #SVN_INT64_BUFFER_SIZE but introducing yet another constant is only
+ * marginally useful and may open the door to security issues when e.g.
+ * switching between base10 and base36 encoding.
+ */
+apr_size_t
+svn__ui64tobase36(char *dest, apr_uint64_t number);
+
+/** Returns the value of the base36 encoded unsigned integer starting at
+ * @a source.  If @a next is not NULL, @a *next will be set to the first
+ * position after the integer.
+ *
+ * The data in @a source will be considered part of the number to parse
+ * as long as the characters are within the base36 range.  If there are
+ * no such characters to begin with, 0 is returned.  Inputs with more than
+ * #SVN_INT64_BUFFER_SIZE digits will not be fully parsed, i.e. the value
+ * of @a *next as well as the return value are undefined.
+ */
+apr_uint64_t
+svn__base36toui64(const char **next, const char *source);
+
 /**
  * Computes the similarity score of STRA and STRB. Returns the ratio
  * of the length of their longest common subsequence and the average
@@ -210,6 +244,76 @@ svn_string__similarity(const svn_string_
                        svn_membuf_t *buffer, apr_size_t *rlcs);
 
 
+/* Return the lowest position at which A and B differ. If no difference
+ * can be found in the first MAX_LEN characters, MAX_LEN will be returned.
+ */
+apr_size_t
+svn_cstring__match_length(const char *a,
+                          const char *b,
+                          apr_size_t max_len);
+
+/* Return the number of bytes before A and B that don't differ.  If no
+ * difference can be found in the first MAX_LEN characters,  MAX_LEN will
+ * be returned.  Please note that A-MAX_LEN and B-MAX_LEN must both be
+ * valid addresses.
+ */
+apr_size_t
+svn_cstring__reverse_match_length(const char *a,
+                                  const char *b,
+                                  apr_size_t max_len);
+
+/** @} */
+
+/** Prefix trees.
+ *
+ * Prefix trees allow for a space-efficient representation of a set of path-
+ * like strings, i.e. those that share common prefixes.  Any given string
+ * value will be stored only once, i.e. two strings stored in the same tree
+ * are equal if and only if the point to the same #svn_prefix_string__t.
+ *
+ * @defgroup svn_prefix_string Strings in prefix trees.
+* @{
+ */
+
+/**
+ * Opaque data type for prefix-tree-based strings.
+ */
+typedef struct svn_prefix_string__t svn_prefix_string__t;
+
+/**
+ * Opaque data type representing a prefix tree
+ */
+typedef struct svn_prefix_tree__t svn_prefix_tree__t;
+
+/**
+ * Return a new prefix tree allocated in @a pool.
+ */
+svn_prefix_tree__t *
+svn_prefix_tree__create(apr_pool_t *pool);
+
+/**
+ * Return a string with the value @a s stored in @a tree.  If no such string
+ * exists yet, add it automatically.
+ */
+svn_prefix_string__t *
+svn_prefix_string__create(svn_prefix_tree__t *tree,
+                          const char *s);
+
+/**
+ * Return the contents of @a s as a new string object allocated in @a pool.
+ */
+svn_string_t *
+svn_prefix_string__expand(const svn_prefix_string__t *s,
+                          apr_pool_t *pool);
+
+/**
+ * Compare the two strings @a lhs and @a rhs that must be part of the same
+ * tree.
+ */
+int
+svn_prefix_string__compare(const svn_prefix_string__t *lhs,
+                           const svn_prefix_string__t *rhs);
+
 /** @} */
 
 /** @} */

Modified: subversion/branches/cache-server/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_subr_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_subr_private.h Tue Oct 15 08:52:06 2013
@@ -26,6 +26,7 @@
 
 #include "svn_types.h"
 #include "svn_io.h"
+#include "svn_config.h"
 
 
 #ifdef __cplusplus
@@ -94,11 +95,32 @@ svn_spillbuf__create(apr_size_t blocksiz
                      apr_size_t maxsize,
                      apr_pool_t *result_pool);
 
+/* Create a spill buffer, with extra parameters.  */
+svn_spillbuf_t *
+svn_spillbuf__create_extended(apr_size_t blocksize,
+                              apr_size_t maxsize,
+                              svn_boolean_t delete_on_close,
+                              svn_boolean_t spill_all_contents,
+                              const char* dirpath,
+                              apr_pool_t *result_pool);
 
 /* Determine how much content is stored in the spill buffer.  */
 svn_filesize_t
 svn_spillbuf__get_size(const svn_spillbuf_t *buf);
 
+/* Determine how much content the spill buffer is caching in memory.  */
+svn_filesize_t
+svn_spillbuf__get_memory_size(const svn_spillbuf_t *buf);
+
+/* Retreive the name of the spill file. The returned value can be NULL
+   if the file has not been created yet. */
+const char *
+svn_spillbuf__get_filename(const svn_spillbuf_t *buf);
+
+/* Retreive the handle of the spill file. The returned value can be
+   NULL if the file has not been created yet. */
+apr_file_t *
+svn_spillbuf__get_file(const svn_spillbuf_t *buf);
 
 /* Write some data into the spill buffer.  */
 svn_error_t *
@@ -158,7 +180,6 @@ svn_spillbuf__reader_create(apr_size_t b
                             apr_size_t maxsize,
                             apr_pool_t *result_pool);
 
-
 /* Read @a len bytes from @a reader into @a data. The number of bytes
    actually read is stored in @a amt. If the content is exhausted, then
    @a amt is set to zero. It will always be non-zero if the spill-buffer
@@ -195,8 +216,7 @@ svn_spillbuf__reader_write(svn_spillbuf_
    but implements the same basic sematics of a spillbuf for the underlying
    storage. */
 svn_stream_t *
-svn_stream__from_spillbuf(apr_size_t blocksize,
-                          apr_size_t maxsize,
+svn_stream__from_spillbuf(svn_spillbuf_t *buf,
                           apr_pool_t *result_pool);
 
 /** @} */
@@ -333,6 +353,116 @@ svn_version__at_least(svn_version_t *ver
 
 /** @} */
 
+/**
+ * @defgroup svn_compress Data (de-)compression API
+ * @{
+ */
+
+/* This is at least as big as the largest size of an integer that
+   svn__encode_uint() can generate; it is sufficient for creating buffers
+   for it to write into.  This assumes that integers are at most 64 bits,
+   and so 10 bytes (with 7 bits of information each) are sufficient to
+   represent them. */
+#define SVN__MAX_ENCODED_UINT_LEN 10
+
+/* Compression method parameters for svn__encode_uint. */
+
+/* No compression (but a length prefix will still be added to the buffer) */
+#define SVN__COMPRESSION_NONE         0
+
+/* Fastest, least effective compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_MIN     1
+
+/* Default compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_DEFAULT 5
+
+/* Slowest, best compression method & level provided by zlib. */
+#define SVN__COMPRESSION_ZLIB_MAX     9
+
+/* Encode VAL into the buffer P using the variable-length 7b/8b unsigned
+   integer format.  Return the incremented value of P after the
+   encoded bytes have been written.  P must point to a buffer of size
+   at least SVN__MAX_ENCODED_UINT_LEN.
+
+   This encoding uses the high bit of each byte as a continuation bit
+   and the other seven bits as data bits.  High-order data bits are
+   encoded first, followed by lower-order bits, so the value can be
+   reconstructed by concatenating the data bits from left to right and
+   interpreting the result as a binary number.  Examples (brackets
+   denote byte boundaries, spaces are for clarity only):
+
+           1 encodes as [0 0000001]
+          33 encodes as [0 0100001]
+         129 encodes as [1 0000001] [0 0000001]
+        2000 encodes as [1 0001111] [0 1010000]
+*/
+unsigned char *
+svn__encode_uint(unsigned char *p, apr_uint64_t val);
+
+/* Decode an unsigned 7b/8b-encoded integer into *VAL and return a pointer
+   to the byte after the integer.  The bytes to be decoded live in the
+   range [P..END-1].  If these bytes do not contain a whole encoded
+   integer, return NULL; in this case *VAL is undefined.
+
+   See the comment for svn__encode_uint() earlier in this file for more
+   detail on the encoding format.  */
+const unsigned char *
+svn__decode_uint(apr_uint64_t *val,
+                 const unsigned char *p,
+                 const unsigned char *end);
+
+/* Get the data from IN, compress it according to the specified
+ * COMPRESSION_METHOD and write the result to OUT.
+ * SVN__COMPRESSION_NONE is valid for COMPRESSION_METHOD.
+ */
+svn_error_t *
+svn__compress(svn_stringbuf_t *in,
+              svn_stringbuf_t *out,
+              int compression_method);
+
+/* Get the compressed data from IN, decompress it and write the result to
+ * OUT.  Return an error if the decompressed size is larger than LIMIT.
+ */
+svn_error_t *
+svn__decompress(svn_stringbuf_t *in,
+                svn_stringbuf_t *out,
+                apr_size_t limit);
+
+/** @} */
+
+/**
+ * @defgroup svn_root_pools Recycle-able root pools API
+ * @{
+ */
+
+/* Opaque thread-safe container for unused / recylcleable root pools.
+ *
+ * Recyling root pools (actually, their allocators) circumvents a
+ * scalability bottleneck in the OS memory management when multi-threaded
+ * applications frequently create and destroy allocators.
+ */
+typedef struct svn_root_pools__t svn_root_pools__t;
+
+/* Create a new root pools container and return it in *POOLS.
+ */
+svn_error_t *
+svn_root_pools__create(svn_root_pools__t **pools);
+
+/* Return a currently unused pool from POOLS.  If POOLS is empty, create a
+ * new root pool and return that.  The pool returned is not thread-safe.
+ */
+apr_pool_t *
+svn_root_pools__acquire_pool(svn_root_pools__t *pools);
+
+/* Clear and release the given root POOL and put it back into POOLS.
+ * If that fails, destroy POOL.
+ */
+void
+svn_root_pools__release_pool(apr_pool_t *pool,
+                             svn_root_pools__t *pools);
+
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/cache-server/subversion/include/private/svn_temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_temp_serializer.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_temp_serializer.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_temp_serializer.h Tue Oct 15 08:52:06 2013
@@ -143,6 +143,22 @@ void
 svn_temp_serializer__pop(svn_temp_serializer__context_t *context);
 
 /**
+ * Serialize a referenced sub-structure within the serialization
+ * @a context.  @a source_struct must be a reference to the
+ * pointer in the original parent structure so that the correspondence in
+ * the serialized structure can be established. @a struct_size must match
+ * the result of @c sizeof() of the actual structure.
+ *
+ * This function is equivalent but more efficient than calling
+ * #svn_temp_serializer__push() immediately followed by
+ * #svn_temp_serializer__pop().
+ */
+void
+svn_temp_serializer__add_leaf(svn_temp_serializer__context_t *context,
+                              const void * const * source_struct,
+                              apr_size_t struct_size);
+
+/**
  * Serialize a string referenced from the current structure within the
  * serialization @a context. @a s must be a reference to the @c char*
  * pointer in the original structure so that the correspondence in the

Modified: subversion/branches/cache-server/subversion/include/private/svn_utf_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_utf_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_utf_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_utf_private.h Tue Oct 15 08:52:06 2013
@@ -21,7 +21,7 @@
  * @endcopyright
  *
  * @file svn_utf_private.h
- * @brief UTF validation routines
+ * @brief UTF validation and normalization routines
  */
 
 #ifndef SVN_UTF_PRIVATE_H
@@ -31,6 +31,8 @@
 #include <apr_pools.h>
 
 #include "svn_types.h"
+#include "svn_string.h"
+#include "svn_string_private.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -71,6 +73,18 @@ svn_utf__last_valid(const char *src, apr
 const char *
 svn_utf__last_valid2(const char *src, apr_size_t len);
 
+/* Copy LENGTH bytes of SRC, converting characters as follows:
+    - Pass characters from the ASCII subset to the result
+    - Strip all combining marks from the string
+    - Represent other valid Unicode chars as {U+XXXX}
+    - Replace invalid Unicode chars with {U?XXXX}
+    - Represent chars that are not valid UTF-8 as ?\XX
+    - Replace codes outside the Unicode range with a sequence of ?\XX
+    - Represent the null byte as \0
+   Allocate the result in POOL. */
+const char *
+svn_utf__fuzzy_escape(const char *src, apr_size_t length, apr_pool_t *pool);
+
 const char *
 svn_utf__cstring_from_utf8_fuzzy(const char *src,
                                  apr_pool_t *pool,
@@ -79,6 +93,65 @@ svn_utf__cstring_from_utf8_fuzzy(const c
                                                const char *,
                                                apr_pool_t *));
 
+/* A constant used for many length parameters in the utf8proc wrappers
+ * to indicate that the length of a string is unknonw. */
+#define SVN_UTF__UNKNOWN_LENGTH ((apr_size_t) -1)
+
+
+/* Compare two UTF-8 strings, ignoring normalization, using buffers
+ * BUF1 and BUF2 for temporary storage. If either of LEN1 or LEN2 is
+ * SVN_UTF__UNKNOWN_LENGTH, assume the associated string is
+ * null-terminated; otherwise, consider the string only up to the
+ * given length.
+ *
+ * Return compare value in *RESULT.
+ */
+svn_error_t *
+svn_utf__normcmp(int *result,
+                 const char *str1, apr_size_t len1,
+                 const char *str2, apr_size_t len2,
+                 svn_membuf_t *buf1, svn_membuf_t *buf2);
+
+/* Check if STRING is a valid, NFC-normalized UTF-8 string.  Note that
+ * a FALSE return value may indicate that STRING is not valid UTF-8 at
+ * all.
+ *
+ * Use SCRATCH_POOL for temporary allocations.
+ */
+svn_boolean_t
+svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool);
+
+/* Pattern matching similar to the the SQLite LIKE and GLOB
+ * operators. PATTERN, KEY and ESCAPE must all point to UTF-8
+ * strings. Furthermore, ESCAPE, if provided, must be a character from
+ * the ASCII subset.
+ *
+ * If any of PATTERN_LEN, STRING_LEN or ESCAPE_LEN are
+ * SVN_UTF__UNKNOWN_LENGTH, assume the associated string is
+ * null-terminated; otherwise, consider the string only up to the
+ * given length.
+ *
+ * Use buffers PATTERN_BUF, STRING_BUF and TEMP_BUF for temporary storage.
+ *
+ * If SQL_LIKE is true, interpret PATTERN as a pattern used by the SQL
+ * LIKE operator and notice ESCAPE. Otherwise it's a Unix fileglob
+ * pattern, and ESCAPE must be NULL.
+ *
+ * Set *MATCH to the result of the comparison.
+*/
+svn_error_t *
+svn_utf__glob(svn_boolean_t *match,
+              const char *pattern, apr_size_t pattern_len,
+              const char *string, apr_size_t string_len,
+              const char *escape, apr_size_t escape_len,
+              svn_boolean_t sql_like,
+              svn_membuf_t *pattern_buf,
+              svn_membuf_t *string_buf,
+              svn_membuf_t *temp_buf);
+
+/* Return the version of the wrapped utf8proc library. */
+const char *
+svn_utf__utf8proc_version(void);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/cache-server/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/private/svn_wc_private.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/cache-server/subversion/include/private/svn_wc_private.h Tue Oct 15 08:52:06 2013
@@ -293,7 +293,7 @@ svn_wc__close_db(const char *external_ab
  * use @a scratch_pool for temporary allocations.
  */
 svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
                           svn_wc_context_t *wc_ctx,
                           const char *victim_abspath,
                           apr_pool_t *result_pool,
@@ -311,7 +311,7 @@ svn_wc__get_tree_conflict(const svn_wc_c
  */
 svn_error_t *
 svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
-                          const svn_wc_conflict_description2_t *conflict,
+                          const svn_wc_conflict_description3_t *conflict,
                           apr_pool_t *scratch_pool);
 
 /* Remove any tree conflict on victim @a victim_abspath using @a wc_ctx.
@@ -354,6 +354,25 @@ svn_wc__get_wcroot(const char **wcroot_a
  * before the 1.7 release.
  */
 
+/*
+ * Convert from svn_wc_conflict_description3_t to
+ * svn_wc_conflict_description2_t.
+ *
+ * Allocate the result in RESULT_POOL.
+ */
+svn_wc_conflict_description2_t *
+svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
+                   apr_pool_t *result_pool);
+
+/*
+ * Convert an array of svn_wc_conflict_description3_t * elements to an
+ * array of * svn_wc_conflict_description2_t * elements.
+ *
+ * Allocate the result in RESULT_POOL.
+ */
+apr_array_header_t *
+svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
+                               apr_pool_t *result_pool);
 
 /*
  * Convert from svn_wc_conflict_description2_t to
@@ -370,7 +389,11 @@ svn_wc__cd2_to_cd(const svn_wc_conflict_
 /*
  * Convert from svn_wc_status3_t to svn_wc_status2_t.
  * Allocate the result in RESULT_POOL.
+ *
+ * Deprecated because svn_wc_status2_t is deprecated and the only
+ * calls are from other deprecated functions.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_wc__status2_from_3(svn_wc_status2_t **status,
                        const svn_wc_status3_t *old_status,

Modified: subversion/branches/cache-server/subversion/include/svn_auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_auth.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_auth.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_auth.h Tue Oct 15 08:52:06 2013
@@ -569,11 +569,11 @@ svn_auth_get_parameter(svn_auth_baton_t 
 
 /**
  * @name Default credentials defines
- * Any 'default' credentials that came in through the application itself,
- * (e.g. --username and --password options). Property values are
- * const char *.
+ * Property values are const char *.
  * @{ */
+/** Default username provided by the application itself (e.g. --username) */
 #define SVN_AUTH_PARAM_DEFAULT_USERNAME  SVN_AUTH_PARAM_PREFIX "username"
+/** Default password provided by the application itself (e.g. --password) */
 #define SVN_AUTH_PARAM_DEFAULT_PASSWORD  SVN_AUTH_PARAM_PREFIX "password"
 /** @} */
 
@@ -628,9 +628,15 @@ svn_auth_get_parameter(svn_auth_baton_t 
 #define SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO SVN_AUTH_PARAM_PREFIX \
   "ssl:cert-info"
 
-/** Some providers need access to the @c svn_config_t configuration. */
-#define SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG SVN_AUTH_PARAM_PREFIX "config-category-config"
-#define SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS SVN_AUTH_PARAM_PREFIX "config-category-servers"
+/** This provides a pointer to a @c svn_config_t containting the config
+ * category. */
+#define SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG SVN_AUTH_PARAM_PREFIX \
+  "config-category-config"
+
+/** This provides a pointer to a @c svn_config_t containting the servers
+ * category. */
+#define SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS SVN_AUTH_PARAM_PREFIX \
+  "config-category-servers"
 
 /** @deprecated Provided for backward compatibility with the 1.5 API. */
 #define SVN_AUTH_PARAM_CONFIG SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS

Modified: subversion/branches/cache-server/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_client.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_client.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_client.h Tue Oct 15 08:52:06 2013
@@ -1014,6 +1014,46 @@ typedef struct svn_client_ctx_t
    * @since New in 1.7.  */
   svn_wc_context_t *wc_ctx;
 
+  /** Total number of bytes transferred over network.
+   *
+   * @Since New in 1.9. */
+  apr_off_t progress;
+
+  /** Check-tunnel callback
+   *
+   * If not @c NULL, and open_tunnel_func is also not @c NULL, this
+   * callback will be invoked to check if open_tunnel_func should be
+   * used to create a specific tunnel, or if the default tunnel
+   * implementation (either built-in or configured in the client
+   * configuration file) should be used instead.
+   * @since New in 1.9.
+   */
+  svn_ra_check_tunnel_func_t check_tunnel_func;
+
+  /** Open-tunnel callback
+   *
+   * If not @c NULL, this callback will be invoked to create a tunnel
+   * for a ra_svn connection that needs one, overriding any tunnel
+   * definitions in the client config file. This callback is used only
+   * for ra_svn and ignored by the other RA modules.
+   * @since New in 1.9.
+   */
+  svn_ra_open_tunnel_func_t open_tunnel_func;
+
+  /** Close-tunnel callback
+   *
+   * If not @c NULL, this callback will be invoked when the pool that
+   * owns the connection created by the open_tunnel callback is
+   * cleared or destroyed. This callback is used only for ra_svn and
+   * ignored by the other RA modules.
+   * @since New in 1.9.
+   */
+  svn_ra_close_tunnel_func_t close_tunnel_func;
+
+  /** A baton used with open_tunnel_func and close_tunnel_func.
+   * @since New in 1.9.
+   */
+  void *tunnel_baton;
 } svn_client_ctx_t;
 
 /** Initialize a client context.
@@ -2655,6 +2695,9 @@ svn_client_status(svn_revnum_t *result_r
  *
  * If @a include_merged_revisions is set, log information for revisions
  * which have been merged to @a targets will also be returned.
+ * 
+ * @a move_behavior will control which changes will be reported as moves
+ * instead of additions and vice versa.
  *
  * If @a revprops is NULL, retrieve all revision properties; else, retrieve
  * only the revision properties named by the (const char *) array elements
@@ -2665,8 +2708,31 @@ svn_client_status(svn_revnum_t *result_r
  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
  * with a 'skip' signal on any unversioned targets.
  *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_log6(const apr_array_header_t *targets,
+                const svn_opt_revision_t *peg_revision,
+                const apr_array_header_t *revision_ranges,
+                int limit,
+                svn_boolean_t discover_changed_paths,
+                svn_boolean_t strict_node_history,
+                svn_boolean_t include_merged_revisions,
+                svn_move_behavior_t move_behavior,
+                const apr_array_header_t *revprops,
+                svn_log_entry_receiver_t receiver,
+                void *receiver_baton,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *pool);
+
+/**
+ * Similar to svn_client_log6(), but with @a move_behavior set to
+ * #svn_move_behavior_no_moves.
+ *
+ * @deprecated Provided for compatibility with the 1.8 API.
  * @since New in 1.6.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_log5(const apr_array_header_t *targets,
                 const svn_opt_revision_t *peg_revision,
@@ -2814,6 +2880,11 @@ svn_client_log(const apr_array_header_t 
  * in which case blame information will be generated regardless of the
  * MIME types of the revisions.
  *
+ * @a start may resolve to a revision number greater (younger) than @a end
+ * only if the server is 1.8.0 or greater (supports
+ * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or
+ * newer.
+ *
  * Use @a diff_options to determine how to compare different revisions of the
  * target.
  *
@@ -4020,12 +4091,41 @@ svn_client_mergeinfo_log_eligible(const 
 /** Recursively cleanup a working copy directory @a dir, finishing any
  * incomplete operations, removing lockfiles, etc.
  *
+ * If @a include_externals is @c TRUE, recurse into externals and clean
+ * them up as well.
+ *
+ * If @a remove_unversioned_items is @c TRUE, remove unversioned items
+ * in @a dir after successfull working copy cleanup.
+ * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items
+ * in @a dir after successfull working copy cleanup.
+ *
+ * When asked to remove unversioned or ignored items, and the working copy
+ * is already locked via a different client or WC context than @a ctx, return
+ * #SVN_ERR_WC_LOCKED. This prevents accidental working copy corruption in
+ * case users run the cleanup operation to remove unversioned items while
+ * another client is performing some other operation on the working copy.
+ *
  * If @a ctx->cancel_func is non-NULL, invoke it with @a
  * ctx->cancel_baton at various points during the operation.  If it
  * returns an error (typically #SVN_ERR_CANCELLED), return that error
  * immediately.
  *
  * Use @a scratch_pool for any temporary allocations.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_client_cleanup2(const char *dir,
+                    svn_boolean_t include_externals,
+                    svn_boolean_t remove_unversioned_items,
+                    svn_boolean_t remove_ignored_items,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *scratch_pool);
+
+/* Like svn_client_cleanup2(), but no support for removing unversioned items
+ * and cleaning up externals.
+ *
+ * @deprecated Provided for limited backwards compatibility with the 1.8 API.
  */
 svn_error_t *
 svn_client_cleanup(const char *dir,
@@ -6457,7 +6557,7 @@ svn_client_open_ra_session2(svn_ra_sessi
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
-/** Similar to svn_client_open_ra_session(), but with @ wri_abspath
+/** Similar to svn_client_open_ra_session2(), but with @ wri_abspath
  * always passed as NULL, and with the same pool used as both @a
  * result_pool and @a scratch_pool.
  *

Modified: subversion/branches/cache-server/subversion/include/svn_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_compat.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_compat.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_compat.h Tue Oct 15 08:52:06 2013
@@ -32,6 +32,7 @@
 #include <apr_tables.h>
 
 #include "svn_types.h"
+#include "svn_string.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -75,6 +76,17 @@ svn_compat_log_revprops_in(apr_pool_t *p
  * revprops is NULL, all return values are NULL.  Any return value may be
  * NULL if the corresponding property is not set in @a revprops.
  *
+ * @since New in 1.9.
+ */
+void
+svn_compat_log_revprops_out_string(const svn_string_t **author,
+                                   const svn_string_t **date,
+                                   const svn_string_t **message,
+                                   apr_hash_t *revprops);
+
+/** Simiar to #svn_compat_log_revprops_out2 but returns C-style strings
+ * instead of #svn_string_t.
+ *
  * @since New in 1.5.
  */
 void

Modified: subversion/branches/cache-server/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_config.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_config.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_config.h Tue Oct 15 08:52:06 2013
@@ -95,6 +95,8 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES         "http-bulk-updates"
 /** @since New in 1.8. */
 #define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS      "http-max-connections"
+/** @since New in 1.9. */
+#define SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS     "http-chunked-requests"
 
 #define SVN_CONFIG_CATEGORY_CONFIG          "config"
 #define SVN_CONFIG_SECTION_AUTH                 "auth"
@@ -125,6 +127,8 @@ typedef struct svn_config_t svn_config_t
 #define SVN_CONFIG_OPTION_PRESERVED_CF_EXTS         "preserved-conflict-file-exts"
 #define SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS     "interactive-conflicts"
 #define SVN_CONFIG_OPTION_MEMORY_CACHE_SIZE         "memory-cache-size"
+/** @since New in 1.9. */
+#define SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE  "diff-ignore-content-type"
 #define SVN_CONFIG_SECTION_TUNNELS              "tunnels"
 #define SVN_CONFIG_SECTION_AUTO_PROPS           "auto-props"
 /** @since New in 1.8. */
@@ -168,10 +172,12 @@ typedef struct svn_config_t svn_config_t
 /* We want this to be printed on two lines in the generated config file,
  * but we don't want the # character to end up in the variable.
  */
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
   "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
 #define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
   "*.rej *~ #*# .#* .*.swp .DS_Store"
+#endif
 
 #define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
   SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 " " \
@@ -247,7 +253,7 @@ svn_config_create(svn_config_t **cfgp,
  * otherwise return an empty @c svn_config_t.
  *
  * If @a section_names_case_sensitive is @c TRUE, populate section name hashes
- * case sensitively, except for the default #SVN_CONFIG__DEFAULT_SECTION.
+ * case sensitively, except for the @c "DEFAULT" section.
  *
  * If @a option_names_case_sensitive is @c TRUE, populate option name hashes
  * case sensitively.
@@ -292,7 +298,7 @@ svn_config_read(svn_config_t **cfgp,
  * @a result_pool.
  *
  * If @a section_names_case_sensitive is @c TRUE, populate section name hashes
- * case sensitively, except for the default #SVN_CONFIG__DEFAULT_SECTION.
+ * case sensitively, except for the @c "DEFAULT" section.
  *
  * If @a option_names_case_sensitive is @c TRUE, populate option name hashes
  * case sensitively.
@@ -721,7 +727,7 @@ svn_config_write_auth_data(apr_hash_t *h
  */
 typedef svn_error_t *
 (*svn_config_auth_walk_func_t)(svn_boolean_t *delete_cred,
-                               void *cleanup_baton,
+                               void *walk_baton,
                                const char *cred_kind,
                                const char *realmstring,
                                apr_hash_t *hash,
@@ -732,6 +738,12 @@ typedef svn_error_t *
  * under @a config_dir.  If the callback sets its delete_cred return
  * flag, delete the associated credential.
  *
+ * If @a config_dir is not NULL, it must point to an alternative
+ * config directory location. If it is NULL, the default location
+ * is used.
+ *
+ * @note @a config_dir may only be NULL in 1.8.2 and later.
+ *
  * @note Removing credentials from the config-based disk store will
  * not purge them from any open svn_auth_baton_t instance.  Consider
  * using svn_auth_forget_credentials() -- from the @a cleanup_func,

Modified: subversion/branches/cache-server/subversion/include/svn_dirent_uri.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_dirent_uri.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_dirent_uri.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_dirent_uri.h Tue Oct 15 08:52:06 2013
@@ -646,8 +646,8 @@ svn_dirent_skip_ancestor(const char *par
 
 /** Return the relative path part of @a child_relpath that is below
  * @a parent_relpath, or just "" if @a parent_relpath is equal to
- * @a child_relpath. If @a child_relpath is not below or equal to
- * @a parent_relpath, return NULL.
+ * @a child_relpath. If @a child_relpath is not below @a parent_relpath,
+ * return NULL.
  *
  * @since New in 1.7.
  */
@@ -657,7 +657,7 @@ svn_relpath_skip_ancestor(const char *pa
 
 /** Return the URI-decoded relative path of @a child_uri that is below
  * @a parent_uri, or just "" if @a parent_uri is equal to @a child_uri. If
- * @a child_uri is not below or equal to @a parent_uri, return NULL.
+ * @a child_uri is not below @a parent_uri, return NULL.
  *
  * Allocate the result in @a result_pool.
  *

Modified: subversion/branches/cache-server/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_error.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_error.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_error.h Tue Oct 15 08:52:06 2013
@@ -439,7 +439,7 @@ svn_error_t *svn_error_purge_tracing(svn
    err->apr_err == SVN_ERR_RA_NOT_LOCKED ||                 \
    err->apr_err == SVN_ERR_FS_LOCK_EXPIRED)
 
-/** Evaluates to @c TRUE iff @a apr_err (of type #apr_status_t) is in the given
+/** Evaluates to @c TRUE iff @a apr_err (of type apr_status_t) is in the given
  * @a category, which should be one of the @c SVN_ERR_*_CATEGORY_START
  * constants.
  *
@@ -491,22 +491,10 @@ svn_error_t *svn_error_purge_tracing(svn
     abort();                                                 \
   } while (1)
 
-/** Check that a condition is true: if not, report an error (appending
- * ERR if non-NULL) and possibly terminate the program.
+/** Like SVN_ERR_ASSERT(), but append ERR to the returned error chain.
  *
- * If the boolean expression @a expr is true, do nothing. Otherwise,
- * act as determined by the current "malfunction handler" which may have
- * been specified by a call to svn_error_set_malfunction_handler() or else
- * is the default handler as specified in that function's documentation. If
- * the malfunction handler returns, then cause the function using this macro
- * to return the error object that it generated.
- *
- * @note The intended use of this macro is to check a condition that cannot
- * possibly be false unless there is a bug in the program.
- *
- * @note The condition to be checked should not be computationally expensive
- * if it is reached often, as, unlike traditional "assert" statements, the
- * evaluation of this expression is not compiled out in release-mode builds.
+ * If EXPR is false, return a malfunction error whose chain includes ERR.
+ * If EXPR is true, do nothing.  (In particular, this does not clear ERR.)
  *
  * Types: (svn_boolean_t expr, svn_error_t *err)
  *
@@ -527,13 +515,38 @@ svn_error_t *svn_error_purge_tracing(svn
   } while (0)
 #endif
 
-/** Like SVN_ERR_ASSERT_E(), but with @a err always NULL.
+
+/** Check that a condition is true: if not, report an error and possibly
+ * terminate the program.
  *
- * @see SVN_ERR_ASSERT_E()
+ * If the Boolean expression @a expr is true, do nothing. Otherwise,
+ * act as determined by the current "malfunction handler" which may have
+ * been specified by a call to svn_error_set_malfunction_handler() or else
+ * is the default handler as specified in that function's documentation. If
+ * the malfunction handler returns, then cause the function using this macro
+ * to return the error object that it generated.
+ *
+ * @note The intended use of this macro is to check a condition that cannot
+ * possibly be false unless there is a bug in the program.
+ *
+ * @note The condition to be checked should not be computationally expensive
+ * if it is reached often, as, unlike traditional "assert" statements, the
+ * evaluation of this expression is not compiled out in release-mode builds.
  *
  * @since New in 1.6.
+ *
+ * @see SVN_ERR_ASSERT_E()
  */
-#define SVN_ERR_ASSERT(expr)       SVN_ERR_ASSERT_E(expr, NULL)
+#ifdef __clang_analyzer__
+#include <assert.h>
+#define SVN_ERR_ASSERT(expr)       assert((expr))
+#else
+#define SVN_ERR_ASSERT(expr)                                            \
+  do {                                                                  \
+    if (!(expr))                                                        \
+      SVN_ERR(svn_error__malfunction(TRUE, __FILE__, __LINE__, #expr)); \
+  } while (0)
+#endif
 
 /** Similar to SVN_ERR_ASSERT(), but without the option of returning
  * an error to the calling function.
@@ -613,6 +626,11 @@ typedef svn_error_t *(*svn_error_malfunc
 svn_error_malfunction_handler_t
 svn_error_set_malfunction_handler(svn_error_malfunction_handler_t func);
 
+/** Return the malfunction handler that is currently in effect.
+ * @since New in 1.9. */
+svn_error_malfunction_handler_t
+svn_error_get_malfunction_handler(void);
+
 /** Handle a malfunction by returning an error object that describes it.
  *
  * When @a can_return is false, abort()

Modified: subversion/branches/cache-server/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_error_codes.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_error_codes.h Tue Oct 15 08:52:06 2013
@@ -233,6 +233,11 @@ SVN_ERROR_START
              SVN_ERR_BAD_CATEGORY_START + 15,
              "Invalid atomic")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_BAD_COMPRESSION_METHOD,
+             SVN_ERR_BAD_CATEGORY_START + 16,
+             "Invalid compression method")
+
   /* xml errors */
 
   SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
@@ -255,6 +260,11 @@ SVN_ERROR_START
              SVN_ERR_XML_CATEGORY_START + 4,
              "Data cannot be safely XML-escaped")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_XML_UNEXPECTED_ELEMENT,
+             SVN_ERR_XML_CATEGORY_START + 5,
+             "Unexpected XML element found")
+
   /* io errors */
 
   SVN_ERRDEF(SVN_ERR_IO_INCONSISTENT_EOL,
@@ -796,6 +806,46 @@ SVN_ERROR_START
              SVN_ERR_FS_CATEGORY_START + 52,
              "Could not initialize the revprop caching infrastructure.")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_MALFORMED_TXN_ID,
+             SVN_ERR_FS_CATEGORY_START + 53,
+             "Malformed transaction ID string.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_ITEM_INDEX_CORRUPTION,
+             SVN_ERR_FS_CATEGORY_START + 54,
+             "Corrupt index file.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_ITEM_INDEX_REVISION,
+             SVN_ERR_FS_CATEGORY_START + 55,
+             "Revision not covered by index.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_ITEM_INDEX_OVERFLOW,
+             SVN_ERR_FS_CATEGORY_START + 56,
+             "Item index too large for this revision.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_CONTAINER_INDEX,
+             SVN_ERR_FS_CATEGORY_START + 57,
+             "Container index out of range.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_ITEM_INDEX_INCONSISTENT,
+             SVN_ERR_FS_CATEGORY_START + 58,
+             "Index files are inconsistent.")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_AMBIGUOUS_MOVE,
+             SVN_ERR_FS_CATEGORY_START + 59,
+             "Ambiguous move")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_INCOMPLETE_MOVE,
+             SVN_ERR_FS_CATEGORY_START + 60,
+             "Move without a suitable deletion")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,
@@ -850,6 +900,11 @@ SVN_ERROR_START
              SVN_ERR_REPOS_CATEGORY_START + 10,
              "Repository upgrade is not supported")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_REPOS_CORRUPTED,
+             SVN_ERR_REPOS_CATEGORY_START + 11,
+             "Repository is corrupt")
+
   /* generic RA errors */
 
   SVN_ERRDEF(SVN_ERR_RA_ILLEGAL_URL,
@@ -1275,7 +1330,7 @@ SVN_ERROR_START
   /** @since New in 1.6. */
   SVN_ERRDEF(SVN_ERR_NO_APR_MEMCACHE,
              SVN_ERR_MISC_CATEGORY_START + 28,
-             "apr memcache library not available")
+             "APR memcache library not available")
 
   /** @since New in 1.6. */
   SVN_ERRDEF(SVN_ERR_ATOMIC_INIT_FAILURE,
@@ -1330,6 +1385,21 @@ SVN_ERROR_START
              SVN_ERR_MISC_CATEGORY_START + 38,
              "Atomic data storage is corrupt")
 
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_UTF8PROC_ERROR,
+             SVN_ERR_MISC_CATEGORY_START + 39,
+             "utf8proc library error")
+
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_UTF8_GLOB,
+             SVN_ERR_MISC_CATEGORY_START + 40,
+             "Bad arguments to SQL operators GLOB or LIKE")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_CORRUPT_PACKED_DATA,
+             SVN_ERR_MISC_CATEGORY_START + 41,
+             "Packed data stream is corrupt")
+
   /* command-line client errors */
 
   SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,

Modified: subversion/branches/cache-server/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_fs.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_fs.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_fs.h Tue Oct 15 08:52:06 2013
@@ -121,6 +121,16 @@ typedef struct svn_fs_t svn_fs_t;
 /** @since New in 1.1. */
 #define SVN_FS_TYPE_FSFS                        "fsfs"
 
+/**
+ * EXPERIMENTAL filesystem backend.
+ *
+ * It is not ready for general production use.  Please consult the
+ * respective release notes on suggested usage scenarios.
+ * 
+ * @since New in 1.9.
+ */
+#define SVN_FS_TYPE_FSX                         "fsx"
+
 /** Create repository format compatible with Subversion versions
  * earlier than 1.4.
  *
@@ -148,6 +158,18 @@ typedef struct svn_fs_t svn_fs_t;
  * @since New in 1.8.
  */
 #define SVN_FS_CONFIG_PRE_1_8_COMPATIBLE        "pre-1.8-compatible"
+
+/** Create repository format compatible with Subversion versions
+ * earlier than 1.9.  The value must be a version in the same format
+ * as #SVN_VER_NUMBER.
+ *
+ * @note The @c patch component would often be ignored, due to our forward
+ * compatibility promises within minor release lines.  It should therefore
+ * usually be set to @c 0.
+ *
+ * @since New in 1.9.
+ */
+#define SVN_FS_CONFIG_COMPATIBLE_VERSION        "compatible-version"
 /** @} */
 
 
@@ -222,6 +244,7 @@ svn_fs_set_warning_func(svn_fs_t *fs,
  *
  *   SVN_FS_TYPE_BDB   Berkeley-DB implementation
  *   SVN_FS_TYPE_FSFS  Native-filesystem implementation
+ *   SVN_FS_TYPE_FSX   Experimental filesystem implementation
  *
  * If @a fs_config is @c NULL or does not contain a value for
  * #SVN_FS_CONFIG_FS_TYPE then the default filesystem type will be used.
@@ -264,6 +287,38 @@ svn_fs_open(svn_fs_t **fs_p,
             apr_hash_t *fs_config,
             apr_pool_t *pool);
 
+/** The kind of action being taken by 'upgrade'.
+ *
+ * @since New in 1.9.
+ */
+typedef enum svn_fs_upgrade_notify_action_t
+{
+  /** Packing of the revprop shard has completed.
+   *  The number parameter is the shard being processed. */
+  svn_fs_upgrade_pack_revprops = 0,
+
+  /** Removal of the non-packed revprop shard is completed.
+   *  The number parameter is the shard being processed */
+  svn_fs_upgrade_cleanup_revprops,
+
+  /** DB format has been set to the new value.
+   *  The number parameter is the new format number. */
+  svn_fs_upgrade_format_bumped
+} svn_fs_upgrade_notify_action_t;
+
+/** The type of a upgrade notification function.  @a number is specifc 
+ * to @a action (see #svn_fs_upgrade_notify_action_t); @a action is the
+ * type of action being performed.  @a baton is the corresponding baton
+ * for the notification function, and @a pool can be used for temporary
+ * allocations, but will be cleared between invocations.
+ * 
+ * @since New in 1.9.
+ */
+typedef svn_error_t *(*svn_fs_upgrade_notify_t)(void *baton,
+                                      apr_uint64_t number,
+                                      svn_fs_upgrade_notify_action_t action,
+                                      apr_pool_t *pool);
+
 /**
  * Upgrade the Subversion filesystem located in the directory @a path
  * to the latest version supported by this library.  Return
@@ -271,11 +326,37 @@ svn_fs_open(svn_fs_t **fs_p,
  * filesystem if the requested upgrade is not supported.  Use @a pool
  * for necessary allocations.
  *
+ * The optional @a notify_func callback is only a general feedback that
+ * the operation is still in process but may be called in e.g. random shard
+ * order and more than once for the same shard.
+ *
+ * The optional @a cancel_func callback will be invoked as usual to allow
+ * the user to preempt this potentially lengthy operation.
+ *
  * @note You probably don't want to use this directly.  Take a look at
  * svn_repos_upgrade() instead.
  *
+ * @note Canceling an upgrade is legal but may leave remnants of previous
+ * format data that may not be cleaned up automatically by later calls.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_fs_upgrade2(const char *path,
+                svn_fs_upgrade_notify_t notify_func,
+                void *notify_baton,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
+                apr_pool_t *pool);
+
+/**
+ * Like svn_fs_upgrade2 but with notify_func, notify_baton, cancel_func
+ * and cancel_baton being set to NULL.
+ *
+ * @deprecated Provided for backward compatibility with the 1.8 API. 
  * @since New in 1.5.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_fs_upgrade(const char *path,
                apr_pool_t *pool);
@@ -962,6 +1043,19 @@ svn_fs_begin_txn(svn_fs_txn_t **txn_p,
  * ###     conflict string
  * ###   *new_rev will always be initialized to SVN_INVALID_REVNUM, or
  * ###     to a valid, committed revision number
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_fs_commit_txn2(const char **conflict_p,
+                   svn_revnum_t *new_rev,
+                   svn_fs_txn_t *txn,
+                   svn_boolean_t set_timestamp,
+                   apr_pool_t *pool);
+
+/*
+ * Same as svn_fs_commit_txn2(), but with @a set_timestamp
+ * always set to @c TRUE.
  */
 svn_error_t *
 svn_fs_commit_txn(const char **conflict_p,
@@ -1217,7 +1311,13 @@ typedef enum svn_fs_path_change_kind_t
   svn_fs_path_change_replace,
 
   /** ignore all previous change items for path (internal-use only) */
-  svn_fs_path_change_reset
+  svn_fs_path_change_reset,
+
+  /** moved to this path in txn */
+  svn_fs_path_change_move,
+
+  /** path removed and replaced by moved path in txn */
+  svn_fs_path_change_movereplace
 
 } svn_fs_path_change_kind_t;
 
@@ -1299,6 +1399,8 @@ svn_fs_path_change2_create(const svn_fs_
  * Allocate and return a hash @a *changed_paths2_p containing descriptions
  * of the paths changed under @a root.  The hash is keyed with
  * <tt>const char *</tt> paths, and has #svn_fs_path_change2_t * values.
+ * @a move_behavior determines how moves are being detected and reported;
+ * see #svn_fs_move_behavior_t for the various options.
  *
  * Callers can assume that this function takes time proportional to
  * the amount of data output, and does not need to do tree crawls;
@@ -1308,8 +1410,22 @@ svn_fs_path_change2_create(const svn_fs_
  *
  * Use @a pool for all allocations, including the hash and its values.
  *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_fs_paths_changed3(apr_hash_t **changed_paths2_p,
+                      svn_fs_root_t *root,
+                      svn_move_behavior_t move_behavior,
+                      apr_pool_t *pool);
+
+
+/** Same as svn_fs_paths_changed3 but with @a move_behavior set to
+ * #svn_fs_move_behavior_no_moves.
+ *
+ * @deprecated Provided for backward compatibility with the 1.8 API.
  * @since New in 1.6.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_fs_paths_changed2(apr_hash_t **changed_paths2_p,
                       svn_fs_root_t *root,
@@ -1738,6 +1854,19 @@ svn_fs_dir_entries(apr_hash_t **entries_
                    const char *path,
                    apr_pool_t *pool);
 
+/** Take the #svn_fs_dirent_t structures in @a entries as returned by
+ * #svn_fs_dir_entries for @a root and determine an optimized ordering
+ * in which data access would most likely be efficient.  Set @a *ordered_p
+ * to a newly allocated APR array of pointers to these #svn_fs_dirent_t
+ * structures.  Allocate the array (but not its contents) in @a pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_fs_dir_optimal_order(apr_array_header_t **ordered_p,
+                         svn_fs_root_t *root,
+                         apr_hash_t *entries,
+                         apr_pool_t *pool);
 
 /** Create a new directory named @a path in @a root.  The new directory has
  * no entries, and no properties.  @a root must be the root of a transaction,
@@ -1811,6 +1940,38 @@ svn_fs_revision_link(svn_fs_root_t *from
                      svn_fs_root_t *to_root,
                      const char *path,
                      apr_pool_t *pool);
+
+/** Create a copy of @a from_path in @a from_root named @a to_path in
+ * @a to_root and record it as a Move.  If @a from_path in @a from_root is
+ * a directory, copy the tree it refers to recursively.  @a from_root must
+ * be @a to_root's base revision.
+ *
+ * The move will remember its source; use svn_fs_copied_from() to
+ * access this information.
+ *
+ * @a to_root must be the root of a transaction based on that revision.
+ * Further, @a to_root and @a from_root must represent the same filesystem.
+ *
+ * Do any necessary temporary allocation in @a pool.
+ *
+ * @note This will not implicitly delete the @a from_path in @a to_root
+ *       but the deletion must be reported just as if this was a
+ *       #svn_fs_copy call.
+ *
+ * @warning This function is marked as @b experimental.  That means this
+ *          function will probably be supported in future releases but
+ *          might change in signature or various aspects of its semantics.
+ *
+ * @since New in 1.9.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_fs_move(svn_fs_root_t *from_root,
+            const char *from_path,
+            svn_fs_root_t *to_root,
+            const char *to_path,
+            apr_pool_t *pool);
+
 
 /* Files.  */
 
@@ -2506,7 +2667,7 @@ svn_fs_pack(const char *db_path,
  * verifications as well.
  *
  * @note To ensure a full verification using all tests and covering all
- * revisions, you must call this function *and* #svn_fs_verify_rev.
+ * revisions, you must call this function *and* #svn_fs_verify_root.
  *
  * @note Implementors, please do tests that can be done efficiently for
  * a single revision in #svn_fs_verify_root.  This function is meant for
@@ -2591,6 +2752,32 @@ typedef struct svn_fs_fsfs_info_t {
      or svn_fs_info_dup(). */
 } svn_fs_fsfs_info_t;
 
+/**
+ * A structure that provides some information about a filesystem.
+ * Returned by svn_fs_info() for #SVN_FS_TYPE_FSX filesystems.
+ *
+ * @note Fields may be added to the end of this structure in future
+ * versions.  Therefore, users shouldn't allocate structures of this
+ * type, to preserve binary compatibility.
+ *
+ * @since New in 1.9.
+ */
+typedef struct svn_fs_fsx_info_t {
+
+  /** Filesystem backend (#fs_type), i.e., the string #SVN_FS_TYPE_FSX. */
+  const char *fs_type;
+
+  /** Shard size, always > 0. */
+  int shard_size;
+
+  /** The smallest revision which is not in a pack file. */
+  svn_revnum_t min_unpacked_rev;
+
+  /* If you add fields here, check whether you need to extend svn_fs_info()
+     or svn_fs_info_dup(). */
+
+} svn_fs_fsx_info_t;
+
 /** @see svn_fs_info()
  * @since New in 1.9. */
 typedef struct svn_fs_info_placeholder_t {

Modified: subversion/branches/cache-server/subversion/include/svn_hash.h
URL: http://svn.apache.org/viewvc/subversion/branches/cache-server/subversion/include/svn_hash.h?rev=1532250&r1=1532249&r2=1532250&view=diff
==============================================================================
--- subversion/branches/cache-server/subversion/include/svn_hash.h (original)
+++ subversion/branches/cache-server/subversion/include/svn_hash.h Tue Oct 15 08:52:06 2013
@@ -37,7 +37,6 @@
 #include "svn_types.h"
 #include "svn_io.h"       /* for svn_stream_t */
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -240,14 +239,14 @@ svn_hash_from_cstring_keys(apr_hash_t **
                            const apr_array_header_t *keys,
                            apr_pool_t *pool);
 
-/* Shortcut for apr_hash_get() with a const char * key.
+/** Shortcut for apr_hash_get() with a const char * key.
  *
  * @since New in 1.8.
  */
 #define svn_hash_gets(ht, key) \
             apr_hash_get(ht, key, APR_HASH_KEY_STRING)
 
-/* Shortcut for apr_hash_set() with a const char * key.
+/** Shortcut for apr_hash_set() with a const char * key.
  *
  * @since New in 1.8.
  */