summaryrefslogtreecommitdiff
path: root/subversion/include
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/include')
-rw-r--r--subversion/include/private/svn_branch.h2
-rw-r--r--subversion/include/private/svn_client_mtcc.h11
-rw-r--r--subversion/include/private/svn_client_private.h234
-rw-r--r--subversion/include/private/svn_client_shelf.h498
-rw-r--r--subversion/include/private/svn_client_shelf2.h467
-rw-r--r--subversion/include/private/svn_dep_compat.h6
-rw-r--r--subversion/include/private/svn_diff_tree.h1
-rw-r--r--subversion/include/private/svn_dirent_uri_private.h53
-rw-r--r--subversion/include/private/svn_element.h2
-rw-r--r--subversion/include/private/svn_fs_fs_private.h97
-rw-r--r--subversion/include/private/svn_repos_private.h47
-rw-r--r--subversion/include/private/svn_sorts_private.h31
-rw-r--r--subversion/include/private/svn_subr_private.h14
-rw-r--r--subversion/include/private/svn_wc_private.h82
-rw-r--r--subversion/include/svn_client.h610
-rw-r--r--subversion/include/svn_config.h4
-rw-r--r--subversion/include/svn_delta.h164
-rw-r--r--subversion/include/svn_diff.h2
-rw-r--r--subversion/include/svn_dirent_uri.h145
-rw-r--r--subversion/include/svn_error_codes.h22
-rw-r--r--subversion/include/svn_fs.h58
-rw-r--r--subversion/include/svn_opt.h172
-rw-r--r--subversion/include/svn_opt_impl.h86
-rw-r--r--subversion/include/svn_props.h19
-rw-r--r--subversion/include/svn_ra.h44
-rw-r--r--subversion/include/svn_ra_svn.h2
-rw-r--r--subversion/include/svn_repos.h76
-rw-r--r--subversion/include/svn_time.h11
-rw-r--r--subversion/include/svn_types.h128
-rw-r--r--subversion/include/svn_types_impl.h157
-rw-r--r--subversion/include/svn_utf.h2
-rw-r--r--subversion/include/svn_version.h8
-rw-r--r--subversion/include/svn_wc.h33
33 files changed, 2694 insertions, 594 deletions
diff --git a/subversion/include/private/svn_branch.h b/subversion/include/private/svn_branch.h
index 3fbaeb7ef77c..df3a91c9a488 100644
--- a/subversion/include/private/svn_branch.h
+++ b/subversion/include/private/svn_branch.h
@@ -98,7 +98,7 @@ extern "C" {
*
* An element may appear in any or all branches, and its EID is the same in
* each branch in which the element appears.
- *
+ *
* By definition, an element keeps the same EID for its whole lifetime, even
* if deleted from all branches and later 'resurrected'.
*
diff --git a/subversion/include/private/svn_client_mtcc.h b/subversion/include/private/svn_client_mtcc.h
index fe670b04e530..d8bc9029cfaf 100644
--- a/subversion/include/private/svn_client_mtcc.h
+++ b/subversion/include/private/svn_client_mtcc.h
@@ -207,6 +207,17 @@ svn_client__mtcc_check_path(svn_node_kind_t *kind,
/** Commits all operations stored in @a mtcc as a new revision and destroys
* @a mtcc.
*
+ * A log message is obtained from the log message callback in the client
+ * context in @a mtcc.
+ *
+ * @a revprop_table (if non-NULL) supplies additional revision properties;
+ * it may not supply any "svn:*" revision properties.
+ *
+ * As with svn_ra_get_commit_editor3(), after the commit has succeeded,
+ * it will invoke @a commit_callback (if non-NULL) with filled-in
+ * #svn_commit_info_t *, @a commit_baton, and @a scratch_pool or some subpool
+ * thereof as arguments.
+ *
* @since New in 1.9.
*/
svn_error_t *
diff --git a/subversion/include/private/svn_client_private.h b/subversion/include/private/svn_client_private.h
index 892fc4b0b574..614405ac7f35 100644
--- a/subversion/include/private/svn_client_private.h
+++ b/subversion/include/private/svn_client_private.h
@@ -281,26 +281,6 @@ svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Copy the file or directory on URL in some repository to DST_ABSPATH,
- * copying node information and properties. Resolve URL using PEG_REV and
- * REVISION.
- *
- * If URL specifies a directory, create the copy using depth DEPTH.
- *
- * If MAKE_PARENTS is TRUE and DST_ABSPATH doesn't have an added parent
- * create missing parent directories
- */
-svn_error_t *
-svn_client__copy_foreign(const char *url,
- const char *dst_abspath,
- svn_opt_revision_t *peg_revision,
- svn_opt_revision_t *revision,
- svn_depth_t depth,
- svn_boolean_t make_parents,
- svn_boolean_t already_locked,
- 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.
*
@@ -341,6 +321,220 @@ svn_client__mergeinfo_log(svn_boolean_t finding_merged,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/** Return a diff processor that will print a Subversion-style
+ * (not git-style) diff.
+ *
+ * @a anchor is optional (may be null), and is the 'anchor' path to prefix
+ * to the diff-processor paths before displaying.
+ *
+ * @a orig_path_1 and @a orig_path_2 are the two main root paths to be
+ * diffed; each may be a URL, a local WC path or a local unversioned path.
+ *
+ * Other arguments are as for svn_client_diff7() etc.
+ */
+svn_error_t *
+svn_client__get_diff_writer_svn(
+ svn_diff_tree_processor_t **diff_processor,
+ const char *anchor,
+ const char *orig_path_1,
+ const char *orig_path_2,
+ const apr_array_header_t *options,
+ const char *relative_to_dir,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t pretty_print_mergeinfo,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/*** Editor for diff summary ***/
+
+/* Set *DIFF_PROCESSOR to a diff processor that will report a diff summary
+ to SUMMARIZE_FUNC.
+
+ SUMMARIZE_FUNC is called with SUMMARIZE_BATON as parameter by the
+ created callbacks for each changed item.
+*/
+svn_error_t *
+svn_client__get_diff_summarize_callbacks(
+ svn_diff_tree_processor_t **diff_processor,
+ svn_client_diff_summarize_func_t summarize_func,
+ void *summarize_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Copy a directory tree or a file (according to @a kind) from @a src_url at
+ * @a src_rev, to @a dst_abspath in a WC.
+ *
+ * The caller should be holding a WC write lock that allows @a dst_abspath to
+ * be created, such as on the parent of @a dst_abspath.
+ *
+ * If not same repositories, then remove any svn:mergeinfo property.
+ *
+ * Use @a ra_session to fetch the data. The session may point to any URL
+ * within the source repository.
+ *
+ * This API does not process any externals definitions that may be present
+ * on copied directories.
+ */
+svn_error_t *
+svn_client__repos_to_wc_copy_internal(svn_boolean_t *timestamp_sleep,
+ svn_node_kind_t kind,
+ const char *src_url,
+ svn_revnum_t src_rev,
+ const char *dst_abspath,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Copy a directory tree or a file (according to @a kind) from @a src_url at
+ * @a src_rev, to @a dst_abspath in a WC.
+ *
+ * The caller should be holding a WC write lock that allows @a dst_abspath to
+ * be created, such as on the parent of @a dst_abspath.
+ *
+ * If not same repositories, then remove any svn:mergeinfo property.
+ *
+ * Use @a ra_session to fetch the data. The session may point to a different
+ * URL after returning.
+ *
+ * This API does not process any externals definitions that may be present
+ * on copied directories.
+ */
+svn_error_t *
+svn_client__repos_to_wc_copy_by_editor(svn_boolean_t *timestamp_sleep,
+ svn_node_kind_t kind,
+ const char *src_url,
+ svn_revnum_t src_rev,
+ const char *dst_abspath,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Return an editor for applying local modifications to a WC.
+ *
+ * Return an editor in @a *editor_p, @a *edit_baton_p that will apply
+ * local modifications to the WC subdirectory at @a dst_abspath.
+ *
+ * The @a path arguments to the editor methods shall be local WC paths,
+ * relative to @a dst_abspath. The @a copyfrom_path arguments to the
+ * editor methods shall be URLs.
+ *
+ * Send notifications via @a notify_func / @a notify_baton.
+ * ### INCOMPLETE
+ *
+ * @a ra_session is used to fetch the original content for copies.
+ *
+ * Ignore changes to non-regular property (entry-props, DAV/WC-props).
+ *
+ * Acquire the WC write lock in 'open_root' and release it in
+ * 'close_edit', in 'abort_edit', or when @a result_pool is cleared.
+ */
+svn_error_t *
+svn_client__wc_editor(const svn_delta_editor_t **editor_p,
+ void **edit_baton_p,
+ const char *dst_abspath,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/* Return an editor for applying local modifications to a WC.
+ *
+ * Like svn_client__wc_editor() but with additional options.
+ *
+ * If @a root_dir_add is true, then create and schedule for addition
+ * the root directory of this edit, else assume it is already a versioned,
+ * existing directory.
+ *
+ * If @a ignore_mergeinfo_changes is true, ignore any incoming changes
+ * to the 'svn:mergeinfo' property.
+ *
+ * If @a manage_wc_write_lock is true, acquire the WC write lock in
+ * 'open_root' and release it in 'close_edit', in 'abort_edit', or
+ * when @a result_pool is cleared.
+ */
+svn_error_t *
+svn_client__wc_editor_internal(const svn_delta_editor_t **editor_p,
+ void **edit_baton_p,
+ const char *dst_abspath,
+ svn_boolean_t root_dir_add,
+ svn_boolean_t ignore_mergeinfo_changes,
+ svn_boolean_t manage_wc_write_lock,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Send committable changes found in the WC to a delta-editor.
+ *
+ * Committable changes are found in TARGETS:DEPTH:CHANGELISTS.
+ *
+ * Send the changes to @a editor:@a edit_baton. The @a path arguments
+ * to the editor methods are URL-paths relative to the URL of
+ * @a src_wc_abspath.
+ *
+ * ### We will presumably need to change this so that the @a path
+ * arguments to the editor will be local WC relpaths, in order
+ * to handle switched paths.
+ *
+ * The @a copyfrom_path arguments to the editor methods are URLs. As the
+ * WC does not store copied-from-foreign-repository metadata, the URL will
+ * be in the same repository as the URL of its parent path.
+ *
+ * Compared with svn_client__do_commit(), this (like svn_client_commit6)
+ * handles:
+ * - condense targets and find committable paths
+ * - checking only one repository is involved
+ *
+ * Compared with svn_client_commit6(), this does not handle:
+ * - externals
+ * - log message
+ * - revprops
+ * - checking the commit includes both halves of each local move
+ * - changing the copy revision of each local move to ~HEAD
+ * - WC write locks
+ * - bumping revisions in WC
+ * - removing locks and changelists in WC
+ */
+svn_error_t *
+svn_client__wc_replay(const char *src_wc_abspath,
+ const apr_array_header_t *targets,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Copy local modifications from one WC subtree to another.
+ *
+ * Find local modifications under @a src_wc_abspath, in the same way as
+ * for a commit.
+ *
+ * Edit the WC at @a dst_wc_abspath, applying those modifications to the
+ * current working state to produce a new working state.
+ *
+ * The source and destination may be in the same WC or in different WCs.
+ */
+svn_error_t *
+svn_client__wc_copy_mods(const char *src_wc_abspath,
+ const char *dst_wc_abspath,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/subversion/include/private/svn_client_shelf.h b/subversion/include/private/svn_client_shelf.h
new file mode 100644
index 000000000000..0d747cdcd36f
--- /dev/null
+++ b/subversion/include/private/svn_client_shelf.h
@@ -0,0 +1,498 @@
+/**
+ * @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_shelf.h
+ * @brief Subversion's client library: experimental shelving v3
+ */
+
+#ifndef SVN_CLIENT_SHELF_H
+#define SVN_CLIENT_SHELF_H
+
+#include <apr.h>
+#include <apr_pools.h>
+#include <apr_hash.h>
+#include <apr_time.h>
+
+#include "svn_client.h"
+#include "svn_types.h"
+#include "svn_string.h"
+#include "svn_wc.h"
+#include "svn_diff.h"
+#include "private/svn_diff_tree.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+/** Shelving v3, with checkpoints
+ *
+ * @defgroup svn_client_shelves_checkpoints Shelves and checkpoints
+ * @{
+ */
+
+/** A shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf_t
+{
+ /* Public fields (read-only for public use) */
+ const char *name;
+ int max_version; /**< @deprecated */
+
+ /* Private fields */
+ const char *wc_root_abspath;
+ const char *shelves_dir;
+ apr_hash_t *revprops; /**< non-null; allocated in POOL */
+ svn_client_ctx_t *ctx;
+ apr_pool_t *pool;
+} svn_client__shelf_t;
+
+/** One version of a shelved change-set.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf_version_t
+{
+ /* Public fields (read-only for public use) */
+ svn_client__shelf_t *shelf;
+ apr_time_t mtime; /**< time-stamp of this version */
+
+ /* Private fields */
+ const char *files_dir_abspath; /**< abspath of the storage area */
+ int version_number; /**< version number starting from 1 */
+} svn_client__shelf_version_t;
+
+/** Open an existing shelf or create a new shelf.
+ *
+ * Create a new shelf (containing no versions) if a shelf named @a name
+ * is not found.
+ *
+ * The shelf should be closed after use by calling svn_client_shelf_close().
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_open_or_create(svn_client__shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Open an existing shelf named @a name, or error if it doesn't exist.
+ *
+ * The shelf should be closed after use by calling svn_client_shelf_close().
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_open_existing(svn_client__shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Close @a shelf.
+ *
+ * If @a shelf is NULL, do nothing; otherwise @a shelf must be an open shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_close(svn_client__shelf_t *shelf,
+ apr_pool_t *scratch_pool);
+
+/** Delete the shelf named @a name, or error if it doesn't exist.
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_delete(const char *name,
+ const char *local_abspath,
+ svn_boolean_t dry_run,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Get an editor that, when driven, will store changes in @a shelf_version.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_mods_editor(const svn_delta_editor_t **editor_p,
+ void **edit_baton_p,
+ svn_client__shelf_version_t *shelf_version,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Save the local modifications found by @a paths, @a depth,
+ * @a changelists as a new version of @a shelf.
+ *
+ * If any paths are shelved, create a new shelf-version and return the new
+ * shelf-version in @a *new_version_p, else set @a *new_version_p to null.
+ * @a new_version_p may be null if that output is not wanted; a new shelf-
+ * version is still saved and may be found through @a shelf.
+ *
+ * @a paths are relative to the CWD, or absolute.
+ *
+ * For each successfully shelved path: call @a shelved_func (if not null)
+ * with @a shelved_baton.
+ *
+ * If any paths cannot be shelved: if @a not_shelved_func is given, call
+ * it with @a not_shelved_baton for each such path, and still create a new
+ * shelf-version if any paths are shelved.
+ *
+ * This function does not revert the changes from the WC; use
+ * svn_client_shelf_unapply() for that.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_save_new_version3(svn_client__shelf_version_t **new_version_p,
+ svn_client__shelf_t *shelf,
+ const apr_array_header_t *paths,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ svn_client_status_func_t shelved_func,
+ void *shelved_baton,
+ svn_client_status_func_t not_shelved_func,
+ void *not_shelved_baton,
+ apr_pool_t *scratch_pool);
+
+/** Delete all newer versions of @a shelf newer than @a shelf_version.
+ *
+ * If @a shelf_version is null, delete all versions of @a shelf. (The
+ * shelf will still exist, with any log message and other revprops, but
+ * with no versions in it.)
+ *
+ * Leave the shelf's log message and other revprops unchanged.
+ *
+ * Any #svn_client__shelf_version_t object that refers to a deleted version
+ * will become invalid: attempting to use it will give undefined behaviour.
+ * The given @a shelf_version will remain valid.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_delete_newer_versions(svn_client__shelf_t *shelf,
+ svn_client__shelf_version_t *shelf_version,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a shelf_version an existing version of @a shelf, given its
+ * @a version_number (starting from 1). Error if that version doesn't exist.
+ *
+ * There is no need to "close" it after use.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_version_open(svn_client__shelf_version_t **shelf_version_p,
+ svn_client__shelf_t *shelf,
+ int version_number,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a shelf_version the newest version of @a shelf.
+ *
+ * Set @a shelf_version to null if no versions exist.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_get_newest_version(svn_client__shelf_version_t **shelf_version_p,
+ svn_client__shelf_t *shelf,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a versions_p an array of (#svn_client__shelf_version_t *)
+ * containing all versions of @a shelf.
+ *
+ * The versions will be in chronological order, oldest to newest.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_get_all_versions(apr_array_header_t **versions_p,
+ svn_client__shelf_t *shelf,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Apply @a shelf_version to the WC.
+ *
+ * If @a dry_run is true, try applying the shelf-version to the WC and
+ * report the full set of notifications about successes and conflicts,
+ * but leave the WC untouched.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_apply(svn_client__shelf_version_t *shelf_version,
+ svn_boolean_t dry_run,
+ apr_pool_t *scratch_pool);
+
+/** Test whether we can successfully apply the changes for @a file_relpath
+ * in @a shelf_version to the WC.
+ *
+ * Set @a *conflict_p to true if the changes conflict with the WC state,
+ * else to false.
+ *
+ * If @a file_relpath is not found in @a shelf_version, set @a *conflict_p
+ * to FALSE.
+ *
+ * @a file_relpath is relative to the WC root.
+ *
+ * A conflict means the shelf cannot be applied successfully to the WC
+ * because the change to be applied is not compatible with the current
+ * working state of the WC file. Examples are a text conflict, or the
+ * file does not exist or is a directory, or the shelf is trying to add
+ * the file but it already exists, or trying to delete it but it does not
+ * exist.
+ *
+ * Return an error only if something is broken, e.g. unable to read data
+ * from the specified shelf-version.
+ *
+ * Leave the WC untouched.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_test_apply_file(svn_boolean_t *conflict_p,
+ svn_client__shelf_version_t *shelf_version,
+ const char *file_relpath,
+ apr_pool_t *scratch_pool);
+
+/** Reverse-apply @a shelf_version to the WC.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_unapply(svn_client__shelf_version_t *shelf_version,
+ svn_boolean_t dry_run,
+ apr_pool_t *scratch_pool);
+
+/** Send committable changes found in a shelf to a delta-editor.
+ *
+ * Push changes from the @a shelf_version subtree at @a top_relpath
+ * to @a editor : @a edit_baton.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_replay(svn_client__shelf_version_t *shelf_version,
+ const char *top_relpath,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/** Set @a *affected_paths to a hash with one entry for each path affected
+ * by the @a shelf_version.
+ *
+ * The hash key is the path of the affected file, relative to the WC root.
+ *
+ * (Future possibility: When moves and copies are supported, the hash key
+ * is the old path and value is the new path.)
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_paths_changed(apr_hash_t **affected_paths,
+ svn_client__shelf_version_t *shelf_version,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Set @a shelf's revprop @a prop_name to @a prop_val.
+ *
+ * This can be used to set or change the shelf's log message
+ * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
+ *
+ * If @a prop_val is NULL, delete the property (if present).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_revprop_set(svn_client__shelf_t *shelf,
+ const char *prop_name,
+ const svn_string_t *prop_val,
+ apr_pool_t *scratch_pool);
+
+/** Set @a shelf's revprops to @a revprop_table.
+ *
+ * This deletes all previous revprops.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_revprop_set_all(svn_client__shelf_t *shelf,
+ apr_hash_t *revprop_table,
+ apr_pool_t *scratch_pool);
+
+/** Get @a shelf's revprop @a prop_name into @a *prop_val.
+ *
+ * If the property is not present, set @a *prop_val to NULL.
+ *
+ * This can be used to get the shelf's log message
+ * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
+ *
+ * The lifetime of the result is limited to that of @a shelf and/or
+ * of @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_revprop_get(svn_string_t **prop_val,
+ svn_client__shelf_t *shelf,
+ const char *prop_name,
+ apr_pool_t *result_pool);
+
+/** Get @a shelf's revprops into @a props.
+ *
+ * The lifetime of the result is limited to that of @a shelf and/or
+ * of @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_revprop_list(apr_hash_t **props,
+ svn_client__shelf_t *shelf,
+ apr_pool_t *result_pool);
+
+/** Set the log message in @a shelf to @a log_message.
+ *
+ * If @a log_message is null, delete the log message.
+ *
+ * Similar to svn_client_shelf_revprop_set(... SVN_PROP_REVISION_LOG ...).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_set_log_message(svn_client__shelf_t *shelf,
+ const char *log_message,
+ apr_pool_t *scratch_pool);
+
+/** Get the log message in @a shelf into @a *log_message.
+ *
+ * Set @a *log_message to NULL if there is no log message.
+ *
+ * Similar to svn_client_shelf_revprop_get(... SVN_PROP_REVISION_LOG ...).
+ *
+ * The result is allocated in @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_get_log_message(char **log_message,
+ svn_client__shelf_t *shelf,
+ apr_pool_t *result_pool);
+
+/** Information about a shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf_info_t
+{
+ apr_time_t mtime; /**< mtime of the latest change */
+} svn_client__shelf_info_t;
+
+/** Set @a *shelf_infos to a hash, keyed by shelf name, of pointers to
+ * @c svn_client_shelf_info_t structures, one for each shelf in the
+ * given WC.
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_list(apr_hash_t **shelf_infos,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Report the shelved status of all the shelved paths in @a shelf_version
+ * via @a walk_func(@a walk_baton, ...).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_version_status_walk(svn_client__shelf_version_t *shelf_version,
+ const char *wc_relpath,
+ svn_wc_status_func4_t walk_func,
+ void *walk_baton,
+ apr_pool_t *scratch_pool);
+
+/** Output the subtree of @a shelf_version rooted at @a shelf_relpath
+ * as a diff to @a diff_processor.
+ *
+ * ### depth and ignore_ancestry are currently ignored.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf_diff(svn_client__shelf_version_t *shelf_version,
+ const char *shelf_relpath,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ const svn_diff_tree_processor_t *diff_processor,
+ apr_pool_t *scratch_pool);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_CLIENT_SHELF_H */
diff --git a/subversion/include/private/svn_client_shelf2.h b/subversion/include/private/svn_client_shelf2.h
new file mode 100644
index 000000000000..e26537506976
--- /dev/null
+++ b/subversion/include/private/svn_client_shelf2.h
@@ -0,0 +1,467 @@
+/**
+ * @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_shelf2.h
+ * @brief Subversion's client library: experimental shelving v2
+ */
+
+#ifndef SVN_CLIENT_SHELF2_H
+#define SVN_CLIENT_SHELF2_H
+
+#include <apr.h>
+#include <apr_pools.h>
+#include <apr_hash.h>
+#include <apr_time.h>
+
+#include "svn_client.h"
+#include "svn_types.h"
+#include "svn_string.h"
+#include "svn_wc.h"
+#include "svn_diff.h"
+#include "private/svn_diff_tree.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+
+/** Shelving v2, with checkpoints
+ *
+ * @defgroup svn_client_shelves_checkpoints Shelves and checkpoints
+ * @{
+ */
+
+/** A shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf2_t
+{
+ /* Public fields (read-only for public use) */
+ const char *name;
+ int max_version; /** @deprecated */
+
+ /* Private fields */
+ const char *wc_root_abspath;
+ const char *shelves_dir;
+ apr_hash_t *revprops; /* non-null; allocated in POOL */
+ svn_client_ctx_t *ctx;
+ apr_pool_t *pool;
+} svn_client__shelf2_t;
+
+/** One version of a shelved change-set.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf2_version_t
+{
+ /* Public fields (read-only for public use) */
+ svn_client__shelf2_t *shelf;
+ apr_time_t mtime; /** time-stamp of this version */
+
+ /* Private fields */
+ const char *files_dir_abspath; /** abspath of the storage area */
+ int version_number; /** version number starting from 1 */
+} svn_client__shelf2_version_t;
+
+/** Open an existing shelf or create a new shelf.
+ *
+ * Create a new shelf (containing no versions) if a shelf named @a name
+ * is not found.
+ *
+ * The shelf should be closed after use by calling svn_client_shelf_close().
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_open_or_create(svn_client__shelf2_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Open an existing shelf named @a name, or error if it doesn't exist.
+ *
+ * The shelf should be closed after use by calling svn_client_shelf_close().
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_open_existing(svn_client__shelf2_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
+/** Close @a shelf.
+ *
+ * If @a shelf is NULL, do nothing; otherwise @a shelf must be an open shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_close(svn_client__shelf2_t *shelf,
+ apr_pool_t *scratch_pool);
+
+/** Delete the shelf named @a name, or error if it doesn't exist.
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_delete(const char *name,
+ const char *local_abspath,
+ svn_boolean_t dry_run,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Save the local modifications found by @a paths, @a depth,
+ * @a changelists as a new version of @a shelf.
+ *
+ * If any paths are shelved, create a new shelf-version and return the new
+ * shelf-version in @a *new_version_p, else set @a *new_version_p to null.
+ * @a new_version_p may be null if that output is not wanted; a new shelf-
+ * version is still saved and may be found through @a shelf.
+ *
+ * @a paths are relative to the CWD, or absolute.
+ *
+ * For each successfully shelved path: call @a shelved_func (if not null)
+ * with @a shelved_baton.
+ *
+ * If any paths cannot be shelved: if @a not_shelved_func is given, call
+ * it with @a not_shelved_baton for each such path, and still create a new
+ * shelf-version if any paths are shelved.
+ *
+ * This function does not revert the changes from the WC; use
+ * svn_client_shelf_unapply() for that.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_save_new_version3(svn_client__shelf2_version_t **new_version_p,
+ svn_client__shelf2_t *shelf,
+ const apr_array_header_t *paths,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ svn_client_status_func_t shelved_func,
+ void *shelved_baton,
+ svn_client_status_func_t not_shelved_func,
+ void *not_shelved_baton,
+ apr_pool_t *scratch_pool);
+
+/** Delete all newer versions of @a shelf newer than @a shelf_version.
+ *
+ * If @a shelf_version is null, delete all versions of @a shelf. (The
+ * shelf will still exist, with any log message and other revprops, but
+ * with no versions in it.)
+ *
+ * Leave the shelf's log message and other revprops unchanged.
+ *
+ * Any #svn_client_shelf_version_t object that refers to a deleted version
+ * will become invalid: attempting to use it will give undefined behaviour.
+ * The given @a shelf_version will remain valid.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_delete_newer_versions(svn_client__shelf2_t *shelf,
+ svn_client__shelf2_version_t *shelf_version,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a shelf_version an existing version of @a shelf, given its
+ * @a version_number. Error if that version doesn't exist.
+ *
+ * There is no need to "close" it after use.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_version_open(svn_client__shelf2_version_t **shelf_version_p,
+ svn_client__shelf2_t *shelf,
+ int version_number,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a shelf_version the newest version of @a shelf.
+ *
+ * Set @a shelf_version to null if no versions exist.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_get_newest_version(svn_client__shelf2_version_t **shelf_version_p,
+ svn_client__shelf2_t *shelf,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Return in @a versions_p an array of (#svn_client_shelf_version_t *)
+ * containing all versions of @a shelf.
+ *
+ * The versions will be in chronological order, oldest to newest.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_get_all_versions(apr_array_header_t **versions_p,
+ svn_client__shelf2_t *shelf,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Apply @a shelf_version to the WC.
+ *
+ * If @a dry_run is true, try applying the shelf-version to the WC and
+ * report the full set of notifications about successes and conflicts,
+ * but leave the WC untouched.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_apply(svn_client__shelf2_version_t *shelf_version,
+ svn_boolean_t dry_run,
+ apr_pool_t *scratch_pool);
+
+/** Test whether we can successfully apply the changes for @a file_relpath
+ * in @a shelf_version to the WC.
+ *
+ * Set @a *conflict_p to true if the changes conflict with the WC state,
+ * else to false.
+ *
+ * If @a file_relpath is not found in @a shelf_version, set @a *conflict_p
+ * to FALSE.
+ *
+ * @a file_relpath is relative to the WC root.
+ *
+ * A conflict means the shelf cannot be applied successfully to the WC
+ * because the change to be applied is not compatible with the current
+ * working state of the WC file. Examples are a text conflict, or the
+ * file does not exist or is a directory, or the shelf is trying to add
+ * the file but it already exists, or trying to delete it but it does not
+ * exist.
+ *
+ * Return an error only if something is broken, e.g. unable to read data
+ * from the specified shelf-version.
+ *
+ * Leave the WC untouched.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_test_apply_file(svn_boolean_t *conflict_p,
+ svn_client__shelf2_version_t *shelf_version,
+ const char *file_relpath,
+ apr_pool_t *scratch_pool);
+
+/** Reverse-apply @a shelf_version to the WC.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_unapply(svn_client__shelf2_version_t *shelf_version,
+ svn_boolean_t dry_run,
+ apr_pool_t *scratch_pool);
+
+/** Set @a *affected_paths to a hash with one entry for each path affected
+ * by the @a shelf_version.
+ *
+ * The hash key is the path of the affected file, relative to the WC root.
+ *
+ * (Future possibility: When moves and copies are supported, the hash key
+ * is the old path and value is the new path.)
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_paths_changed(apr_hash_t **affected_paths,
+ svn_client__shelf2_version_t *shelf_version,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Set @a shelf's revprop @a prop_name to @a prop_val.
+ *
+ * This can be used to set or change the shelf's log message
+ * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
+ *
+ * If @a prop_val is NULL, delete the property (if present).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_revprop_set(svn_client__shelf2_t *shelf,
+ const char *prop_name,
+ const svn_string_t *prop_val,
+ apr_pool_t *scratch_pool);
+
+/** Set @a shelf's revprops to @a revprop_table.
+ *
+ * This deletes all previous revprops.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_revprop_set_all(svn_client__shelf2_t *shelf,
+ apr_hash_t *revprop_table,
+ apr_pool_t *scratch_pool);
+
+/** Get @a shelf's revprop @a prop_name into @a *prop_val.
+ *
+ * If the property is not present, set @a *prop_val to NULL.
+ *
+ * This can be used to get the shelf's log message
+ * (property name "svn:log" or #SVN_PROP_REVISION_LOG).
+ *
+ * The lifetime of the result is limited to that of @a shelf and/or
+ * of @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_revprop_get(svn_string_t **prop_val,
+ svn_client__shelf2_t *shelf,
+ const char *prop_name,
+ apr_pool_t *result_pool);
+
+/** Get @a shelf's revprops into @a props.
+ *
+ * The lifetime of the result is limited to that of @a shelf and/or
+ * of @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_revprop_list(apr_hash_t **props,
+ svn_client__shelf2_t *shelf,
+ apr_pool_t *result_pool);
+
+/** Set the log message in @a shelf to @a log_message.
+ *
+ * If @a log_message is null, delete the log message.
+ *
+ * Similar to svn_client_shelf_revprop_set(... SVN_PROP_REVISION_LOG ...).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_set_log_message(svn_client__shelf2_t *shelf,
+ const char *log_message,
+ apr_pool_t *scratch_pool);
+
+/** Get the log message in @a shelf into @a *log_message.
+ *
+ * Set @a *log_message to NULL if there is no log message.
+ *
+ * Similar to svn_client_shelf_revprop_get(... SVN_PROP_REVISION_LOG ...).
+ *
+ * The result is allocated in @a result_pool.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_get_log_message(char **log_message,
+ svn_client__shelf2_t *shelf,
+ apr_pool_t *result_pool);
+
+/** Information about a shelf.
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef struct svn_client__shelf2_info_t
+{
+ apr_time_t mtime; /* mtime of the latest change */
+} svn_client__shelf2_info_t;
+
+/** Set @a *shelf_infos to a hash, keyed by shelf name, of pointers to
+ * @c svn_client_shelf_info_t structures, one for each shelf in the
+ * given WC.
+ *
+ * @a local_abspath is any path in the WC and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_list(apr_hash_t **shelf_infos,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Report the shelved status of all the shelved paths in SHELF_VERSION
+ * via WALK_FUNC(WALK_BATON, ...).
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_version_status_walk(svn_client__shelf2_version_t *shelf_version,
+ const char *wc_relpath,
+ svn_wc_status_func4_t walk_func,
+ void *walk_baton,
+ apr_pool_t *scratch_pool);
+
+/** Output the subtree of @a shelf_version rooted at @a shelf_relpath
+ * as a diff to @a diff_processor.
+ *
+ * ### depth and ignore_ancestry are currently ignored.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__shelf2_diff(svn_client__shelf2_version_t *shelf_version,
+ const char *shelf_relpath,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ const svn_diff_tree_processor_t *diff_processor,
+ apr_pool_t *scratch_pool);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_CLIENT_SHELF2_H */
diff --git a/subversion/include/private/svn_dep_compat.h b/subversion/include/private/svn_dep_compat.h
index 6b381d2ce81c..7e6603826135 100644
--- a/subversion/include/private/svn_dep_compat.h
+++ b/subversion/include/private/svn_dep_compat.h
@@ -108,12 +108,6 @@ extern "C" {
#define APR_OPENINFO 0x00100000
#endif
-#if !APR_VERSION_AT_LEAST(1,4,0)
-#ifndef apr_time_from_msec
-#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000)
-#endif
-#endif
-
/**
* APR 1 has volatile qualifier bugs in some atomic prototypes that
* are fixed in APR 2:
diff --git a/subversion/include/private/svn_diff_tree.h b/subversion/include/private/svn_diff_tree.h
index 713644d08c4e..9c675d916aa1 100644
--- a/subversion/include/private/svn_diff_tree.h
+++ b/subversion/include/private/svn_diff_tree.h
@@ -321,7 +321,6 @@ svn_diff__tree_processor_create(void *baton,
*/ /* Used by libsvn clients repository diff */
const svn_diff_tree_processor_t *
svn_diff__tree_processor_reverse_create(const svn_diff_tree_processor_t * processor,
- const char *prefix_relpath,
apr_pool_t *result_pool);
/**
diff --git a/subversion/include/private/svn_dirent_uri_private.h b/subversion/include/private/svn_dirent_uri_private.h
new file mode 100644
index 000000000000..0da5f4722884
--- /dev/null
+++ b/subversion/include/private/svn_dirent_uri_private.h
@@ -0,0 +1,53 @@
+/*
+ * svn_dirent_uri_private.h : private definitions for dirents and URIs
+ *
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ */
+
+#ifndef SVN_DIRENT_URI_PRIVATE_H
+#define SVN_DIRENT_URI_PRIVATE_H
+
+#include <apr_pools.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * Convert @a relpath from the local style to the canonical internal style.
+ * "Local style" means native path separators and "." for the empty path.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.7 (as svn_relpath__internal_style()).
+ * @since Name and signature changed in 1.12.
+ */
+svn_error_t *
+svn_relpath__make_internal(const char **internal_style_relpath,
+ const char *relpath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_DIRENT_URI_PRIVATE_H */
diff --git a/subversion/include/private/svn_element.h b/subversion/include/private/svn_element.h
index c467175c748e..9c7129a4a98a 100644
--- a/subversion/include/private/svn_element.h
+++ b/subversion/include/private/svn_element.h
@@ -348,7 +348,7 @@ svn_element__content_t *
svn_element__tree_get(const svn_element__tree_t *tree,
int eid);
-svn_error_t *
+void
svn_element__tree_set(svn_element__tree_t *tree,
int eid,
const svn_element__content_t *element);
diff --git a/subversion/include/private/svn_fs_fs_private.h b/subversion/include/private/svn_fs_fs_private.h
index d2573d447c9d..2ca61e4cf8c1 100644
--- a/subversion/include/private/svn_fs_fs_private.h
+++ b/subversion/include/private/svn_fs_fs_private.h
@@ -255,22 +255,6 @@ typedef struct svn_fs_fs__stats_t
apr_hash_t *by_extension;
} svn_fs_fs__stats_t;
-
-/* Scan all contents of the repository FS and return statistics in *STATS,
- * allocated in RESULT_POOL. Report progress through PROGRESS_FUNC with
- * PROGRESS_BATON, if PROGRESS_FUNC is not NULL.
- * Use SCRATCH_POOL for temporary allocations.
- */
-svn_error_t *
-svn_fs_fs__get_stats(svn_fs_fs__stats_t **stats,
- svn_fs_t *fs,
- svn_fs_progress_notify_func_t progress_func,
- void *progress_baton,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
/* A node-revision ID in FSFS consists of 3 sub-IDs ("parts") that consist
* of a creation REVISION number and some revision- / transaction-local
* counter value (NUMBER). Old-style ID parts use global counter values.
@@ -325,33 +309,60 @@ typedef svn_error_t *
void *baton,
apr_pool_t *scratch_pool);
-/* Read the P2L index for the rev / pack file containing REVISION in FS.
- * For each index entry, invoke CALLBACK_FUNC with CALLBACK_BATON.
- * If not NULL, call CANCEL_FUNC with CANCEL_BATON from time to time.
- * Use SCRATCH_POOL for temporary allocations.
- */
-svn_error_t *
-svn_fs_fs__dump_index(svn_fs_t *fs,
- svn_revnum_t revision,
- svn_fs_fs__dump_index_func_t callback_func,
- void *callback_baton,
- svn_cancel_func_t cancel_func,
- void *cancel_baton,
- apr_pool_t *scratch_pool);
-
-
-/* Rewrite the respective index information of the rev / pack file in FS
- * containing REVISION and use the svn_fs_fs__p2l_entry_t * array ENTRIES
- * as the new index contents. Allocate temporaries from SCRATCH_POOL.
- *
- * Note that this becomes a no-op if ENTRIES is empty. You may use a zero-
- * sized empty entry instead.
- */
-svn_error_t *
-svn_fs_fs__load_index(svn_fs_t *fs,
- svn_revnum_t revision,
- apr_array_header_t *entries,
- apr_pool_t *scratch_pool);
+typedef struct svn_fs_fs__ioctl_get_stats_input_t
+{
+ svn_fs_progress_notify_func_t progress_func;
+ void *progress_baton;
+} svn_fs_fs__ioctl_get_stats_input_t;
+
+typedef struct svn_fs_fs__ioctl_get_stats_output_t
+{
+ svn_fs_fs__stats_t *stats;
+} svn_fs_fs__ioctl_get_stats_output_t;
+
+SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_GET_STATS, SVN_FS_TYPE_FSFS, 1000);
+
+typedef struct svn_fs_fs__ioctl_dump_index_input_t
+{
+ svn_revnum_t revision;
+ svn_fs_fs__dump_index_func_t callback_func;
+ void *callback_baton;
+} svn_fs_fs__ioctl_dump_index_input_t;
+
+SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_DUMP_INDEX, SVN_FS_TYPE_FSFS, 1001);
+
+typedef struct svn_fs_fs__ioctl_load_index_input_t
+{
+ svn_revnum_t revision;
+ /* Array of svn_fs_fs__p2l_entry_t * entries. */
+ apr_array_header_t *entries;
+} svn_fs_fs__ioctl_load_index_input_t;
+
+SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_LOAD_INDEX, SVN_FS_TYPE_FSFS, 1002);
+
+typedef struct svn_fs_fs__ioctl_revision_size_input_t
+{
+ svn_revnum_t revision;
+} svn_fs_fs__ioctl_revision_size_input_t;
+
+typedef struct svn_fs_fs__ioctl_revision_size_output_t
+{
+ apr_off_t rev_size;
+} svn_fs_fs__ioctl_revision_size_output_t;
+
+/* See svn_fs_fs__revision_size(). */
+SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_REVISION_SIZE, SVN_FS_TYPE_FSFS, 1003);
+
+typedef struct svn_fs_fs__ioctl_build_rep_cache_input_t
+{
+ svn_revnum_t start_rev;
+ svn_revnum_t end_rev;
+ svn_fs_progress_notify_func_t progress_func;
+ void *progress_baton;
+} svn_fs_fs__ioctl_build_rep_cache_input_t;
+
+/* See svn_fs_fs__build_rep_cache(). */
+SVN_FS_DECLARE_IOCTL_CODE(SVN_FS_FS__IOCTL_BUILD_REP_CACHE, SVN_FS_TYPE_FSFS, 1004);
#ifdef __cplusplus
}
diff --git a/subversion/include/private/svn_repos_private.h b/subversion/include/private/svn_repos_private.h
index c65b73fc1e69..1fd34e8053c7 100644
--- a/subversion/include/private/svn_repos_private.h
+++ b/subversion/include/private/svn_repos_private.h
@@ -31,6 +31,7 @@
#include "svn_types.h"
#include "svn_repos.h"
+#include "svn_delta.h"
#include "svn_editor.h"
#include "svn_config.h"
@@ -85,9 +86,11 @@ svn_repos__validate_prop(const char *name,
*
* NAME is used to check that VALUE should be normalized, and if this
* is the case, VALUE is then normalized, allocated from RESULT_POOL.
- * If no normalization is required, VALUE will be copied to RESULT_POOL
- * unchanged. If NORMALIZED_P is not NULL, and the normalization
- * happened, set *NORMALIZED_P to non-zero. If the property is returned
+ * If no normalization happened, *RESULT_P will be set to VALUE, and
+ * no copying of the value will occur.
+ *
+ * If NORMALIZED_P is not NULL, and the normalization happened,
+ * set *NORMALIZED_P to non-zero. If the property is returned
* unchanged and NORMALIZED_P is not NULL, then *NORMALIZED_P will be
* set to zero. SCRATCH_POOL will be used for temporary allocations.
*/
@@ -296,6 +299,23 @@ svn_repos__dump_headers(svn_stream_t *stream,
svn_repos__dumpfile_headers_t *headers,
apr_pool_t *scratch_pool);
+/* Write a magic header record to DUMP_STREAM specifying format version
+ * VERSION.
+ */
+svn_error_t *
+svn_repos__dump_magic_header_record(svn_stream_t *dump_stream,
+ int version,
+ apr_pool_t *pool);
+
+/* Write a UUID record to DUMP_STREAM.
+ *
+ * If UUID is NULL then write nothing at all.
+ */
+svn_error_t *
+svn_repos__dump_uuid_header_record(svn_stream_t *dump_stream,
+ const char *uuid,
+ apr_pool_t *pool);
+
/* Write a revision record to DUMP_STREAM for revision REVISION with revision
* properies REVPROPS, creating appropriate headers.
*
@@ -349,6 +369,27 @@ svn_repos__dump_node_record(svn_stream_t *dump_stream,
svn_boolean_t content_length_always,
apr_pool_t *scratch_pool);
+/**
+ * Get a dump editor @a editor along with a @a edit_baton allocated in
+ * @a pool. The editor will write output to @a stream.
+ *
+ * @a update_anchor_relpath is the repository relative path of the
+ * anchor of the update-style drive which will happen on @a *editor;
+ * if a replay-style drive will instead be used, it should be passed
+ * as @c NULL.
+ *
+ * In contrast to the dump editor used inside svn_repos_dump_fs4(), this
+ * one supports only deltas mode.
+ *
+ * ### TODO: Unify with the dump editor inside svn_repos_dump_fs4().
+ */
+svn_error_t *
+svn_repos__get_dump_editor(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ svn_stream_t *stream,
+ const char *update_anchor_relpath,
+ apr_pool_t *pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/subversion/include/private/svn_sorts_private.h b/subversion/include/private/svn_sorts_private.h
index 2d5f1887f1b7..d0fddc0c6488 100644
--- a/subversion/include/private/svn_sorts_private.h
+++ b/subversion/include/private/svn_sorts_private.h
@@ -120,26 +120,29 @@ svn_sort__array_lookup(const apr_array_header_t *array,
* @a insert_index, growing the array and shuffling existing elements along to
* make room.
*
+ * Raise an error if @a insert_index is less than 0 or greater than the length
+ * of the array.
+ *
* @note Private. For use by Subversion's own code only.
*/
-void
-svn_sort__array_insert(apr_array_header_t *array,
- const void *new_element,
- int insert_index);
+svn_error_t *
+svn_sort__array_insert2(apr_array_header_t *array,
+ const void *new_element,
+ int insert_index);
/* Remove @a elements_to_delete elements starting at @a delete_index from the
- * array @a arr. If @a delete_index is not a valid element of @a arr,
- * @a elements_to_delete is not greater than zero, or
- * @a delete_index + @a elements_to_delete is greater than @a arr->nelts,
- * then do nothing.
+ * array @a arr.
+ *
+ * Raise an error if the indexes to delete extends outside the array bounds
+ * or if @a elements_to_delete is not greater than zero.
*
* @note Private. For use by Subversion's own code only.
*/
-void
-svn_sort__array_delete(apr_array_header_t *arr,
- int delete_index,
- int elements_to_delete);
+svn_error_t *
+svn_sort__array_delete2(apr_array_header_t *arr,
+ int delete_index,
+ int elements_to_delete);
/* Reverse the order of elements in @a array, in place.
*
@@ -190,7 +193,7 @@ svn_priority_queue__size(svn_priority_queue__t *queue);
/**
* Returns a reference to the first element in the @a queue. The queue
- * contents remains unchanged. If the @a queue is empty, #NULL will be
+ * contents remains unchanged. If the @a queue is empty, NULL will be
* returned.
*/
void *
@@ -212,7 +215,7 @@ svn_priority_queue__pop(svn_priority_queue__t *queue);
/**
* Append the new @a element to the @a queue. @a element must neither be
- * #NULL nor the first element as returned by #svn_priority_queue__peek.
+ * NULL nor the first element as returned by #svn_priority_queue__peek.
*/
void
svn_priority_queue__push(svn_priority_queue__t *queue, const void *element);
diff --git a/subversion/include/private/svn_subr_private.h b/subversion/include/private/svn_subr_private.h
index d18c564748d0..468b7cc459f8 100644
--- a/subversion/include/private/svn_subr_private.h
+++ b/subversion/include/private/svn_subr_private.h
@@ -389,27 +389,27 @@ svn_hash__make(apr_pool_t *pool);
/** Struct that represents a key value pair read from a serialized hash
* representation. There are special cases that can also be represented:
- * a #NULL @a key signifies the end of the hash, a #NULL @a val for non-
+ * a NULL @a key signifies the end of the hash, a NULL @a val for non-
* NULL keys is only possible in incremental mode describes a deletion.
*
* @since New in 1.9.
*/
typedef struct svn_hash__entry_t
{
- /** 0-terminated Key. #NULL if this contains no data at all because we
+ /** 0-terminated Key. NULL if this contains no data at all because we
* encountered the end of the hash. */
char *key;
- /** Length of @a key. Must be 0 if @a key is #NULL. */
+ /** Length of @a key. Must be 0 if @a key is NULL. */
apr_size_t keylen;
- /** 0-terminated value stored with the key. If this is #NULL for a
+ /** 0-terminated value stored with the key. If this is NULL for a
* non-NULL @a key, then this means that the key shall be removed from
- * the hash (only used in incremental mode). Must be #NULL if @a key is
- * #NULL. */
+ * the hash (only used in incremental mode). Must be NULL if @a key is
+ * NULL. */
char *val;
- /** Length of @a val. Must be 0 if @a val is #NULL. */
+ /** Length of @a val. Must be 0 if @a val is NULL. */
apr_size_t vallen;
} svn_hash__entry_t;
diff --git a/subversion/include/private/svn_wc_private.h b/subversion/include/private/svn_wc_private.h
index 521d092be692..9e316cda3b8c 100644
--- a/subversion/include/private/svn_wc_private.h
+++ b/subversion/include/private/svn_wc_private.h
@@ -348,19 +348,21 @@ svn_wc__get_wcroot(const char **wcroot_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/** Set @a *dir to the abspath of the directory in which shelved patches
- * are stored, which is inside the WC's administrative directory, and ensure
- * the directory exists.
+/** Set @a *dir to the abspath of the directory in which administrative
+ * data for experimental features may be stored. This directory is inside
+ * the WC's administrative directory. Ensure the directory exists.
*
* @a local_abspath is any path in the WC, and is used to find the WC root.
+ *
+ * @warning EXPERIMENTAL.
*/
SVN_EXPERIMENTAL
svn_error_t *
-svn_wc__get_shelves_dir(char **dir,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
+svn_wc__get_experimental_dir(char **dir,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/**
* The following are temporary APIs to aid in the transition from wc-1 to
@@ -537,7 +539,7 @@ svn_wc__node_get_origin(svn_boolean_t *is_copy,
* If @a base_only is TRUE then only the base node will be examined,
* otherwise the current base or working node will be examined.
*
- * If a value is not interesting you can pass #NULL.
+ * If a value is not interesting you can pass NULL.
*
* If @a local_abspath is not in the working copy, return
* @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a scratch_pool for all temporary
@@ -615,6 +617,42 @@ svn_wc__node_get_base(svn_node_kind_t *kind,
apr_pool_t *scratch_pool);
+/* Return an array of const char * elements, which represent local absolute
+ * paths for nodes, within the working copy indicated by WRI_ABSPATH, which
+ * have a basename matching BASENAME and have node kind KIND.
+ * If no such nodes exist, return an empty array.
+ *
+ * This function returns only paths to nodes which are present in the highest
+ * layer of the WC. In other words, paths to deleted and/or excluded nodes are
+ * never returned.
+ */
+svn_error_t *
+svn_wc__find_working_nodes_with_basename(apr_array_header_t **abspaths,
+ const char *wri_abspath,
+ const char *basename,
+ svn_node_kind_t kind,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Return an array of const char * elements, which represent local absolute
+ * paths for nodes, within the working copy indicated by WRI_ABSPATH, which
+ * are copies of REPOS_RELPATH and have node kind KIND.
+ * If no such nodes exist, return an empty array.
+ *
+ * This function returns only paths to nodes which are present in the highest
+ * layer of the WC. In other words, paths to deleted and/or excluded nodes are
+ * never returned.
+ */
+svn_error_t *
+svn_wc__find_copies_of_repos_path(apr_array_header_t **abspaths,
+ const char *wri_abspath,
+ const char *repos_relpath,
+ svn_node_kind_t kind,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* Get the working revision of @a local_abspath using @a wc_ctx. If @a
* local_abspath is not in the working copy, return @c
* SVN_ERR_WC_PATH_NOT_FOUND.
@@ -1762,7 +1800,7 @@ svn_wc__resolve_conflicts(svn_wc_context_t *wc_ctx,
void *notify_baton,
apr_pool_t *scratch_pool);
-/**
+/**
* Resolve the text conflict at LOCAL_ABSPATH as per CHOICE, and then
* mark the conflict resolved.
* The working copy must already be locked for resolving, e.g. by calling
@@ -1779,7 +1817,7 @@ svn_wc__conflict_text_mark_resolved(svn_wc_context_t *wc_ctx,
void *notify_baton,
apr_pool_t *scratch_pool);
-/**
+/**
* Resolve the conflicted property PROPNAME at LOCAL_ABSPATH as per CHOICE,
* and then mark the conflict resolved. If MERGED_VALUE is not NULL, this is
* the new merged property, used when choosing #svn_wc_conflict_choose_merged.
@@ -1810,7 +1848,7 @@ svn_wc__conflict_prop_mark_resolved(svn_wc_context_t *wc_ctx,
*
* The tree conflict at LOCAL_ABSPATH must have the following properties or
* SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE will be returned:
- *
+ *
* operation: svn_wc_operation_update or svn_wc_operation_switch
* local change: svn_wc_conflict_reason_deleted or
* svn_wc_conflict_reason_replaced or
@@ -1847,7 +1885,7 @@ svn_wc__conflict_tree_update_break_moved_away(svn_wc_context_t *wc_ctx,
*
* The tree conflict at LOCAL_ABSPATH must have the following properties or
* SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE will be returned:
- *
+ *
* operation: svn_wc_operation_update or svn_wc_operation_switch
* local change: svn_wc_conflict_reason_deleted or
* svn_wc_conflict_reason_replaced
@@ -1883,7 +1921,7 @@ svn_wc__conflict_tree_update_raise_moved_away(svn_wc_context_t *wc_ctx,
*
* The tree conflict at LOCAL_ABSPATH must have the following properties or
* SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE will be returned:
- *
+ *
* operation: svn_wc_operation_update or svn_wc_operation_switch
* local change: svn_wc_conflict_reason_moved_away
* incoming change: svn_wc_conflict_action_edit
@@ -2044,15 +2082,19 @@ svn_wc__acquire_write_lock_for_resolve(const char **lock_root_abspath,
/* The implemementation of svn_wc_diff6(), but reporting to a diff processor
*
- * If ROOT_RELPATH is not NULL, set *ROOT_RELPATH to the target of the diff
- * within the diff namespace. ("" or a single path component).
+ * New mode, when ANCHOR_AT_GIVEN_PATHS is true:
+ *
+ * Anchor the DIFF_PROCESSOR at LOCAL_ABSPATH.
+ *
+ * Backward compatibility mode for svn_wc_diff6(),
+ * when ANCHOR_AT_GIVEN_PATHS is false:
*
- * If ROOT_IS_FILE is NOT NULL set it
- * the first processor call. (The anchor is LOCAL_ABSPATH or an ancestor of it)
+ * Send diff processor relpaths relative to LOCAL_ABSPATH if it is a
+ * directory; otherwise, relative to the parent of LOCAL_ABSPATH.
+ * This matches the "anchor and target" semantics of svn_wc_diff6().
*/
svn_error_t *
-svn_wc__diff7(const char **root_relpath,
- svn_boolean_t *root_is_dir,
+svn_wc__diff7(svn_boolean_t anchor_at_given_paths,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
diff --git a/subversion/include/svn_client.h b/subversion/include/svn_client.h
index 06dbbc35a7b3..c8bc74b3cbca 100644
--- a/subversion/include/svn_client.h
+++ b/subversion/include/svn_client.h
@@ -500,7 +500,7 @@ typedef struct svn_client_commit_item3_t
* contents in @c incoming_prop_changes->pool, so that it has the
* same lifetime as this data structure.
*
- * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
+ * See https://issues.apache.org/jira/browse/SVN-806 for a
* description of what would happen if the post-commit process
* didn't group these changes together with all other changes to the
* item.
@@ -520,7 +520,7 @@ typedef struct svn_client_commit_item3_t
/**
* When processing the commit this contains the relative path for
- * the commit session. #NULL until the commit item is preprocessed.
+ * the commit session. NULL until the commit item is preprocessed.
* @since New in 1.7.
*/
const char *session_relpath;
@@ -736,16 +736,11 @@ typedef svn_error_t *(*svn_client_get_commit_log_t)(
* @{
*/
-/** Callback type used by svn_client_blame5() to notify the caller
+/** Callback type used by svn_client_blame6() to notify the caller
* that line @a line_no of the blamed file was last changed in @a revision
* which has the revision properties @a rev_props, and that the contents were
* @a line.
*
- * @a start_revnum and @a end_revnum contain the start and end revision
- * number of the entire blame operation, as determined from the repository
- * inside svn_client_blame5(). This can be useful for the blame receiver
- * to format the blame output.
- *
* If svn_client_blame5() was called with @a include_merged_revisions set to
* TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
* set, otherwise they will be NULL. @a merged_path will be set to the
@@ -758,6 +753,49 @@ typedef svn_error_t *(*svn_client_get_commit_log_t)(
* will be true if the reason there is no blame information is that the line
* was modified locally. In all other cases @a local_change will be false.
*
+ * Character Encoding and Line Splitting:
+ *
+ * It is up to the client to determine the character encoding. The @a line
+ * content is delivered without any encoding conversion. The line splitting
+ * is designed to work with ASCII-compatible encodings including UTF-8. Any
+ * of the byte sequences LF ("\n"), CR ("\n"), CR LF ("\r\n") ends a line
+ * and is not included in @a line. The @a line content can include all other
+ * byte values including zero (ASCII NUL).
+ *
+ * @note That is how line splitting is done on the final file content, from
+ * which this callback is driven. It is not entirely clear whether the line
+ * splitting used to calculate diffs between each revision and assign a
+ * revision number to each line is exactly compatible with this in all cases.
+ *
+ * Blaming files that have <tt>svn:mime-type</tt> set to something other
+ * than <tt>text/...</tt> requires the @a ignore_mime_type flag to be set to
+ * true when calling the svn_client_blame6 function.
+ *
+ * @since New in 1.12.
+ */
+typedef svn_error_t *(*svn_client_blame_receiver4_t)(
+ void *baton,
+ apr_int64_t line_no,
+ svn_revnum_t revision,
+ apr_hash_t *rev_props,
+ svn_revnum_t merged_revision,
+ apr_hash_t *merged_rev_props,
+ const char *merged_path,
+ const svn_string_t *line,
+ svn_boolean_t local_change,
+ apr_pool_t *pool);
+
+/**
+ * Similar to #svn_client_blame_receiver4_t, but with the @a line parameter
+ * as a (const char*) instead of an svn_string_t, and the parameters
+ * @a start_revnum and @a end_revnum contain the start and end revision
+ * number of the entire blame operation, as resolved from the repository
+ * inside svn_client_blame6().
+ *
+ * @deprecated Provided for backward compatibility with the 1.11 API.
+ * To replace @a start_revnum and @a end_revnum, see the corresponding
+ * output parameters in svn_client_blame6().
+ *
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_client_blame_receiver3_t)(
@@ -1547,6 +1585,38 @@ svn_client_switch(svn_revnum_t *result_rev,
/** @} */
+/** Callback for svn_client__layout_list()
+ *
+ * @warning EXPERIMENTAL.
+ */
+typedef svn_error_t * (*svn_client__layout_func_t)(
+ void *layout_baton,
+ const char *local_abspath,
+ const char *repos_root_url,
+ svn_boolean_t not_present,
+ svn_boolean_t url_changed,
+ const char *url,
+ svn_boolean_t revision_changed,
+ svn_revnum_t revision,
+ svn_boolean_t depth_changed,
+ svn_depth_t depth,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Describe the layout of the working copy below @a local_abspath to
+ * the callback @a layout.
+ *
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client__layout_list(const char *local_abspath,
+ svn_client__layout_func_t layout,
+ void *layout_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+
/**
* @defgroup Add Begin versioning files/directories in a working copy.
*
@@ -2888,6 +2958,12 @@ svn_client_log(const apr_array_header_t *targets,
* #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or
* newer.
*
+ * Before the first call to @a receiver, set @a *start_revnum_p and
+ * @a *end_revnum_p to the start and end revision number of the entire
+ * blame operation, as resolved from the repository. This can be useful
+ * for the blame receiver to format the blame output. Any or both of these
+ * arguments may be @c NULL.
+ *
* Use @a diff_options to determine how to compare different revisions of the
* target.
*
@@ -2896,8 +2972,33 @@ svn_client_log(const apr_array_header_t *targets,
*
* Use @a pool for any temporary allocation.
*
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_client_blame6(svn_revnum_t *start_revnum_p,
+ svn_revnum_t *end_revnum_p,
+ const char *path_or_url,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *start,
+ const svn_opt_revision_t *end,
+ const svn_diff_file_options_t *diff_options,
+ svn_boolean_t ignore_mime_type,
+ svn_boolean_t include_merged_revisions,
+ svn_client_blame_receiver4_t receiver,
+ void *receiver_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+
+/**
+ * Similar to svn_client_blame6(), but with #svn_client_blame_receiver3_t
+ * as the receiver.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.11 API.
+ *
* @since New in 1.7.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_blame5(const char *path_or_url,
const svn_opt_revision_t *peg_revision,
@@ -2911,9 +3012,8 @@ svn_client_blame5(const char *path_or_url,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-
/**
- * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
+ * Similar to svn_client_blame5(), but with #svn_client_blame_receiver2_t
* as the receiver.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
@@ -3060,11 +3160,17 @@ svn_client_blame(const char *path_or_url,
* The above two options are mutually exclusive. It is an error to set
* both to TRUE.
*
+ * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo'
+ * property changes in a human-readable form that says what changes were
+ * merged or reverse merged; otherwise (or if the mergeinfo property values
+ * don't parse correctly) display them just like any other property.
+ *
* Generated headers are encoded using @a header_encoding.
*
- * Diff output will not be generated for binary files, unless @a
- * ignore_content_type is TRUE, in which case diffs will be shown
- * regardless of the content types.
+ * If either side has an svn:mime-type property that indicates 'binary'
+ * content, then if @a ignore_content_type is set, attempt to produce the
+ * diff in the usual way, otherwise produce a 'GIT binary diff' in git mode
+ * or print a warning message in non-git mode.
*
* @a diff_options (an array of <tt>const char *</tt>) is used to pass
* additional command line options to the diff processes invoked to compare
@@ -3090,8 +3196,39 @@ svn_client_blame(const char *path_or_url,
* @note @a relative_to_dir doesn't affect the path index generated by
* external diff programs.
*
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_diff7(const apr_array_header_t *diff_options,
+ const char *path_or_url1,
+ const svn_opt_revision_t *revision1,
+ const char *path_or_url2,
+ const svn_opt_revision_t *revision2,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/** Similar to svn_client_diff7(), but with @a pretty_print_mergeinfo
+ * always passed as @c TRUE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.10 API.
* @since New in 1.8.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_diff6(const apr_array_header_t *diff_options,
const char *path_or_url1,
@@ -3249,14 +3386,45 @@ svn_client_diff(const apr_array_header_t *diff_options,
* be either a working-copy path or URL.
*
* If @a peg_revision is #svn_opt_revision_unspecified, behave
- * identically to svn_client_diff6(), using @a path_or_url for both of that
+ * identically to svn_client_diff7(), using @a path_or_url for both of that
* function's @a path_or_url1 and @a path_or_url2 arguments.
*
- * All other options are handled identically to svn_client_diff6().
+ * All other options are handled identically to svn_client_diff7().
*
* @since New in 1.8.
*/
svn_error_t *
+svn_client_diff_peg7(const apr_array_header_t *diff_options,
+ const char *path_or_url,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *start_revision,
+ const svn_opt_revision_t *end_revision,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/** Similar to svn_client_diff_peg7(), but with @a pretty_print_mergeinfo
+ * always passed as @c TRUE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * @since New in 1.7.
+ */
+SVN_DEPRECATED
+svn_error_t *
svn_client_diff_peg6(const apr_array_header_t *diff_options,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
@@ -3419,7 +3587,7 @@ svn_client_diff_peg(const apr_array_header_t *diff_options,
* Calls @a summarize_func with @a summarize_baton for each difference
* with a #svn_client_diff_summarize_t structure describing the difference.
*
- * See svn_client_diff6() for a description of the other parameters.
+ * See svn_client_diff7() for a description of the other parameters.
*
* @since New in 1.5.
*/
@@ -4274,17 +4442,23 @@ svn_client_relocate(const char *dir,
/**
* Restore the pristine version of working copy @a paths,
- * effectively undoing any local mods. For each path in @a paths,
- * revert it if it is a file. Else if it is a directory, revert
- * according to @a depth:
+ * effectively undoing any local mods. This means returning each
+ * path's versioned status to 'unmodified' and changing its on-disk
+ * state to match that.
+ *
+ * If an item was in a state of conflict, reverting also marks the
+ * conflict as resolved. If there are conflict marker files attached
+ * to the item, these are removed.
*
* @a paths is an array of (const char *) local WC paths.
*
- * If @a depth is #svn_depth_empty, revert just the properties on
- * the directory; else if #svn_depth_files, revert the properties
+ * For each path in @a paths, revert it if it is a file. Else if it is
+ * a directory, revert according to @a depth:
+ * If @a depth is #svn_depth_empty, revert just
+ * the directory; else if #svn_depth_files, revert the directory
* and any files immediately under the directory; else if
* #svn_depth_immediates, revert all of the preceding plus
- * properties on immediate subdirectories; else if #svn_depth_infinity,
+ * immediate subdirectories; else if #svn_depth_infinity,
* revert path and everything under it fully recursively.
*
* @a changelists is an array of <tt>const char *</tt> changelist
@@ -4296,9 +4470,18 @@ svn_client_relocate(const char *dir,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared while reverting.
*
- * If @a metadata_only is TRUE, the files and directories aren't changed
- * by the operation. If there are conflict marker files attached to the
- * targets these are removed.
+ * The @a metadata_only and @a added_keep_local options control the
+ * extent of reverting. If @a metadata_only is TRUE, the working copy
+ * files are untouched, but if there are conflict marker files attached
+ * to these files these markers are removed. Otherwise, if
+ * @a added_keep_local is TRUE, then all items are reverted except an
+ * item that was scheduled as plain 'add' (not a copy) will not be
+ * removed from the working copy. Otherwise, all items are reverted and
+ * their on-disk state changed to match.
+ *
+ * Consult the @c SVN_CONFIG_OPTION_USE_COMMIT_TIMES option in @a ctx to
+ * determine whether or not to revert timestamp to the time of last
+ * commit ('use-commit-times = yes').
*
* If @a ctx->notify_func2 is non-NULL, then for each item reverted,
* call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
@@ -4308,8 +4491,28 @@ svn_client_relocate(const char *dir,
* then do not error, just invoke @a ctx->notify_func2 with @a
* ctx->notify_baton2, using notification code #svn_wc_notify_skip.
*
+ * @warning The 'revert' command intentionally and permanently loses
+ * local modifications.
+ *
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_revert4(const apr_array_header_t *paths,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_client_revert4(), but with @a added_keep_local set to
+ * TRUE.
+ *
* @since New in 1.9.
+ * @deprecated Provided for backwards compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_revert3(const apr_array_header_t *paths,
svn_depth_t depth,
@@ -4427,12 +4630,23 @@ typedef enum svn_client_conflict_option_id_t {
svn_client_conflict_option_incoming_move_dir_merge,
/* Options for local move vs incoming edit on merge. */
- svn_client_conflict_option_local_move_file_text_merge
+ svn_client_conflict_option_local_move_file_text_merge,
+ svn_client_conflict_option_local_move_dir_merge, /**< @since New in 1.11. */
+
+ /* Options for local missing vs incoming edit on merge. */
+ svn_client_conflict_option_sibling_move_file_text_merge, /**< @since New in 1.11. */
+ svn_client_conflict_option_sibling_move_dir_merge, /**< @since New in 1.11. */
+
+ /* Options for local move vs incoming move on merge. */
+ svn_client_conflict_option_both_moved_file_merge, /*< @since New in 1.12 */
+ svn_client_conflict_option_both_moved_file_move_merge, /*< @since New in 1.12 */
+ svn_client_conflict_option_both_moved_dir_merge, /*< @since New in 1.12 */
+ svn_client_conflict_option_both_moved_dir_move_merge, /*< @since New in 1.12 */
} svn_client_conflict_option_id_t;
/**
* Set a merged property value on @a option to @a merged_propval.
- *
+ *
* Setting the merged value is required before resolving the property
* conflict using an option with ID svn_client_conflict_option_merged_text.
*
@@ -4448,26 +4662,45 @@ svn_client_conflict_option_set_merged_propval(
const svn_string_t *merged_propval);
/**
- * Get a list of possible repository paths which can be applied to the
- * svn_client_conflict_option_incoming_move_file_text_merge or
- * svn_client_conflict_option_incoming_move_dir_merge resolution
- * @a option. (If a different option is passed in, this function will
- * raise an assertion failure.)
- *
- * In some situations, there can be multiple possible destinations for an
- * incoming move. One such situation is where a file was copied and moved
- * in the same revision: svn cp a b; svn mv a c; svn commit
+ * Get a list of possible repository paths which can be applied to @a option.
+ *
+ * In some situations, there can be multiple possible destinations for a move.
+ * One such situation is where a file was copied and moved in the same revision:
+ * svn cp a b; svn mv a c; svn commit
* When this move is merged elsewhere, both b and c will appear as valid move
* destinations to the conflict resolver. To resolve such ambiguity, the client
* may call this function to obtain a list of possible destinations the user
* may choose from.
*
+ * @a *possible_moved_to_repos_relpaths is set to NULL if the @a option does
+ * not support multiple move targets. API users may assume that only one option
+ * among those which can be applied to a conflict supports move targets.
+ *
* The array is allocated in @a result_pool and will have "const char *"
* elements pointing to strings also allocated in @a result_pool.
* All paths are relpaths, and relative to the repository root.
*
- * @see svn_client_conflict_option_set_moved_to_repos_relpath()
+ * @see svn_client_conflict_option_set_moved_to_repos_relpath2()
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(
+ apr_array_header_t **possible_moved_to_repos_relpaths,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Get a list of possible repository paths which can be applied to the
+ * svn_client_conflict_option_incoming_move_file_text_merge, or the
+ * svn_client_conflict_option_incoming_move_dir_merge resolution @a option.
+ *
+ * In SVN 1.10, if a different option is passed in, this function will
+ * raise an assertion failure. Otherwise this function behaves just like
+ * svn_client_conflict_option_get_moved_to_repos_relpath_candidates2().
+ *
* @since New in 1.10.
+ * @deprecated use svn_client_conflict_option_get_moved_to_repos_relpath_candidates2()
*/
svn_error_t *
svn_client_conflict_option_get_moved_to_repos_relpath_candidates(
@@ -4477,19 +4710,34 @@ svn_client_conflict_option_get_moved_to_repos_relpath_candidates(
apr_pool_t *scratch_pool);
/**
- * Set the preferred moved target repository path for the
- * svn_client_conflict_option_incoming_move_file_text_merge or
- * svn_client_conflict_option_incoming_move_dir_merge resolution option.
- *
+ * Set the preferred moved target repository path. If @a option is not
+ * applicable to a moved target repository path, do nothing.
+ *
* @a preferred_move_target_idx must be a valid index into the list returned
* by svn_client_conflict_option_get_moved_to_repos_relpath_candidates().
- *
+ *
* This function can be called multiple times.
* It affects the output of svn_client_conflict_tree_get_description() and
* svn_client_conflict_option_get_description(). Call these functions again
* to get updated descriptions containing the newly selected move target.
*
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_conflict_option_set_moved_to_repos_relpath2(
+ svn_client_conflict_option_t *option,
+ int preferred_move_target_idx,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Like svn_client_conflict_option_set_moved_to_repos_relpath2(), except
+ * that in SVN 1.10 it raises an assertion failure if an option other
+ * than svn_client_conflict_option_incoming_move_file_text_merge or
+ * svn_client_conflict_option_incoming_move_dir_merge is passed.
+ *
* @since New in 1.10.
+ * @deprecated use svn_client_conflict_option_set_moved_to_repos_relpath2()
*/
svn_error_t *
svn_client_conflict_option_set_moved_to_repos_relpath(
@@ -4500,24 +4748,45 @@ svn_client_conflict_option_set_moved_to_repos_relpath(
/**
* Get a list of possible moved-to abspaths in the working copy which can be
- * applied to the svn_client_conflict_option_incoming_move_file_text_merge
- * or svn_client_conflict_option_incoming_move_dir_merge resolution @a option.
- * (If a different option is passed in, this function will raise an assertion
- * failure.)
- *
- * All paths in the returned list correspond to the repository path which
- * is assumed to be the destination of the incoming move operation.
- * To support cases where this destination path is ambiguous, the client may
- * call svn_client_conflict_option_get_moved_to_repos_relpath_candidates()
- * before calling this function to let the user select a repository path first.
- *
+ * applied to @a option.
+ *
+ * All working copy paths in the returned list correspond to one repository
+ * path which is be one of the possible destinations of a move operation.
+ * More than one repository-side move target candidate may exist; call
+ * svn_client_conflict_option_get_moved_to_repos_relpath_candidates() before
+ * calling this function to let the user select a repository path first.
+ * Otherwise, one of the repository-side paths will be selected internally.
+ *
+ * @a *possible_moved_to_abspaths is set to NULL if the @a option does not
+ * support multiple move targets. API users may assume that only one option
+ * among those which can be applied to a conflict supports move targets.
+ *
* If no possible moved-to paths can be found, return an empty array.
* This doesn't mean that no move happened in the repository. It is possible
* that the move destination is outside the scope of the current working copy,
* for example, in which case the conflict must be resolved in some other way.
*
- * @see svn_client_conflict_option_set_moved_to_abspath()
+ * @see svn_client_conflict_option_set_moved_to_abspath2()
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_conflict_option_get_moved_to_abspath_candidates2(
+ apr_array_header_t **possible_moved_to_abspaths,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Get a list of possible moved-to abspaths in the working copy which can be
+ * svn_client_conflict_option_incoming_move_file_text_merge, or the
+ * svn_client_conflict_option_incoming_move_dir_merge resolution @a option.
+ *
+ * In SVN 1.10, if a different option is passed in, this function will
+ * raise an assertion failure. Otherwise this function behaves just like
+ * svn_client_conflict_option_get_moved_to_abspath_candidates2().
+ *
* @since New in 1.10.
+ * @deprecated use svn_client_conflict_option_get_moved_to_abspath_candidates2()
*/
svn_error_t *
svn_client_conflict_option_get_moved_to_abspath_candidates(
@@ -4527,14 +4796,34 @@ svn_client_conflict_option_get_moved_to_abspath_candidates(
apr_pool_t *scratch_pool);
/**
- * Set the preferred moved target abspath for the
- * svn_client_conflict_option_incoming_move_file_text_merge or
- * svn_client_conflict_option_incoming_move_dir_merge resolution option.
- *
+ * Set the preferred moved target working copy path. If @a option is not
+ * applicable to a moved target working copy path, do nothing.
+ *
* @a preferred_move_target_idx must be a valid index into the list
- * returned by svn_client_conflict_option_get_moved_to_abspath_candidates().
- *
+ * returned by svn_client_conflict_option_get_moved_to_abspath_candidates2().
+ *
+ * This function can be called multiple times.
+ * It affects the output of svn_client_conflict_tree_get_description() and
+ * svn_client_conflict_option_get_description(). Call these functions again
+ * to get updated descriptions containing the newly selected move target.
+ *
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_conflict_option_set_moved_to_abspath2(
+ svn_client_conflict_option_t *option,
+ int preferred_move_target_idx,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Like svn_client_conflict_option_set_moved_to_abspath2(), except that
+ * in SVN 1.10 this function raises an assertion failure if an option
+ * other than svn_client_conflict_option_incoming_move_file_text_merge or
+ * svn_client_conflict_option_incoming_move_dir_merge is passed.
+ *
* @since New in 1.10.
+ * @deprecated use svn_client_conflict_option_set_moved_to_abspath2()
*/
svn_error_t *
svn_client_conflict_option_set_moved_to_abspath(
@@ -4558,7 +4847,7 @@ svn_client_conflict_option_find_by_id(
/**
* Return a conflict for the conflicted path @a local_abspath.
- *
+ *
* @since New in 1.10.
*/
svn_error_t *
@@ -4573,7 +4862,7 @@ svn_client_conflict_get(svn_client_conflict_t **conflict,
*
* The lifetime of @a conflict is limited. Its allocation in
* memory will not persist beyond this callback's execution.
- *
+ *
* @since New in 1.10.
*/
typedef svn_error_t *(*svn_client_conflict_walk_func_t)(
@@ -4583,15 +4872,15 @@ typedef svn_error_t *(*svn_client_conflict_walk_func_t)(
/**
* Walk all conflicts within the specified @a depth of @a local_abspath.
- * Pass each conflict found during the walk to the @conflict_walk_func
+ * Pass each conflict found during the walk to the @a conflict_walk_func
* callback, along with @a conflict_walk_func_baton.
* Use cancellation and notification support provided by client context @a ctx.
- *
+ *
* This callback may choose to resolve the conflict. If the act of resolving
* a conflict creates new conflicts within the walked working copy (as might
* be the case for some tree conflicts), the callback will be invoked for each
* such new conflict as well.
- *
+ *
* @since New in 1.10.
*/
svn_error_t *
@@ -4611,7 +4900,7 @@ svn_client_conflict_walk(const char *local_abspath,
* It contains the names of conflicted properties. If no property conflict
* exists, the array will contain no elements.
*
-* @since New in 1.10.
+* @since New in 1.10.
*/
svn_error_t *
svn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted,
@@ -4794,7 +5083,7 @@ svn_client_conflict_option_get_description(svn_client_conflict_option_t *option,
* Client implementations which aim to avoid excessive interactive prompting
* may wish to try a recommended resolution option before falling back to
* asking the user which option to use.
- *
+ *
* Conflict resolution with a recommended option is not guaranteed to succeed.
* Clients should check for errors when trying to resolve a conflict and fall
* back to other options and/or interactive prompting when the recommended
@@ -4812,7 +5101,7 @@ svn_client_conflict_get_recommended_option_id(svn_client_conflict_t *conflict);
* Return the absolute path to the conflicted working copy node described
* by @a conflict.
*
- * @since New in 1.10.
+ * @since New in 1.10.
*/
const char *
svn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict);
@@ -4821,7 +5110,7 @@ svn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict);
* Return the operation during which the conflict described by @a
* conflict was recorded.
*
- * @since New in 1.10.
+ * @since New in 1.10.
*/
svn_wc_operation_t
svn_client_conflict_get_operation(svn_client_conflict_t *conflict);
@@ -4829,8 +5118,8 @@ svn_client_conflict_get_operation(svn_client_conflict_t *conflict);
/**
* Return the action an update, switch, or merge operation attempted to
* perform on the working copy node described by @a conflict.
- *
- * @since New in 1.10.
+ *
+ * @since New in 1.10.
*/
svn_wc_conflict_action_t
svn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict);
@@ -4843,14 +5132,14 @@ svn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict);
* modifications in the working copy. During merge operations it may
* additionally be part of the history of the merge target branch, anywhere
* between the common ancestor revision and the working copy revision.
- *
- * @since New in 1.10.
+ *
+ * @since New in 1.10.
*/
svn_wc_conflict_reason_t
svn_client_conflict_get_local_change(svn_client_conflict_t *conflict);
/**
- * Return information about the repository associated with @a conflict.
+ * Return information about the repository associated with @a conflict.
* In case of a foreign-repository merge this will differ from the
* repository information associated with the merge target working copy.
*
@@ -4868,11 +5157,11 @@ svn_client_conflict_get_repos_info(const char **repos_root_url,
* old version of the conflicted node described by @a conflict.
*
* If the repository-relative path is not available, the @a
- * *incoming_old_repos_relpath will be set to @c NULL,
+ * *incoming_old_repos_relpath will be set to @c NULL,
*
* If the peg revision is not available, @a *incoming_old_regrev will be
* set to SVN_INVALID_REVNUM.
- *
+ *
* If the node kind is not available or if the node does not exist at the
* specified path and revision, @a *incoming_old_node_kind will be set to
* svn_node_none.
@@ -4881,7 +5170,7 @@ svn_client_conflict_get_repos_info(const char **repos_root_url,
* Any output parameter may be set to @c NULL by the caller to indicate that
* a particular piece of information should not be returned.
*
- * In case of tree conflicts, this path@revision does not necessarily exist
+ * In case of tree conflicts, this "path@revision" does not necessarily exist
* in the repository, and it does not necessarily represent the incoming
* change which is responsible for the occurance of the tree conflict.
* The responsible incoming change is generally located somewhere between
@@ -4987,7 +5276,7 @@ svn_client_conflict_prop_get_reject_abspath(svn_client_conflict_t *conflict);
* Return the set of property values involved in the conflict of property
* PROPNAME described by @a conflict. If a property value is unavailable the
* corresponding output argument is set to @c NULL.
- *
+ *
* A 3-way diff of these property values can be generated with
* svn_diff_mem_string_diff3(). A merged version with conflict
* markers can be generated with svn_diff_mem_string_output_merge3().
@@ -5055,11 +5344,11 @@ const char *
svn_client_conflict_text_get_mime_type(svn_client_conflict_t *conflict);
/**
- * Return absolute paths to the versions of the text-conflicted file
+ * Return absolute paths to the versions of the text-conflicted file
* described by @a conflict.
*
* If a particular content is not available, it is set to @c NULL.
- *
+ *
* ### Should this be returning svn_stream_t instead of paths?
* @since: New in 1.10.
*/
@@ -5330,7 +5619,7 @@ svn_client_copy7(const apr_array_header_t *sources,
/**
* Similar to svn_client_copy7(), but doesn't support meta_data_only
* and cannot pin externals.
- *
+ *
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
@@ -6549,7 +6838,7 @@ svn_client_list2(const char *path_or_url,
/**
* Similar to svn_client_list2(), but with @a recurse instead of @a depth.
- * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
+ * If @a recurse is FALSE, pass #svn_depth_immediates for @a depth; else
* pass #svn_depth_infinity.
*
* @since New in 1.4.
@@ -6714,169 +7003,12 @@ svn_client_cat(svn_stream_t *out,
/** @} end group: cat */
-
-/** Shelving commands
- *
- * @defgroup svn_client_shelve_funcs Client Shelving Functions
- * @{
- */
-
-/** Shelve a change.
- *
- * Shelve as @a name the local modifications found by @a paths, @a depth,
- * @a changelists. Revert the shelved change from the WC unless @a keep_local
- * is true.
- *
- * If @a dry_run is true, don't actually do it.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelve(const char *name,
- const apr_array_header_t *paths,
- svn_depth_t depth,
- const apr_array_header_t *changelists,
- svn_boolean_t keep_local,
- svn_boolean_t dry_run,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
-/** Unshelve the shelved change @a name.
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- * Rename the shelved patch to add a '.bak' extension unless @a keep is true.
- *
- * If @a dry_run is true, don't actually do it.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_unshelve(const char *name,
- const char *local_abspath,
- svn_boolean_t keep,
- svn_boolean_t dry_run,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
-/** Delete the shelved patch @a name.
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * If @a dry_run is true, don't actually do it.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelves_delete(const char *name,
- const char *local_abspath,
- svn_boolean_t dry_run,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool);
-
-/** Information about a shelved patch.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-typedef struct svn_client_shelved_patch_info_t
-{
- const char *message; /* first line of log message */
- const char *patch_path; /* abspath of the patch file */
- svn_io_dirent2_t *dirent; /* info about the patch file */
- apr_time_t mtime; /* a copy of dirent->mtime */
-} svn_client_shelved_patch_info_t;
-
-/** Set @a *shelved_patch_infos to a hash, keyed by patch name, of pointers to
- * @c svn_client_shelved_patch_info_t structures.
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelves_list(apr_hash_t **shelved_patch_infos,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/** Set @a *any_shelved to indicate if there are any shelved changes in this WC.
- *
- * This shall provide the answer fast, regardless of how many changes
- * are stored, unlike svn_client_shelves_list().
- *
- * ### Initial implementation isn't O(1) fast -- it just calls
- * svn_client_shelves_list().
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelves_any(svn_boolean_t *any_shelved,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
-
-/** Set @a *affected_paths to a hash with one entry for each path affected
- * by the shelf @a name. The hash key is the old path and value is
- * the new path, both relative to the WC root. The key and value are the
- * same except when a path is moved or copied.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelf_get_paths(apr_hash_t **affected_paths,
- const char *name,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/** Set @a *has_changes to indicate whether the shelf @a name
- * contains any modifications, in other words if svn_client_shelf_get_paths()
- * would return a non-empty set of paths.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelf_has_changes(svn_boolean_t *has_changes,
- const char *name,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
-
-/** @} */
-
/** Changelist commands
*
* @defgroup svn_client_changelist_funcs Client Changelist Functions
* @{
*/
-/** Implementation note:
- *
- * For now, changelists are implemented by scattering the
- * associations across multiple .svn/entries files in a working copy.
- * However, this client API was written so that we have the option of
- * changing the underlying implementation -- we may someday want to
- * store changelist definitions in a centralized database.
- */
-
/**
* Add each path in @a paths (recursing to @a depth as necessary) to
* @a changelist. If a path is already a member of another
diff --git a/subversion/include/svn_config.h b/subversion/include/svn_config.h
index d194af09efbf..5e2ae1790fa6 100644
--- a/subversion/include/svn_config.h
+++ b/subversion/include/svn_config.h
@@ -44,8 +44,8 @@ extern "C" {
/**************************************************************************
*** ***
*** For a description of the SVN configuration file syntax, see ***
- *** your ~/.subversion/README, which is written out automatically by ***
- *** svn_config_ensure(). ***
+ *** your ~/.subversion/README.txt, which is written out automatically ***
+ *** by svn_config_ensure(). ***
*** ***
**************************************************************************/
diff --git a/subversion/include/svn_delta.h b/subversion/include/svn_delta.h
index c15788ee4d00..ee9e11fed6b5 100644
--- a/subversion/include/svn_delta.h
+++ b/subversion/include/svn_delta.h
@@ -495,6 +495,10 @@ svn_txdelta_send_contents(const unsigned char *contents,
* since there's nothing else in the delta application's context to
* supply a path for error messages.)
*
+ * The @a source stream will NOT be closed. The @a target stream will be
+ * closed when the window handler is given a null window to signal the
+ * end of the delta.
+ *
* @note To avoid lifetime issues, @a error_info is copied into
* @a pool or a subpool thereof.
*/
@@ -859,7 +863,7 @@ svn_txdelta_skip_svndiff_window(apr_file_t *file,
* @c apply_textdelta / @c apply_textdelta_stream and @c close_file
* should not refer to a parent directory baton UNLESS the editor has
* taken precautions to allocate it in a pool of the appropriate
- * lifetime (the @a dir_pool passed to @c open_directory and
+ * lifetime (the @a result_pool passed to @c open_directory and
* @c add_directory definitely does not have the proper lifetime).
* In general, it is recommended to simply avoid keeping a parent
* directory baton in a file baton.
@@ -1285,24 +1289,47 @@ svn_delta_depth_filter_editor(const svn_delta_editor_t **editor,
/** Callback function type for svn_delta_path_driver().
*
* The handler of this callback is given the callback baton @a
- * callback_baton, @a path which is a relpath relative to the
+ * callback_baton, @a editor and @a edit_baton which represent the
+ * editor being driven, @a relpath which is a relpath relative to the
* root of the edit, and the @a parent_baton which represents
- * path's parent directory as created by the editor passed to
- * svn_delta_path_driver().
+ * @a relpath's parent directory as created by the editor.
+ *
+ * If the handler deletes the node at @a relpath (and does not replace it
+ * with an added directory) it must set @a *dir_baton to null or leave
+ * it unchanged.
*
- * If @a path represents a directory, the handler must return a @a
- * *dir_baton for @a path, generated from the same editor (so that the
- * driver can later close that directory).
+ * If the handler opens (or adds) a directory at @a relpath, it must set
+ * @a *dir_baton to the directory baton for @a relpath, generated from
+ * the same editor. The driver will close the directory later.
*
- * If, however, @a path represents a file, the handler should NOT
- * return any file batons. It can close any opened or added files
- * immediately, or delay that close until the end of the edit when
- * svn_delta_path_driver() returns.
+ * If the handler opens (or adds) a file at @a relpath, the handler must
+ * set @a *dir_baton to null or leave it unchanged. The handler must
+ * either close the file immediately, or delay that close until the end
+ * of the edit when svn_delta_path_driver() returns.
*
* Finally, if @a parent_baton is @c NULL, then the root of the edit
* is also one of the paths passed to svn_delta_path_driver(). The
* handler of this callback must call the editor's open_root()
* function and return the top-level root dir baton in @a *dir_baton.
+ *
+ * @since New in 1.12.
+ */
+typedef svn_error_t *(*svn_delta_path_driver_cb_func2_t)(
+ void **dir_baton,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ void *parent_baton,
+ void *callback_baton,
+ const char *relpath,
+ apr_pool_t *pool);
+
+/** Like #svn_delta_path_driver_cb_func2_t but without the @a editor and
+ * @a edit_baton parameters. The user must arrange for the editor to be
+ * passed through @a callback_baton (if required, which it usually is).
+ * And @a path could possibly have a '/' prefix instead of being a relpath;
+ * see the note on svn_delta_path_driver2().
+ *
+ * @deprecated Provided for backward compatibility with the 1.11 API.
*/
typedef svn_error_t *(*svn_delta_path_driver_cb_func_t)(
void **dir_baton,
@@ -1312,24 +1339,51 @@ typedef svn_error_t *(*svn_delta_path_driver_cb_func_t)(
apr_pool_t *pool);
-/** Drive @a editor (with its @a edit_baton) to visit each path in @a paths.
+/** Drive @a editor (with its @a edit_baton) to visit each path in @a relpaths.
+ *
* As each path is hit as part of the editor drive, use
* @a callback_func and @a callback_baton to allow the caller to handle
* the portion of the editor drive related to that path.
*
- * Each path in @a paths is a (const char *) relpath, relative
- * to the root path of the @a edit. The editor drive will be
- * performed in the same order as @a paths. The paths should be sorted
- * using something like svn_sort_compare_paths to ensure that a depth-first
- * pattern is observed for directory/file baton creation. If @a sort_paths
+ * Each path in @a relpaths is a (const char *) relpath, relative
+ * to the root path of the edit. The editor drive will be
+ * performed in the same order as @a relpaths. The paths should be sorted
+ * using something like svn_sort_compare_paths() to ensure that each
+ * directory in the depth-first walk is visited only once. If @a sort_paths
* is set, the function will sort the paths for you. Some callers may need
* further customization of the order (ie. libsvn_delta/compat.c).
*
+ * If the first target path (after any requested sorting) is @c "" (the
+ * root of the edit), the callback function will be responsible for
+ * calling the editor's @c open_root method; otherwise, this function
+ * will call @c open_root.
+ *
* Use @a scratch_pool for all necessary allocations.
*
- * @since New in 1.8.
+ * @since New in 1.12.
*/
svn_error_t *
+svn_delta_path_driver3(const svn_delta_editor_t *editor,
+ void *edit_baton,
+ const apr_array_header_t *relpaths,
+ svn_boolean_t sort_paths,
+ svn_delta_path_driver_cb_func2_t callback_func,
+ void *callback_baton,
+ apr_pool_t *pool);
+
+/** Like svn_delta_path_driver3() but with a different callback function
+ * signature.
+ *
+ * Optionally, paths in @a paths could have a '/' prefix instead of being
+ * relpaths. If any of them do, then (since 1.12) ALL paths sent to the
+ * callback will have a '/' prefix.
+ *
+ * @deprecated Provided for backward compatibility with the 1.11 API.
+ * @since New in 1.8. Before 1.12, paths sent to the callback were the
+ * exact paths passed in @a paths.
+ */
+SVN_DEPRECATED
+svn_error_t *
svn_delta_path_driver2(const svn_delta_editor_t *editor,
void *edit_baton,
const apr_array_header_t *paths,
@@ -1358,6 +1412,80 @@ svn_delta_path_driver(const svn_delta_editor_t *editor,
void *callback_baton,
apr_pool_t *scratch_pool);
+
+/** A state object for the path driver that is obtained from
+ * svn_delta_path_driver_start() and driven by
+ * svn_delta_path_driver_step() and svn_delta_path_driver_finish().
+ *
+ * @since New in 1.12.
+ */
+typedef struct svn_delta_path_driver_state_t svn_delta_path_driver_state_t;
+
+/** Return a path driver object that can drive @a editor (with its
+ * @a edit_baton) to visit a series of paths.
+ *
+ * As each path is hit as part of the editor drive, the path driver will
+ * call @a callback_func and @a callback_baton to allow the caller to handle
+ * the portion of the editor drive related to that path.
+ *
+ * This will not call the editor's open_root method; for that, see
+ * svn_delta_path_driver_step().
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_delta_path_driver_start(svn_delta_path_driver_state_t **state_p,
+ const svn_delta_editor_t *editor,
+ void *edit_baton,
+ svn_delta_path_driver_cb_func2_t callback_func,
+ void *callback_baton,
+ apr_pool_t *result_pool);
+
+/** Visit @a relpath.
+ *
+ * @a state is the object returned by svn_delta_path_driver_start().
+ *
+ * @a relpath is a relpath relative to the root path of the edit.
+ *
+ * This function uses the editor and the callback that were originally
+ * supplied to svn_delta_path_driver_start().
+ *
+ * This drives the editor in a depth-first order, closing and then opening
+ * directories if necessary to move from the last visited path to the new
+ * path, as required by the editor driving rules.
+ *
+ * This then calls the callback to allow the caller to handle
+ * the portion of the editor drive related to that path.
+ *
+ * If the first path to visit is @c "" (the root of the edit), the
+ * callback function will be responsible for calling the editor's
+ * @c open_root method; otherwise, this function will call @c open_root.
+ *
+ * The order of paths to visit should in general be sorted using something
+ * like svn_sort_compare_paths() to ensure that each directory in the
+ * depth-first walk is visited only once. Some editors may rely on such a
+ * restriction.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_delta_path_driver_step(svn_delta_path_driver_state_t *state,
+ const char *relpath,
+ apr_pool_t *scratch_pool);
+
+/** Finish driving the editor.
+ *
+ * @a state is the object returned by svn_delta_path_driver_start().
+ *
+ * This drives the editor to close any open directories and then calls
+ * the editor's @c close_edit method.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_delta_path_driver_finish(svn_delta_path_driver_state_t *state,
+ apr_pool_t *scratch_pool);
+
/** @} */
diff --git a/subversion/include/svn_diff.h b/subversion/include/svn_diff.h
index bd2c97084bfb..61f4b77f1eb3 100644
--- a/subversion/include/svn_diff.h
+++ b/subversion/include/svn_diff.h
@@ -711,7 +711,7 @@ svn_diff_file_output_unified(svn_stream_t *output_stream,
* @a conflict_latest to be displayed as conflict markers in the output.
* If @a conflict_original, @a conflict_modified, @a conflict_latest and/or
* @a conflict_separator is @c NULL, a default marker will be displayed.
- * @a conflict_style dictates how conflicts are displayed.
+ * @a conflict_style dictates how conflicts are displayed.
* Uses @a scratch_pool for temporary allocations.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
diff --git a/subversion/include/svn_dirent_uri.h b/subversion/include/svn_dirent_uri.h
index 94856f2295e6..cf8152bcfb7c 100644
--- a/subversion/include/svn_dirent_uri.h
+++ b/subversion/include/svn_dirent_uri.h
@@ -60,12 +60,14 @@
* form, except:
*
* - @c svn_dirent_canonicalize()
+ * - @c svn_dirent_canonicalize_safe()
* - @c svn_dirent_is_canonical()
* - @c svn_dirent_internal_style()
* - @c svn_relpath_canonicalize()
+ * - @c svn_relpath_canonicalize_safe()
* - @c svn_relpath_is_canonical()
- * - @c svn_relpath__internal_style()
* - @c svn_uri_canonicalize()
+ * - @c svn_uri_canonicalize_safe()
* - @c svn_uri_is_canonical()
*
* The Subversion codebase also recognizes some other classes of path:
@@ -144,17 +146,47 @@ extern "C" {
#endif /* __cplusplus */
-/** Convert @a dirent from the local style to the canonical internal style.
+/**
+ * Convert @a dirent from the local style to the canonical internal style.
* "Local style" means native path separators and "." for the empty path.
*
* Allocate the result in @a result_pool.
*
+ * @warning This function may call @c abort() if the @a dirent parameter
+ * is not a valid local-style path.
+ * Use svn_dirent_internal_style_safe() for tainted input.
+ *
* @since New in 1.6.
*/
const char *
svn_dirent_internal_style(const char *dirent,
apr_pool_t *result_pool);
+/**
+ * Convert @a dirent from the local style to the canonical internal style
+ * and return it in @a *internal_style_dirent. "Local style" means native
+ * path separators and "." for the empty path.
+ *
+ * Similar to svn_dirent_internal_style() (which see), but returns an error
+ * if the @a dirent can not be canonicalized or of the result does not pass
+ * the svn_dirent_is_canonical() test.
+ *
+ * If the function fails and @a non_canonical_result is not @c NULL, the
+ * result of the failed canonicalization attempt (which may be @c NULL)
+ * will be returned in @a *non_canonical_result.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_dirent_internal_style_safe(const char **internal_style_dirent,
+ const char **non_canonical_result,
+ const char *dirent,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** Convert @a dirent from the internal style to the local style.
* "Local style" means native path separators and "." for the empty path.
* If the input is not canonical, the output may not be canonical.
@@ -167,18 +199,6 @@ const char *
svn_dirent_local_style(const char *dirent,
apr_pool_t *result_pool);
-/** Convert @a relpath from the local style to the canonical internal style.
- * "Local style" means native path separators and "." for the empty path.
- *
- * Allocate the result in @a result_pool.
- *
- * @since New in 1.7.
- */
-const char *
-svn_relpath__internal_style(const char *relpath,
- apr_pool_t *result_pool);
-
-
/** Join a base dirent (@a base) with a component (@a component).
*
* If either @a base or @a component is the empty string, then the other
@@ -453,7 +473,8 @@ svn_boolean_t
svn_uri_is_root(const char *uri,
apr_size_t len);
-/** Return a new dirent like @a dirent, but transformed such that some types
+/**
+ * Return a new dirent like @a dirent, but transformed such that some types
* of dirent specification redundancies are removed.
*
* This involves:
@@ -467,14 +488,43 @@ svn_uri_is_root(const char *uri,
*
* Allocate the result in @a result_pool.
*
+ * @warning This function may call @c abort() if @a dirent can not be
+ * canonicalized.
+ * Use svn_dirent_canonicalize_safe() for tainted input.
+ *
* @since New in 1.6.
*/
const char *
svn_dirent_canonicalize(const char *dirent,
apr_pool_t *result_pool);
+/**
+ * Return a new @a *canonical_dirent like @a dirent, but transformed such
+ * that some types of dirent specification redundancies are removed.
+ *
+ * Similar to svn_dirent_canonicalize() (which see), but returns an error
+ * if the @a dirent can not be canonicalized or of the result does not pass
+ * the svn_dirent_is_canonical() test.
+ *
+ * If the function fails and @a non_canonical_result is not @c NULL, the
+ * result of the failed canonicalization attempt (which may be @c NULL)
+ * will be returned in @a *non_canonical_result.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_dirent_canonicalize_safe(const char **canonical_dirent,
+ const char **non_canonical_result,
+ const char *dirent,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
-/** Return a new relpath like @a relpath, but transformed such that some types
+/**
+ * Return a new relpath like @a relpath, but transformed such that some types
* of relpath specification redundancies are removed.
*
* This involves:
@@ -486,14 +536,44 @@ svn_dirent_canonicalize(const char *dirent,
*
* Allocate the result in @a result_pool.
*
+ * @warning This function may call @c abort() if @a relpath can not be
+ * canonicalized.
+ * Use svn_relpath_canonicalize_safe() for tainted input.
+ *
* @since New in 1.7.
*/
const char *
svn_relpath_canonicalize(const char *relpath,
apr_pool_t *result_pool);
+/**
+ * Return a new @a *canonical_relpath like @a relpath, but transformed such
+ * that some types of relpath specification redundancies are removed.
+ *
+ * Similar to svn_relpath_canonicalize() (which see), but returns an error
+ * if the @a relpath can not be canonicalized or of the result does not
+ * pass the svn_relpath_is_canonical() test.
+ *
+ * If the function fails and @a non_canonical_result is not @c NULL, the
+ * result of the failed canonicalization attempt (which may be @c NULL)
+ * will be returned in @a *non_canonical_result.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.12.
+ */
+
+svn_error_t *
+svn_relpath_canonicalize_safe(const char **canonical_relpath,
+ const char **non_canonical_result,
+ const char *relpath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
-/** Return a new uri like @a uri, but transformed such that some types
+/**
+ * Return a new uri like @a uri, but transformed such that some types
* of uri specification redundancies are removed.
*
* This involves:
@@ -510,12 +590,41 @@ svn_relpath_canonicalize(const char *relpath,
*
* Allocate the result in @a result_pool.
*
- * @since New in 1.7.
+ * @warning This function may call @c abort() if @a uri can not be
+ * canonicalized.
+ * Use svn_uri_canonicalize_safe() for tainted input.
+ *
+ * @since New in 1.7.
*/
const char *
svn_uri_canonicalize(const char *uri,
apr_pool_t *result_pool);
+/**
+ * Return a new @a *canonical_uri like @a uri, but transformed such that
+ * some types of uri specification redundancies are removed.
+ *
+ * Similar to svn_uri_canonicalize() (which see), but returns an error if
+ * the @a uri can not be canonicalized or of the result does not pass the
+ * svn_uri_is_canonical() test.
+ *
+ * If the function fails and @a non_canonical_result is not @c NULL, the
+ * result of the failed canonicalization attempt (which may be @c NULL)
+ * will be returned in @a *non_canonical_result.
+ *
+ * Allocates the results in @a result_pool. Uses @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_uri_canonicalize_safe(const char **canonical_uri,
+ const char **non_canonical_result,
+ const char *uri,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+
/** Return @c TRUE iff @a dirent is canonical.
*
* Use @a scratch_pool for temporary allocations.
diff --git a/subversion/include/svn_error_codes.h b/subversion/include/svn_error_codes.h
index f95f0a0f0e84..c00c0f5b2f85 100644
--- a/subversion/include/svn_error_codes.h
+++ b/subversion/include/svn_error_codes.h
@@ -888,6 +888,21 @@ SVN_ERROR_START
SVN_ERR_FS_CATEGORY_START + 67,
"Content checksums supposedly match but content does not.")
+ /** @since New in 1.13. */
+ SVN_ERRDEF(SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE,
+ SVN_ERR_FS_CATEGORY_START + 68,
+ "Unrecognized filesystem I/O control code")
+
+ /** @since New in 1.14. */
+ SVN_ERRDEF(SVN_ERR_FS_REP_SHARING_NOT_ALLOWED,
+ SVN_ERR_FS_CATEGORY_START + 69,
+ "Rep-sharing is not allowed.")
+
+ /** @since New in 1.14. */
+ SVN_ERRDEF(SVN_ERR_FS_REP_SHARING_NOT_SUPPORTED,
+ SVN_ERR_FS_CATEGORY_START + 70,
+ "Rep-sharing is not supported.")
+
/* repos errors */
SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,
@@ -1482,6 +1497,11 @@ SVN_ERROR_START
SVN_ERR_MISC_CATEGORY_START + 46,
"LZ4 decompression failed")
+ /** @since New in 1.12. */
+ SVN_ERRDEF(SVN_ERR_CANONICALIZATION_FAILED,
+ SVN_ERR_MISC_CATEGORY_START + 47,
+ "Could not canonicalize path or URI")
+
/* command-line client errors */
SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,
@@ -1769,7 +1789,7 @@ SVN_ERROR_START
SVN_ERRDEF(SVN_ERR_X509_CERT_VERIFY_FAILED,
SVN_ERR_X509_CATEGORY_START + 19,
- "Certficate verification failed")
+ "Certificate verification failed")
SVN_ERROR_END
diff --git a/subversion/include/svn_fs.h b/subversion/include/svn_fs.h
index 179774e16a1e..198757c66555 100644
--- a/subversion/include/svn_fs.h
+++ b/subversion/include/svn_fs.h
@@ -1744,7 +1744,7 @@ svn_fs_paths_changed3(svn_fs_path_change_iterator_t **iterator,
*
* Use @a pool for all allocations, including the hash and its values.
*
- * @note Retrieving the #node_rev_id element of #svn_fs_path_change2_t may
+ * @note Retrieving the #svn_fs_path_change2_t.node_rev_id element may
* be expensive in some FS backends.
*
* @since New in 1.6.
@@ -1828,9 +1828,9 @@ svn_fs_node_history(svn_fs_history_t **history_p,
* the same as the original. This will happen if the original
* location was an interesting one (where the node was modified, or
* took place in a copy event). This behavior allows looping callers
- * to avoid the calling svn_fs_history_location() on the object
- * returned by svn_fs_node_history(), and instead go ahead and begin
- * calling svn_fs_history_prev().
+ * to avoid calling svn_fs_history_location() on the object returned
+ * by svn_fs_node_history(), and instead go ahead and begin calling
+ * svn_fs_history_prev().
*
* @note This function uses node-id ancestry alone to determine
* modifiedness, and therefore does NOT claim that in any of the
@@ -2492,7 +2492,7 @@ svn_fs_file_md5_checksum(unsigned char digest[],
* svn_fs_file_contents(). In that case, the result of reading from
* @a *contents is undefined.
*
- * ### @todo kff: I am worried about lifetime issues with this pool vs
+ * @todo kff: I am worried about lifetime issues with this pool vs
* the trail created farther down the call stack. Trace this function
* to investigate...
*/
@@ -3503,6 +3503,54 @@ svn_fs_info_dup(const void *info,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/**
+ * A structure specifying the filesystem-specific input/output operation.
+ *
+ * @see svn_fs_ioctl()
+ *
+ * @since New in 1.13.
+ */
+typedef struct svn_fs_ioctl_code_t
+{
+ const char *fs_type;
+ int code;
+} svn_fs_ioctl_code_t;
+
+/**
+ * A convenience macro to declare #svn_fs_ioctl_code_t codes.
+ *
+ * @since New in 1.13.
+ */
+#define SVN_FS_DECLARE_IOCTL_CODE(name, fs_type, code) \
+ static const svn_fs_ioctl_code_t name = { fs_type, code }
+
+/**
+ * Issue a filesystem-specific input/output operation defined by @a ctlcode
+ * (usually, a low-level operation which cannot be expressed by other
+ * filesystem APIs). If @a fs is @c NULL, issue a global operation.
+ * If @a fs is not @c NULL, issue an operation that is specific to this
+ * filesystem instance.
+ *
+ * If the filesystem cannot handle this ioctl code, return the
+ * #SVN_ERR_FS_UNRECOGNIZED_IOCTL_CODE error.
+ *
+ * Allocate the result in @a result_pool, use @a scratch_pool for temporary
+ * allocations.
+ *
+ * @see #svn_fs_ioctl_code_t
+ *
+ * @since New in 1.13.
+ */
+svn_error_t *
+svn_fs_ioctl(svn_fs_t *fs,
+ svn_fs_ioctl_code_t ctlcode,
+ void *input,
+ void **output_p,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** @} */
#ifdef __cplusplus
diff --git a/subversion/include/svn_opt.h b/subversion/include/svn_opt.h
index 1c85b61682d3..6644d5659b1c 100644
--- a/subversion/include/svn_opt.h
+++ b/subversion/include/svn_opt.h
@@ -27,6 +27,8 @@
#ifndef SVN_OPT_H
#define SVN_OPT_H
+#include "svn_opt_impl.h"
+
#include <apr.h>
#include <apr_pools.h>
#include <apr_getopt.h>
@@ -69,6 +71,10 @@ typedef svn_error_t *(svn_opt_subcommand_t)(
/** The maximum number of options that can be accepted by a subcommand. */
#define SVN_OPT_MAX_OPTIONS 50
+/** The maximum number of paragraphs of help text a subcommand can have.
+ * @since New in 1.11. */
+#define SVN_OPT_MAX_PARAGRAPHS 100
+
/** Options that have no short option char should use an identifying
* integer equal to or greater than this.
*/
@@ -77,7 +83,39 @@ typedef svn_error_t *(svn_opt_subcommand_t)(
/** One element of a subcommand dispatch table.
*
+ * @since New in 1.11.
+ */
+typedef struct svn_opt_subcommand_desc3_t
+{
+ /** The full name of this command. */
+ const char *name;
+
+ /** The function this command invokes. */
+ svn_opt_subcommand_t *cmd_func;
+
+ /** A list of alias names for this command (e.g., 'up' for 'update'). */
+ const char *aliases[SVN_OPT_MAX_ALIASES];
+
+ /** A multi-paragraph string describing this command. */
+ const char *help[SVN_OPT_MAX_PARAGRAPHS];
+
+ /** A list of options accepted by this command. Each value in the
+ * array is a unique enum (the 2nd field in apr_getopt_option_t)
+ */
+ int valid_options[SVN_OPT_MAX_OPTIONS];
+
+ /** A list of option help descriptions, keyed by the option unique enum
+ * (the 2nd field in apr_getopt_option_t), which override the generic
+ * descriptions given in an apr_getopt_option_t on a per-subcommand basis.
+ */
+ struct { int optch; const char *desc; } desc_overrides[SVN_OPT_MAX_OPTIONS];
+} svn_opt_subcommand_desc3_t;
+
+
+/** One element of a subcommand dispatch table.
+ *
* @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
typedef struct svn_opt_subcommand_desc2_t
{
@@ -139,8 +177,21 @@ typedef struct svn_opt_subcommand_desc_t
* Return the entry in @a table whose name matches @a cmd_name, or @c NULL if
* none. @a cmd_name may be an alias.
*
+ * @since New in 1.11.
+ */
+const svn_opt_subcommand_desc3_t *
+svn_opt_get_canonical_subcommand3(const svn_opt_subcommand_desc3_t *table,
+ const char *cmd_name);
+
+
+/**
+ * Same as svn_opt_get_canonical_subcommand3(), but with a different
+ * version of the subcommand description table.
+ *
* @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
const svn_opt_subcommand_desc2_t *
svn_opt_get_canonical_subcommand2(const svn_opt_subcommand_desc2_t *table,
const char *cmd_name);
@@ -170,8 +221,22 @@ svn_opt_get_canonical_subcommand(const svn_opt_subcommand_desc_t *table,
*
* The returned value may be statically allocated, or allocated in @a pool.
*
+ * @since New in 1.11.
+ */
+const apr_getopt_option_t *
+svn_opt_get_option_from_code3(int code,
+ const apr_getopt_option_t *option_table,
+ const svn_opt_subcommand_desc3_t *command,
+ apr_pool_t *pool);
+
+/**
+ * Same as svn_opt_get_option_from_code3(), but with a different
+ * version of the subcommand description table.
+ *
* @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
const apr_getopt_option_t *
svn_opt_get_option_from_code2(int code,
const apr_getopt_option_t *option_table,
@@ -198,8 +263,21 @@ svn_opt_get_option_from_code(int code,
* non-NULL, it is a zero-terminated array, and all subcommands take
* the options listed in it.
*
+ * @since New in 1.11.
+ */
+svn_boolean_t
+svn_opt_subcommand_takes_option4(const svn_opt_subcommand_desc3_t *command,
+ int option_code,
+ const int *global_options);
+
+/**
+ * Same as svn_opt_subcommand_takes_option4(), but with a different
+ * version of the subcommand description table.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
svn_boolean_t
svn_opt_subcommand_takes_option3(const svn_opt_subcommand_desc2_t *command,
int option_code,
@@ -235,7 +313,7 @@ svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command,
/**
* Print a generic (not command-specific) usage message to @a stream.
*
- * ### @todo Why is @a stream a stdio file instead of an svn stream?
+ * @todo Why is @a stream a stdio file instead of an svn stream?
*
* If @a header is non-NULL, print @a header followed by a newline. Then
* loop over @a cmd_table printing the usage for each command (getting
@@ -244,8 +322,24 @@ svn_opt_subcommand_takes_option(const svn_opt_subcommand_desc_t *command,
*
* Use @a pool for temporary allocation.
*
+ * @since New in 1.11.
+ */
+void
+svn_opt_print_generic_help3(const char *header,
+ const svn_opt_subcommand_desc3_t *cmd_table,
+ const apr_getopt_option_t *opt_table,
+ const char *footer,
+ apr_pool_t *pool,
+ FILE *stream);
+
+/**
+ * Same as svn_opt_print_generic_help3(), but with a different
+ * version of the subcommand description table.
+ *
* @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
void
svn_opt_print_generic_help2(const char *header,
const svn_opt_subcommand_desc2_t *cmd_table,
@@ -297,8 +391,23 @@ svn_opt_format_option(const char **string,
* use that second name as an alias for the first name. This additional
* behaviour is new in 1.7.
*
+ * @since New in 1.11.
+ */
+void
+svn_opt_subcommand_help4(const char *subcommand,
+ const svn_opt_subcommand_desc3_t *table,
+ const apr_getopt_option_t *options_table,
+ const int *global_options,
+ apr_pool_t *pool);
+
+/**
+ * Same as svn_opt_subcommand_help4(), but with a different
+ * version of the subcommand description table.
+ *
* @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
void
svn_opt_subcommand_help3(const char *subcommand,
const svn_opt_subcommand_desc2_t *table,
@@ -336,43 +445,7 @@ svn_opt_subcommand_help(const char *subcommand,
/* Parsing revision and date options. */
-
-/**
- * Various ways of specifying revisions.
- *
- * @note
- * In contexts where local mods are relevant, the `working' kind
- * refers to the uncommitted "working" revision, which may be modified
- * with respect to its base revision. In other contexts, `working'
- * should behave the same as `committed' or `current'.
- */
-enum svn_opt_revision_kind {
- /** No revision information given. */
- svn_opt_revision_unspecified,
-
- /** revision given as number */
- svn_opt_revision_number,
-
- /** revision given as date */
- svn_opt_revision_date,
-
- /** rev of most recent change */
- svn_opt_revision_committed,
-
- /** (rev of most recent change) - 1 */
- svn_opt_revision_previous,
-
- /** .svn/entries current revision */
- svn_opt_revision_base,
-
- /** current, plus local mods */
- svn_opt_revision_working,
-
- /** repository youngest */
- svn_opt_revision_head
-
- /* please update svn_opt__revision_to_string() when extending this enum */
-};
+/* NOTE: svn_opt_revision_kind is defined in svn_opt_impl.h */
/**
* A revision value, which can be specified as a number or a date.
@@ -700,9 +773,30 @@ svn_opt_parse_path(svn_opt_revision_t *rev,
* --version flag *and* subcommand arguments on a help command line.
* The logic for handling such a situation should be in one place.
*
- * @since New in 1.8.
+ * @since New in 1.11.
*/
+svn_error_t *
+svn_opt_print_help5(apr_getopt_t *os,
+ const char *pgm_name,
+ svn_boolean_t print_version,
+ svn_boolean_t quiet,
+ svn_boolean_t verbose,
+ const char *version_footer,
+ const char *header,
+ const svn_opt_subcommand_desc3_t *cmd_table,
+ const apr_getopt_option_t *option_table,
+ const int *global_options,
+ const char *footer,
+ apr_pool_t *pool);
+/**
+ * Same as svn_opt_print_help5(), but with a different
+ * version of the subcommand description table.
+ *
+ * @since New in 1.8.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
+ */
+SVN_DEPRECATED
svn_error_t *
svn_opt_print_help4(apr_getopt_t *os,
const char *pgm_name,
diff --git a/subversion/include/svn_opt_impl.h b/subversion/include/svn_opt_impl.h
new file mode 100644
index 000000000000..73fd2f36e5c6
--- /dev/null
+++ b/subversion/include/svn_opt_impl.h
@@ -0,0 +1,86 @@
+/**
+ * @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_opt_impl.h
+ * @brief Option and argument parsing for Subversion command lines
+ * (common implementation)
+ *
+ * @warning This is a @b private implementation-specific header file.
+ * User code should include @ref svn_opt.h instead.
+ */
+
+/* NOTE:
+ * This file *must not* include or depend on any other header except
+ * the C standard library headers.
+ */
+
+#ifndef SVN_OPT_IMPL_H
+#define SVN_OPT_IMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/**
+ * Various ways of specifying revisions.
+ *
+ * @note
+ * In contexts where local mods are relevant, the `working' kind
+ * refers to the uncommitted "working" revision, which may be modified
+ * with respect to its base revision. In other contexts, `working'
+ * should behave the same as `committed' or `current'.
+ */
+/* NOTE: Update svnxx/revision.hpp when changing this enum. */
+enum svn_opt_revision_kind {
+ /** No revision information given. */
+ svn_opt_revision_unspecified,
+
+ /** revision given as number */
+ svn_opt_revision_number,
+
+ /** revision given as date */
+ svn_opt_revision_date,
+
+ /** rev of most recent change */
+ svn_opt_revision_committed,
+
+ /** (rev of most recent change) - 1 */
+ svn_opt_revision_previous,
+
+ /** .svn/entries current revision */
+ svn_opt_revision_base,
+
+ /** current, plus local mods */
+ svn_opt_revision_working,
+
+ /** repository youngest */
+ svn_opt_revision_head
+
+ /* please update svn_opt__revision_to_string() when extending this enum */
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_OPT_IMPL_H */
diff --git a/subversion/include/svn_props.h b/subversion/include/svn_props.h
index 7ea8bba0c048..8b044b059089 100644
--- a/subversion/include/svn_props.h
+++ b/subversion/include/svn_props.h
@@ -415,19 +415,26 @@ svn_prop_name_is_valid(const char *prop_name);
/** Describes external items to check out into this directory.
*
* The format is a series of lines, each in the following format:
- * [-r REV] URL[@PEG] LOCALPATH
+ *
+ * [-r REV] URL[@PEG] LOCALPATH
+ *
* LOCALPATH is relative to the directory having this property.
* REV pins the external to revision REV.
* URL may be a full URL or a relative URL starting with one of:
- * ../ to the parent directory of the extracted external
- * ^/ to the repository root
- * / to the server root
- * // to the URL scheme
+ *
+ * ../ to the parent directory of the extracted external
+ * ^/ to the repository root
+ * / to the server root
+ * // to the URL scheme
+ *
* The following format is supported for interoperability with
* Subversion 1.4 and earlier clients:
- * LOCALPATH [-r PEG] URL
+ *
+ * LOCALPATH [-r PEG] URL
+ *
* The ambiguous format 'relative_path relative_path' is taken as
* 'relative_url relative_path' with peg revision support.
+ *
* Lines starting with a '#' character are ignored.
*/
#define SVN_PROP_EXTERNALS SVN_PROP_PREFIX "externals"
diff --git a/subversion/include/svn_ra.h b/subversion/include/svn_ra.h
index 030458d0e16a..4c71520dd1ff 100644
--- a/subversion/include/svn_ra.h
+++ b/subversion/include/svn_ra.h
@@ -65,7 +65,7 @@ svn_ra_version(void);
* @a close_baton as appropriate.
*
* @a path is relative to the "root" of the session, defined by the
- * @a repos_URL passed to svn_ra_open4() vtable call.
+ * @a repos_URL passed to svn_ra_open5() vtable call.
*
* @a name is the name of the property to fetch. If the property is present,
* then it is returned in @a value. Otherwise, @a *value is set to @c NULL.
@@ -229,7 +229,7 @@ typedef void (*svn_ra_progress_notify_func_t)(apr_off_t progress,
*
* @a revision is the target revision number of the received replay report.
*
- * @a editor and @a edit_baton should provided by the callback implementation.
+ * @a *editor and @a *edit_baton should provided by the callback implementation.
*
* @a replay_baton is the baton as originally passed to replay_range.
*
@@ -253,7 +253,7 @@ typedef svn_error_t *(*svn_ra_replay_revstart_callback_t)(
*
* @a revision is the target revision number of the received replay report.
*
- * @a editor and @a edit_baton should provided by the callback implementation.
+ * @a editor and @a edit_baton are the values provided by the REVSTART callback.
*
* @a replay_baton is the baton as originally passed to replay_range.
*
@@ -369,7 +369,7 @@ typedef struct svn_ra_reporter3_t
* implementor should assume the directory has no entries or props.
*
* This will *override* any previous set_path() calls made on parent
- * paths. @a path is relative to the URL specified in svn_ra_open4().
+ * paths. @a path is relative to the URL specified in svn_ra_open5().
*
* If @a lock_token is non-NULL, it is the lock token for @a path in the WC.
*
@@ -520,7 +520,7 @@ typedef struct svn_ra_reporter_t
/** A collection of callbacks implemented by libsvn_client which allows
* an RA layer to "pull" information from the client application, or
* possibly store information. libsvn_client passes this vtable to
- * svn_ra_open4().
+ * svn_ra_open5().
*
* Each routine takes a @a callback_baton originally provided with the
* vtable.
@@ -555,9 +555,9 @@ typedef struct svn_ra_callbacks2_t
/** Fetch working copy properties.
*
- *<pre> ### we might have a problem if the RA layer ever wants a property
- * ### that corresponds to a different revision of the file than
- * ### what is in the WC. we'll cross that bridge one day...</pre>
+ * @note we might have a problem if the RA layer ever wants a property
+ * that corresponds to a different revision of the file than
+ * what is in the WC. we'll cross that bridge one day...
*/
svn_ra_get_wc_prop_func_t get_wc_prop;
@@ -710,6 +710,14 @@ typedef struct svn_ra_session_t svn_ra_session_t;
* within the new repository root URL that @a repos_URL pointed to within
* the old repository root URL.
*
+ * If @a redirect_url is not NULL and a @corrected_url is returned, then
+ * @a redirect_url contains a non-canonicalized version of @a corrected_url,
+ * as communicated in the network protocol used by the RA provider.
+ * THe @a redirect_url should be used for to detect redirection loops.
+ * Canonicalization may change the protocol-level URL in a way that
+ * makes detection of redirect loops impossible in some cases since URLs which
+ * are different at the protocol layer could map to the same canonicalized URL.
+ *
* Return @c SVN_ERR_RA_UUID_MISMATCH if @a uuid is non-NULL and not equal
* to the UUID of the repository at @c repos_URL.
*
@@ -728,8 +736,26 @@ typedef struct svn_ra_session_t svn_ra_session_t;
*
* @see svn_client_open_ra_session().
*
+ * @since New in 1.14.
+ */
+svn_error_t *
+svn_ra_open5(svn_ra_session_t **session_p,
+ const char **corrected_url,
+ const char **redirect_url,
+ const char *repos_URL,
+ const char *uuid,
+ const svn_ra_callbacks2_t *callbacks,
+ void *callback_baton,
+ apr_hash_t *config,
+ apr_pool_t *pool);
+
+/** Similar to svn_ra_open5(), but with @a redirect_url always passed
+ * as @c NULL.
+ *
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.13 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_ra_open4(svn_ra_session_t **session_p,
const char **corrected_url,
@@ -1857,7 +1883,7 @@ svn_ra_get_location_segments(svn_ra_session_t *session,
* @note Prior to Subversion 1.9, this function may request delta handlers
* from @a handler even for empty text deltas. Starting with 1.9, the
* delta handler / baton return arguments passed to @a handler will be
- * #NULL unless there is an actual difference in the file contents between
+ * NULL unless there is an actual difference in the file contents between
* the current and the previous call.
*
* @since New in 1.5.
diff --git a/subversion/include/svn_ra_svn.h b/subversion/include/svn_ra_svn.h
index 6293255daba9..0bcd40b7aee0 100644
--- a/subversion/include/svn_ra_svn.h
+++ b/subversion/include/svn_ra_svn.h
@@ -201,7 +201,7 @@ typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
* If @a max_out is not 0, error out and close the connection whenever more
* than @a max_out bytes have been send as response to some command.
*
- * @note The limits enforced may vary slightly by +/- the I/O buffer size.
+ * @note The limits enforced may vary slightly by +/- the I/O buffer size.
*
* @note If @a out_stream is an wrapped apr_file_t* the backing file will be
* used for some operations.
diff --git a/subversion/include/svn_repos.h b/subversion/include/svn_repos.h
index 9bb462abbb3c..35ff00045c22 100644
--- a/subversion/include/svn_repos.h
+++ b/subversion/include/svn_repos.h
@@ -679,7 +679,7 @@ svn_repos_fs_type(svn_repos_t *repos,
* The optional @a cancel_func callback will be invoked with
* @a cancel_baton as usual to allow the user to preempt this potentially
* lengthy operation.
- *
+ *
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.9.
@@ -861,7 +861,7 @@ typedef svn_error_t *(*svn_repos_freeze_func_t)(void *baton, apr_pool_t *pool);
* @since New in 1.8.
*/
svn_error_t *
-svn_repos_freeze(apr_array_header_t *paths,
+svn_repos_freeze(const apr_array_header_t *paths,
svn_repos_freeze_func_t freeze_func,
void *freeze_baton,
apr_pool_t *pool);
@@ -1036,7 +1036,10 @@ svn_repos_hooks_setenv(svn_repos_t *repos,
*
* @a send_copyfrom_args instructs the driver to send 'copyfrom'
* arguments to the editor's add_file() and add_directory() methods,
- * whenever it deems feasible.
+ * and therefore to send their content as deltas against the copy source,
+ * whenever it deems feasible. The implementation only does so for
+ * add_file(), and only when the file itself is the copy root (not when
+ * the file is part of a copied subtree).
*
* Use @a authz_read_func and @a authz_read_baton (if not @c NULL) to
* avoid sending data through @a editor/@a edit_baton which is not
@@ -2404,7 +2407,7 @@ svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *catalog,
* @note Prior to Subversion 1.9, this function may request delta handlers
* from @a handler even for empty text deltas. Starting with 1.9, the
* delta handler / baton return arguments passed to @a handler will be
- * #NULL unless there is an actual difference in the file contents between
+ * NULL unless there is an actual difference in the file contents between
* the current and the previous call.
*
* @since New in 1.5.
@@ -3357,7 +3360,7 @@ svn_repos_dump_fs4(svn_repos_t *repos,
apr_pool_t *pool);
/**
- * Similar to svn_repos_dump_fs4(), but with @a include_revprops and
+ * Similar to svn_repos_dump_fs4(), but with @a include_revprops and
* @a include_changes both set to @c TRUE and @a filter_func and
* @a filter_baton set to @c NULL.
*
@@ -3803,7 +3806,7 @@ typedef struct svn_repos_parse_fns3_t
*
* @since New in 1.8.
- * @since Starting in 1.10, @a parse_fns may contain #NULL pointers for
+ * @since Starting in 1.10, @a parse_fns may contain NULL pointers for
* those callbacks that the caller is not interested in.
*/
svn_error_t *
@@ -4144,6 +4147,19 @@ svn_error_t *
svn_repos_authz_initialize(apr_pool_t *pool);
/**
+ * Callback for reporting authz file parsing warnings.
+ *
+ * The implementation may use @a scratch_pool for temporary
+ * allocations but should not assume that the lifetime of that pool
+ * persists past the callback invocation.
+ *
+ * The implementation @e must @e not clear @a error.
+ */
+typedef void (*svn_repos_authz_warning_func_t)(void *baton,
+ const svn_error_t *error,
+ apr_pool_t *scratch_pool);
+
+/**
* Read authz configuration data from @a path (a dirent, an absolute file url
* or a registry path) into @a *authz_p, allocated in @a pool.
*
@@ -4161,8 +4177,31 @@ svn_repos_authz_initialize(apr_pool_t *pool);
* repository instance. Otherwise, set it to NULL and the repositories will
* be opened as needed.
*
+ * If the @a warning_func callback is not @c NULL, it is called
+ * (with @a warning_baton) to report non-fatal warnings emitted by
+ * the parser.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_repos_authz_read4(svn_authz_t **authz_p,
+ const char *path,
+ const char *groups_path,
+ svn_boolean_t must_exist,
+ svn_repos_t *repos_hint,
+ svn_repos_authz_warning_func_t warning_func,
+ void *warning_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_repos_authz_read3(), but with @a warning_func and
+ * @a warning_baton set to @c NULL.
+ *
* @since New in 1.10.
+ * @deprecated Provided for backward compatibility with the 1.11 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_authz_read3(svn_authz_t **authz_p,
const char *path,
@@ -4203,12 +4242,35 @@ svn_repos_authz_read(svn_authz_t **authz_p,
/**
* Read authz configuration data from @a stream into @a *authz_p,
- * allocated in @a pool.
+ * allocated in @a result_pool.
*
* If @a groups_stream is set, use the global groups parsed from it.
*
+ * If the @a warning_func callback is not @c NULL, it is called
+ * (with @a warning_baton) to report non-fatal warnings emitted by
+ * the parser.
+ *
+ * Uses @a scratch_pool for temporary aloocations.
+ *
+ * @since New in 1.12.
+ */
+svn_error_t *
+svn_repos_authz_parse2(svn_authz_t **authz_p,
+ svn_stream_t *stream,
+ svn_stream_t *groups_stream,
+ svn_repos_authz_warning_func_t warning_func,
+ void *warning_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_repos_authz_parse2(), but with @a warning_func and
+ * @a warning_baton set to @c NULL.
+ *
* @since New in 1.8.
+ * @deprecated Provided for backward compatibility with the 1.11 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_authz_parse(svn_authz_t **authz_p,
svn_stream_t *stream,
diff --git a/subversion/include/svn_time.h b/subversion/include/svn_time.h
index 76517ca79c37..ac857fb2b94e 100644
--- a/subversion/include/svn_time.h
+++ b/subversion/include/svn_time.h
@@ -38,14 +38,21 @@ extern "C" {
/** Convert @a when to a <tt>const char *</tt> representation allocated
- * in @a pool. Use svn_time_from_cstring() for the reverse
- * conversion.
+ * in @a pool.
+ *
+ * @see svn_time_from_cstring() for the reverse conversion.
*/
const char *
svn_time_to_cstring(apr_time_t when,
apr_pool_t *pool);
/** Convert @a data to an @c apr_time_t @a when.
+ *
+ * @see svn_time_to_cstring() for the reverse conversion.
+ *
+ * @deprecated Also accepts a format that was used before Subversion 0.14.
+ * See implementation for details. Use of this format is deprecated.
+ *
* Use @a pool for temporary memory allocation.
*/
svn_error_t *
diff --git a/subversion/include/svn_types.h b/subversion/include/svn_types.h
index 394eda866937..418d6ac9cc84 100644
--- a/subversion/include/svn_types.h
+++ b/subversion/include/svn_types.h
@@ -27,6 +27,8 @@
#ifndef SVN_TYPES_H
#define SVN_TYPES_H
+#include "svn_types_impl.h"
+
/* ### this should go away, but it causes too much breakage right now */
#include <stdlib.h>
#include <limits.h> /* for ULONG_MAX */
@@ -247,35 +249,6 @@ typedef struct svn_version_t svn_version_t;
-/** @defgroup apr_hash_utilities APR Hash Table Helpers
- * These functions enable the caller to dereference an APR hash table index
- * without type casts or temporary variables.
- *
- * These functions are provided by APR itself from version 1.5.
- * Definitions are provided here for when using older versions of APR.
- * @{
- */
-
-#if !APR_VERSION_AT_LEAST(1, 5, 0)
-
-/** Return the key of the hash table entry indexed by @a hi. */
-const void *
-apr_hash_this_key(apr_hash_index_t *hi);
-
-/** Return the key length of the hash table entry indexed by @a hi. */
-apr_ssize_t
-apr_hash_this_key_len(apr_hash_index_t *hi);
-
-/** Return the value of the hash table entry indexed by @a hi. */
-void *
-apr_hash_this_val(apr_hash_index_t *hi);
-
-#endif
-
-/** @} */
-
-
-
/** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of
* invalid-pathname error but not ERROR_INVALID_NAME, so we include it.
* We also include ERROR_DIRECTORY as that was not included in apr versions
@@ -303,28 +276,7 @@ apr_hash_this_val(apr_hash_index_t *hi);
-/** The various types of nodes in the Subversion filesystem. */
-typedef enum svn_node_kind_t
-{
- /** absent */
- svn_node_none,
-
- /** regular file */
- svn_node_file,
-
- /** directory */
- svn_node_dir,
-
- /** something's here, but we don't know what */
- svn_node_unknown,
-
- /**
- * symbolic link
- * @note This value is not currently used by the public API.
- * @since New in 1.8.
- */
- svn_node_symlink
-} svn_node_kind_t;
+/* NOTE: svn_node_kind_t is defined in svn_types_impl.h */
/** Return a constant string expressing @a kind as an English word, e.g.,
* "file", "dir", etc. The string is not localized, as it may be used for
@@ -346,23 +298,7 @@ svn_node_kind_t
svn_node_kind_from_word(const char *word);
-/** Generic three-state property to represent an unknown value for values
- * that are just like booleans. The values have been set deliberately to
- * make tristates disjoint from #svn_boolean_t.
- *
- * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
- * not a valid value.
- *
- * @since New in 1.7. */
-typedef enum svn_tristate_t
-{
- /** state known to be false (the constant does not evaulate to false) */
- svn_tristate_false = 2,
- /** state known to be true */
- svn_tristate_true,
- /** state could be true or false */
- svn_tristate_unknown
-} svn_tristate_t;
+/* NOTE: svn_tristate_t is defined in svn_types_impl.h */
/** Return a constant string "true", "false" or NULL representing the value of
* @a tristate.
@@ -422,15 +358,11 @@ svn_tristate__from_word(const char * word);
-/** A revision number. */
-typedef long int svn_revnum_t;
+/* NOTE: svn_revnum_t and SVN_INVALID_REVNUM are defined in svn_types_impl.h */
/** Valid revision numbers begin at 0 */
#define SVN_IS_VALID_REVNUM(n) ((n) >= 0)
-/** The 'official' invalid revision num */
-#define SVN_INVALID_REVNUM ((svn_revnum_t) -1)
-
/** Not really invalid...just unimportant -- one day, this can be its
* own unique value, for now, just make it the same as
* #SVN_INVALID_REVNUM.
@@ -494,55 +426,7 @@ enum svn_recurse_kind
svn_recursive
};
-/** The concept of depth for directories.
- *
- * @note This is similar to, but not exactly the same as, the WebDAV
- * and LDAP concepts of depth.
- *
- * @since New in 1.5.
- */
-typedef enum svn_depth_t
-{
- /* The order of these depths is important: the higher the number,
- the deeper it descends. This allows us to compare two depths
- numerically to decide which should govern. */
-
- /** Depth undetermined or ignored. In some contexts, this means the
- client should choose an appropriate default depth. The server
- will generally treat it as #svn_depth_infinity. */
- svn_depth_unknown = -2,
-
- /** Exclude (i.e., don't descend into) directory D.
- @note In Subversion 1.5, svn_depth_exclude is *not* supported
- anywhere in the client-side (libsvn_wc/libsvn_client/etc) code;
- it is only supported as an argument to set_path functions in the
- ra and repos reporters. (This will enable future versions of
- Subversion to run updates, etc, against 1.5 servers with proper
- svn_depth_exclude behavior, once we get a chance to implement
- client-side support for svn_depth_exclude.)
- */
- svn_depth_exclude = -1,
-
- /** Just the named directory D, no entries. Updates will not pull in
- any files or subdirectories not already present. */
- svn_depth_empty = 0,
-
- /** D + its file children, but not subdirs. Updates will pull in any
- files not already present, but not subdirectories. */
- svn_depth_files = 1,
-
- /** D + immediate children (D and its entries). Updates will pull in
- any files or subdirectories not already present; those
- subdirectories' this_dir entries will have depth-empty. */
- svn_depth_immediates = 2,
-
- /** D + all descendants (full recursion from D). Updates will pull
- in any files or subdirectories not already present; those
- subdirectories' this_dir entries will have depth-infinity.
- Equivalent to the pre-1.5 default update behavior. */
- svn_depth_infinity = 3
-
-} svn_depth_t;
+/* NOTE: svn_depth_t is defined in svn_types_impl.h */
/** Return a constant string expressing @a depth as an English word,
* e.g., "infinity", "immediates", etc. The string is not localized,
diff --git a/subversion/include/svn_types_impl.h b/subversion/include/svn_types_impl.h
new file mode 100644
index 000000000000..625597f339eb
--- /dev/null
+++ b/subversion/include/svn_types_impl.h
@@ -0,0 +1,157 @@
+/**
+ * @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_types_impl.h
+ * @brief Subversion's data types (common implementation)
+ *
+ * @warning This is a @b private implementation-specific header file.
+ * User code should include @ref svn_types.h instead.
+ */
+
+/* NOTE:
+ * This file *must not* include or depend on any other header except
+ * the C standard library headers.
+ */
+
+#ifndef SVN_TYPES_IMPL_H
+#define SVN_TYPES_IMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifndef DOXYGEN
+/* Forward declaration of the error object. */
+struct svn_error_t;
+#endif
+
+
+/** The various types of nodes in the Subversion filesystem. */
+typedef enum svn_node_kind_t
+{
+ /** absent */
+ svn_node_none,
+
+ /** regular file */
+ svn_node_file,
+
+ /** directory */
+ svn_node_dir,
+
+ /** something's here, but we don't know what */
+ svn_node_unknown,
+
+ /**
+ * symbolic link
+ * @note This value is not currently used by the public API.
+ * @since New in 1.8.
+ */
+ svn_node_symlink
+} svn_node_kind_t;
+
+
+/** Generic three-state property to represent an unknown value for values
+ * that are just like booleans. The values have been set deliberately to
+ * make tristates disjoint from #svn_boolean_t.
+ *
+ * @note It is unsafe to use apr_pcalloc() to allocate these, since '0' is
+ * not a valid value.
+ *
+ * @since New in 1.7. */
+/* NOTE: Update svnxx/tristate.hpp when changing this enum. */
+typedef enum svn_tristate_t
+{
+ /** state known to be false (the constant does not evaulate to false) */
+ svn_tristate_false = 2,
+ /** state known to be true */
+ svn_tristate_true,
+ /** state could be true or false */
+ svn_tristate_unknown
+} svn_tristate_t;
+
+
+/** A revision number. */
+/* NOTE: Update svnxx/revision.hpp when changing this typedef. */
+typedef long int svn_revnum_t;
+
+/** The 'official' invalid revision number. */
+/* NOTE: Update svnxx/revision.hpp when changing this definition. */
+#define SVN_INVALID_REVNUM ((svn_revnum_t) -1)
+
+
+/** The concept of depth for directories.
+ *
+ * @note This is similar to, but not exactly the same as, the WebDAV
+ * and LDAP concepts of depth.
+ *
+ * @since New in 1.5.
+ */
+/* NOTE: Update svnxx/depth.hpp when changing this enum. */
+typedef enum svn_depth_t
+{
+ /* The order of these depths is important: the higher the number,
+ the deeper it descends. This allows us to compare two depths
+ numerically to decide which should govern. */
+
+ /** Depth undetermined or ignored. In some contexts, this means the
+ client should choose an appropriate default depth. The server
+ will generally treat it as #svn_depth_infinity. */
+ svn_depth_unknown = -2,
+
+ /** Exclude (i.e., don't descend into) directory D.
+ @note In Subversion 1.5, svn_depth_exclude is *not* supported
+ anywhere in the client-side (libsvn_wc/libsvn_client/etc) code;
+ it is only supported as an argument to set_path functions in the
+ ra and repos reporters. (This will enable future versions of
+ Subversion to run updates, etc, against 1.5 servers with proper
+ svn_depth_exclude behavior, once we get a chance to implement
+ client-side support for svn_depth_exclude.)
+ */
+ svn_depth_exclude = -1,
+
+ /** Just the named directory D, no entries. Updates will not pull in
+ any files or subdirectories not already present. */
+ svn_depth_empty = 0,
+
+ /** D + its file children, but not subdirs. Updates will pull in any
+ files not already present, but not subdirectories. */
+ svn_depth_files = 1,
+
+ /** D + immediate children (D and its entries). Updates will pull in
+ any files or subdirectories not already present; those
+ subdirectories' this_dir entries will have depth-empty. */
+ svn_depth_immediates = 2,
+
+ /** D + all descendants (full recursion from D). Updates will pull
+ in any files or subdirectories not already present; those
+ subdirectories' this_dir entries will have depth-infinity.
+ Equivalent to the pre-1.5 default update behavior. */
+ svn_depth_infinity = 3
+
+} svn_depth_t;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_TYPES_IMPL_H */
diff --git a/subversion/include/svn_utf.h b/subversion/include/svn_utf.h
index 4a2c137b8e64..c65afc705a1c 100644
--- a/subversion/include/svn_utf.h
+++ b/subversion/include/svn_utf.h
@@ -212,7 +212,7 @@ svn_utf_cstring_from_utf8_ex(const char **dest,
* so when we can detect that at configure time, things will change.
* Also, this should (?) be moved to apr/apu eventually.
*
- * See http://subversion.tigris.org/issues/show_bug.cgi?id=807 for
+ * See https://issues.apache.org/jira/browse/SVN-807 for
* details.
*/
const char *
diff --git a/subversion/include/svn_version.h b/subversion/include/svn_version.h
index 7d95271dfa4f..25bbe542df5b 100644
--- a/subversion/include/svn_version.h
+++ b/subversion/include/svn_version.h
@@ -61,7 +61,7 @@ extern "C" {
* Modify when new functionality is added or new interfaces are
* defined, but all changes are backward compatible.
*/
-#define SVN_VER_MINOR 10
+#define SVN_VER_MINOR 14
/**
* Patch number.
@@ -70,7 +70,7 @@ extern "C" {
*
* @since New in 1.1.
*/
-#define SVN_VER_PATCH 2
+#define SVN_VER_PATCH 0
/** @deprecated Provided for backward compatibility with the 1.0 API. */
@@ -93,7 +93,7 @@ extern "C" {
*
* Always change this at the same time as SVN_VER_NUMTAG.
*/
-#define SVN_VER_TAG " (r1835932)"
+#define SVN_VER_TAG " (r1876290)"
/** Number tag: a string describing the version.
@@ -117,7 +117,7 @@ extern "C" {
* file version. Its value remains 0 in the repository except in release
* tags where it is the revision from which the tag was created.
*/
-#define SVN_VER_REVISION 1835932
+#define SVN_VER_REVISION 1876290
/* Version strings composed from the above definitions. */
diff --git a/subversion/include/svn_wc.h b/subversion/include/svn_wc.h
index e632673e0ae4..cd018ae1ee8e 100644
--- a/subversion/include/svn_wc.h
+++ b/subversion/include/svn_wc.h
@@ -7602,9 +7602,14 @@ svn_wc_relocate(const char *path,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared.
*
- * If @a metadata_only is TRUE, the working copy files are untouched, but
- * if there are conflict marker files attached to these files these
- * markers are removed.
+ * The @a metadata_only and @a added_keep_local options control the
+ * extent of reverting. If @a metadata_only is TRUE, the working copy
+ * files are untouched, but if there are conflict marker files attached
+ * to these files these markers are removed. Otherwise, if
+ * @a added_keep_local is TRUE, then all items are reverted except an
+ * item that was scheduled as plain 'add' (not a copy) will not be
+ * removed from the working copy. Otherwise, all items are reverted and
+ * their on-disk state changed to match.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the reversion process. If it returns an
@@ -7622,8 +7627,30 @@ svn_wc_relocate(const char *path,
* If @a path is not under version control, return the error
* #SVN_ERR_UNVERSIONED_RESOURCE.
*
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_wc_revert6(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_depth_t depth,
+ svn_boolean_t use_commit_times,
+ const apr_array_header_t *changelist_filter,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_wc_revert6() but with @a added_keep_local always
+ * set to TRUE.
+ *
* @since New in 1.9.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_revert5(svn_wc_context_t *wc_ctx,
const char *local_abspath,