Modified: subversion/branches/multi-wc-format/subversion/bindings/swig/svn_ra.i URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/swig/svn_ra.i?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/bindings/swig/svn_ra.i (original) +++ subversion/branches/multi-wc-format/subversion/bindings/swig/svn_ra.i Fri Jan 14 14:01:45 2022 @@ -21,15 +21,16 @@ * svn_ra.i: SWIG interface file for svn_ra.h */ +%include svn_global.swg + #if defined(SWIGPYTHON) -%module(package="libsvn") ra +%module(package="libsvn", moduleimport=SVN_PYTHON_MODULEIMPORT) ra #elif defined(SWIGPERL) %module "SVN::_Ra" #elif defined(SWIGRUBY) %module "svn::ext::ra" #endif -%include svn_global.swg %import core.i %import svn_delta.i
Modified: subversion/branches/multi-wc-format/subversion/bindings/swig/svn_repos.i URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/swig/svn_repos.i?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/bindings/swig/svn_repos.i (original) +++ subversion/branches/multi-wc-format/subversion/bindings/swig/svn_repos.i Fri Jan 14 14:01:45 2022 @@ -21,15 +21,16 @@ * svn_repos.i: SWIG interface file for svn_repos.h */ +%include svn_global.swg + #if defined(SWIGPYTHON) -%module(package="libsvn") repos +%module(package="libsvn", moduleimport=SVN_PYTHON_MODULEIMPORT) repos #elif defined(SWIGPERL) %module "SVN::_Repos" #elif defined(SWIGRUBY) %module "svn::ext::repos" #endif -%include svn_global.swg %import core.i %import svn_delta.i %import svn_fs.i @@ -109,6 +110,16 @@ #endif /* ----------------------------------------------------------------------- + Tweak a SubversionException instance (See svn_fs.i for detail). +*/ + +#ifdef SWIGPYTHON +%apply svn_error_t *SVN_ERR_WITH_ATTRS { + svn_error_t * svn_repos_fs_commit_txn +}; +#endif + +/* ----------------------------------------------------------------------- handle svn_repos_get_committed_info(). */ #ifdef SWIGRUBY Modified: subversion/branches/multi-wc-format/subversion/bindings/swig/svn_wc.i URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/swig/svn_wc.i?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/bindings/swig/svn_wc.i (original) +++ subversion/branches/multi-wc-format/subversion/bindings/swig/svn_wc.i Fri Jan 14 14:01:45 2022 @@ -21,15 +21,16 @@ * svn_wc.i: SWIG interface file for svn_wc.h */ +%include svn_global.swg + #if defined(SWIGPYTHON) -%module(package="libsvn") wc +%module(package="libsvn", moduleimport=SVN_PYTHON_MODULEIMPORT) wc #elif defined(SWIGPERL) %module "SVN::_Wc" #elif defined(SWIGRUBY) %module "svn::ext::wc" #endif -%include svn_global.swg %import core.i %import svn_delta.i %import svn_ra.i Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_auth_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_auth_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_auth_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_auth_private.h Fri Jan 14 14:01:45 2022 @@ -39,7 +39,7 @@ extern "C" { /** SSL server authority verification credential type. * - * The followin auth parameters are available to the providers: + * The following auth parameters are available to the providers: * * - @c SVN_AUTH_PARAM_SSL_SERVER_FAILURES (@c apr_uint32_t*) * - @c SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_branch.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_branch.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_branch.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_branch.h Fri Jan 14 14:01:45 2022 @@ -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'. * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_branch_impl.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_branch_impl.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_branch_impl.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_branch_impl.h Fri Jan 14 14:01:45 2022 @@ -21,7 +21,7 @@ * @endcopyright * * @file svn_branch_impl.h - * @brief Declarations needed by implementators of branch classes + * @brief Declarations needed by implementors of branch classes * * @since New in ???. */ @@ -36,7 +36,7 @@ extern "C" { #endif -/* Common aspects od a txn/branch 'editor' class (derived from Ev2) */ +/* Common aspects of a txn/branch 'editor' class (derived from Ev2) */ typedef struct svn_branch__vtable_priv_t { /* Standard cancellation function. Called before each callback. */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_client_mtcc.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_client_mtcc.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_client_mtcc.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_client_mtcc.h Fri Jan 14 14:01:45 2022 @@ -207,6 +207,17 @@ svn_client__mtcc_check_path(svn_node_kin /** 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 * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_client_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_client_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_client_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_client_private.h Fri Jan 14 14:01:45 2022 @@ -281,26 +281,6 @@ svn_client__wc_node_get_origin(svn_clien 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. * @@ -373,34 +353,11 @@ svn_client__get_diff_writer_svn( svn_client_ctx_t *ctx, apr_pool_t *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); - /*** Editor for diff summary ***/ /* Set *DIFF_PROCESSOR to a diff processor that will report a diff summary to SUMMARIZE_FUNC. - P_ROOT_RELPATH will return a pointer to a string that must be set, - before the processor is called, to a prefix that will be found on - every DIFF_PROCESSOR relpath, that will be removed before passing - the path to SUMMARIZE_FUNC. - - ORIGINAL_TARGET is not used. - SUMMARIZE_FUNC is called with SUMMARIZE_BATON as parameter by the created callbacks for each changed item. */ @@ -412,6 +369,172 @@ svn_client__get_diff_summarize_callbacks 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 */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_config_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_config_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_config_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_config_private.h Fri Jan 14 14:01:45 2022 @@ -77,7 +77,7 @@ typedef svn_error_t *(*svn_config__add_v /* - * Create a new constuctor allocated from RESULT_POOL. + * Create a new constructor allocated from RESULT_POOL. * Any of the callback functions may be NULL. * The constructor implementation is responsible for implementing any * case-insensitivity, value expansion, or other features on top of @@ -98,9 +98,9 @@ svn_config__constructor_create( * passed to the callback in the same order as they're defined in * STREAM. * - * The lifetome of section names, option names and values passed to + * The lifetime of section names, option names and values passed to * the constructor does not extend past the invocation of each - * callback; see calback docs, above. + * callback; see callback docs, above. * * The parser will use SCRATCH_POOL for its own allocations. */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_dep_compat.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_dep_compat.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_dep_compat.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_dep_compat.h Fri Jan 14 14:01:45 2022 @@ -29,6 +29,7 @@ #define SVN_DEP_COMPAT_H #include <apr_version.h> +#include <apr_errno.h> #ifdef __cplusplus extern "C" { @@ -108,12 +109,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: @@ -199,6 +194,16 @@ extern "C" { ((major*1000000 + minor*1000 + patch) <= SVN_SQLITE_MIN_VERSION_NUMBER) #endif /* SQLITE_VERSION_AT_LEAST */ +/** + * Support for 'apr_escape_shell() which was introduced in APR 1.5. + */ +#if !APR_VERSION_AT_LEAST(1,5,0) +/* from apr_escape.h */ +#define APR_ESCAPE_STRING (-1) +APR_DECLARE(apr_status_t) apr_escape_shell(char *escaped, const char *str, + apr_ssize_t slen, apr_size_t *len); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_diff_tree.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_diff_tree.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_diff_tree.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_diff_tree.h Fri Jan 14 14:01:45 2022 @@ -74,14 +74,14 @@ extern "C" { * To cleanup the implementation and make it easier on diff processors to * handle the results I also added the following constraints. * - * * Diffs should be fully reversable: anything that is deleted should be + * * Diffs should be fully reversible: anything that is deleted should be * available, just like something that is added. * (Proven via svn_diff__tree_processor_reverse_create) * ### Still in doubt if *_deleted() needs a copy_to argument, for the * ### 99% -> 100%. * * * Diff processors should have an easy way to communicate that they are - * not interrested in certain expensive to obtain results. + * not interested in certain expensive to obtain results. * * * Directories should have clear open and close events to allow adding them * before their children, but still allowing property changes to have Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_doxygen.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_doxygen.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_doxygen.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_doxygen.h Fri Jan 14 14:01:45 2022 @@ -28,5 +28,5 @@ * intending to use these APIs. For more information about using Subversion, * see the Subversion Book at http://svnbook.red-bean.com/. * - * To learn more about Subversion, please visit http://subversion.apache.org/. + * To learn more about Subversion, please visit https://subversion.apache.org/. */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_fs_fs_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_fs_fs_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_fs_fs_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_fs_fs_private.h Fri Jan 14 14:01:45 2022 @@ -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. @@ -288,7 +272,7 @@ typedef struct svn_fs_fs__id_part_t svn_revnum_t revision; /* sub-id value relative to REVISION. Its interpretation depends on - the part itself. In rev_item, it is the index_index value, in others + the part itself. In rev_item, it is the item_index value, in others it represents a unique counter value. */ apr_uint64_t number; } svn_fs_fs__id_part_t; @@ -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); +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; -/* 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); +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 } Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_io_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_io_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_io_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_io_private.h Fri Jan 14 14:01:45 2022 @@ -102,8 +102,38 @@ svn_stream__create_for_install(svn_strea apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Configure value of the read-only attribute that will be set when + the stream is installed. */ +void +svn_stream__install_set_read_only(svn_stream_t *install_stream, + svn_boolean_t read_only); + +/* Configure value of the executable bit that will be set when the + stream is installed. */ +void +svn_stream__install_set_executable(svn_stream_t *install_stream, + svn_boolean_t executable); + +/* Configure value of the last modification time that will be set + when the stream is installed. */ +void +svn_stream__install_set_affected_time(svn_stream_t *install_stream, + apr_time_t mtime); + +/* Finalize the content, attributes and the timestamps of the underlying + temporary file. Return the properties of the finalized file in MTIME_P + and SIZE_P. The returned properties are guaranteed to be preserved + after the stream is installed. MTIME_P and SIZE_P both may be NULL.*/ +svn_error_t * +svn_stream__install_finalize(apr_time_t *mtime_p, + apr_off_t *size_p, + svn_stream_t *install_stream, + apr_pool_t *scratch_pool); + /* Installs a stream created with svn_stream__create_for_install in its final location FINAL_ABSPATH, potentially using platform specific optimizations. + If the stream has not been finalized with svn_stream__install_finalize(), + the behavior is undefined. If MAKE_PARENTS is TRUE, this function will create missing parent directories if needed. @@ -119,14 +149,6 @@ svn_error_t * svn_stream__install_delete(svn_stream_t *install_stream, apr_pool_t *scratch_pool); -/* Optimized apr_file_stat / apr_file_info_get operating on a closed - install stream */ -svn_error_t * -svn_stream__install_get_info(apr_finfo_t *finfo, - svn_stream_t *install_stream, - apr_int32_t wanted, - apr_pool_t *scratch_pool); - /* Internal version of svn_stream_from_aprfile2() supporting the additional TRUNCATE_ON_SEEK argument. */ svn_stream_t * @@ -172,6 +194,36 @@ svn_io__win_rename_open_file(apr_file_t const char *to_path, apr_pool_t *pool); +/* Special value that indicates that the file system should not update + timestamp values such as LastAccessTime, LastWriteTime, and ChangeTime + during this I/O operation. + Corresponds to the predefined value of "0" in: + https://docs.microsoft.com/windows-hardware/drivers/ddi/wdm/ns-wdm-_file_basic_information#remarks + */ +#define SVN_IO__WIN_TIME_UNCHANGED APR_INT64_MIN + 0 + +/* Special value that indicates that the file system should suspend updates + for timestamp values such as LastAccessTime, LastWriteTime, and ChangeTime + during subsequent I/O operations on the file handle. + Corresponds to the predefined value of "-1" in: + https://docs.microsoft.com/windows-hardware/drivers/ddi/wdm/ns-wdm-_file_basic_information#remarks + */ +#define SVN_IO__WIN_TIME_SUSPEND_UPDATE APR_INT64_MIN + 1 + +/* This Windows-specific function sets the basic file information using an + existing file handle. The SET_MTIME will be set as the new LastWriteTime + value, unless it is equal to one of the predefined special values such + as SVN_IO__WIN_TIME_UNCHANGED or SVN_IO__WIN_TIME_SUSPEND_UPDATE. + If SET_READ_ONLY is non-zero, the file attributes will be updated to + include FILE_ATTRIBUTE_READONLY. Return SVN_ERR_UNSUPPORTED_FEATURE + if not supported by OS. */ +svn_error_t * +svn_io__win_set_file_basic_info(apr_file_t *file, + const char *path, + apr_time_t set_mtime, + svn_boolean_t set_read_only, + apr_pool_t *pool); + #endif /* WIN32 */ #ifdef __cplusplus Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_mergeinfo_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_mergeinfo_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_mergeinfo_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_mergeinfo_private.h Fri Jan 14 14:01:45 2022 @@ -62,7 +62,7 @@ svn_rangelist__parse(svn_rangelist_t **r /* Return TRUE, if all ranges in RANGELIST are in ascending order and do * not overlap and are not adjacent. * -* If this returns FALSE, you probaly want to call +* If this returns FALSE, you probably want to call * svn_rangelist__canonicalize(). */ svn_boolean_t Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_object_pool.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_object_pool.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_object_pool.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_object_pool.h Fri Jan 14 14:01:45 2022 @@ -67,7 +67,7 @@ typedef struct svn_object_pool__t svn_ob /* Create a new object pool in POOL and return it in *OBJECT_POOL. * Objects are reference-counted and stored as opaque pointers. Each - * must be allocated in a separate pool ceated by + * must be allocated in a separate pool created by * svn_object_pool__new_item_pool. Unused objects get destroyed at * the object pool's discretion. * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_repos_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_repos_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_repos_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_repos_private.h Fri Jan 14 14:01:45 2022 @@ -86,9 +86,11 @@ svn_repos__validate_prop(const char *nam * * 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. */ @@ -315,7 +317,7 @@ svn_repos__dump_uuid_header_record(svn_s apr_pool_t *pool); /* Write a revision record to DUMP_STREAM for revision REVISION with revision - * properies REVPROPS, creating appropriate headers. + * properties REVPROPS, creating appropriate headers. * * Include all of the headers in EXTRA_HEADERS (if non-null), ignoring * the revision number header and the three content length headers (which Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_sorts_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_sorts_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_sorts_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_sorts_private.h Fri Jan 14 14:01:45 2022 @@ -80,7 +80,7 @@ svn_sort__array(apr_array_header_t *arra int (*comparison_func)(const void *, const void *)); -/* Return the lowest index at which the element @a *key should be inserted into +/** Return the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -93,7 +93,7 @@ svn_sort__bsearch_lower_bound(const apr_ const void *key, int (*compare_func)(const void *, const void *)); -/* Find the lowest index at which the element @a *key should be inserted into +/** Find the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -116,32 +116,35 @@ svn_sort__array_lookup(const apr_array_h int (*compare_func)(const void *, const void *)); -/* Insert a shallow copy of @a *new_element into the array @a array at the index +/** Insert a shallow copy of @a *new_element into the array @a array at the index * @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. +/** Remove @a elements_to_delete elements starting at @a delete_index from the + * 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. +/** Reverse the order of elements in @a array, in place. * * @note Private. For use by Subversion's own code only. */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_sqlite.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_sqlite.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_sqlite.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_sqlite.h Fri Jan 14 14:01:45 2022 @@ -501,6 +501,49 @@ svn_sqlite__with_immediate_transaction(s SVN_ERR(svn_sqlite__finish_savepoint(svn_sqlite__db, svn_sqlite__err)); \ } while (0) +/* Evaluate the expression EXPR1..EXPR2 within a 'savepoint'. Savepoints can + * be nested. + * + * Begin a savepoint in DB; evaluate the expression EXPR1, which would + * typically be a function call that does some work in DB; if no error occurred, + * run EXPR2 and release the savepoint if all expressions evaluated to + * SVN_NO_ERROR, otherwise roll back to the savepoint and then release it. + */ +#define SVN_SQLITE__WITH_LOCK2(expr1, expr2, db) \ + do { \ + svn_sqlite__db_t *svn_sqlite__db = (db); \ + svn_error_t *svn_sqlite__err; \ + \ + SVN_ERR(svn_sqlite__begin_savepoint(svn_sqlite__db)); \ + svn_sqlite__err = (expr1); \ + if (!svn_sqlite__err) \ + svn_sqlite__err = (expr2); \ + SVN_ERR(svn_sqlite__finish_savepoint(svn_sqlite__db, svn_sqlite__err)); \ + } while (0) + +/* Evaluate the expression EXPR1..EXPR3 within a 'savepoint'. Savepoints can + * be nested. + * + * Begin a savepoint in DB; evaluate the expression EXPR1, which would + * typically be a function call that does some work in DB; if no error occurred, + * run EXPR2; if no error occurred EXPR3; ... and finally release + * the savepoint if all expressions evaluated to SVN_NO_ERROR, otherwise + * roll back to the savepoint and then release it. + */ +#define SVN_SQLITE__WITH_LOCK3(expr1, expr2, expr3, db) \ + do { \ + svn_sqlite__db_t *svn_sqlite__db = (db); \ + svn_error_t *svn_sqlite__err; \ + \ + SVN_ERR(svn_sqlite__begin_savepoint(svn_sqlite__db)); \ + svn_sqlite__err = (expr1); \ + if (!svn_sqlite__err) \ + svn_sqlite__err = (expr2); \ + if (!svn_sqlite__err) \ + svn_sqlite__err = (expr3); \ + SVN_ERR(svn_sqlite__finish_savepoint(svn_sqlite__db, svn_sqlite__err)); \ + } while (0) + /* Evaluate the expression EXPR1..EXPR4 within a 'savepoint'. Savepoints can * be nested. * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_subr_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_subr_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_subr_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_subr_private.h Fri Jan 14 14:01:45 2022 @@ -600,7 +600,7 @@ svn__decompress_lz4(const void *data, ap /* Opaque thread-safe container for unused / recylcleable root pools. * - * Recyling root pools (actually, their allocators) circumvents a + * Recycling root pools (actually, their allocators) circumvents a * scalability bottleneck in the OS memory management when multi-threaded * applications frequently create and destroy allocators. */ Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_temp_serializer.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_temp_serializer.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_temp_serializer.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_temp_serializer.h Fri Jan 14 14:01:45 2022 @@ -90,7 +90,7 @@ svn_temp_serializer__init(const void *so * data to serialized structures returned by svn_temp_serializer__get(). * * The current size of the serialized data is given in @a currently_used. - * If the allocated data buffer is actually larger, you may specifiy that + * If the allocated data buffer is actually larger, you may specify that * size in @a currently_allocated to prevent unnecessary re-allocations. * Otherwise, set it to 0. * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_utf_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_utf_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_utf_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_utf_private.h Fri Jan 14 14:01:45 2022 @@ -116,7 +116,7 @@ svn_utf__win32_utf16_to_utf8(const char /* A constant used for many length parameters in the utf8proc wrappers - * to indicate that the length of a string is unknonw. */ + * to indicate that the length of a string is unknown. */ #define SVN_UTF__UNKNOWN_LENGTH ((apr_size_t) -1) @@ -151,14 +151,14 @@ svn_utf__normalize(const char **result, svn_membuf_t *buf); /* Transform the UTF-8 string to a shape suitable for comparison with - * strcmp(). The tranformation is defined by CASE_INSENSITIVE and + * strcmp(). The transformation is defined by CASE_INSENSITIVE and * ACCENT_INSENSITIVE arguments. If CASE_INSENSITIVE is non-zero, * remove case distinctions from the string. If ACCENT_INSENSITIVE * is non-zero, remove diacritical marks from the string. * * Use BUF as a temporary storage. If LEN is SVN_UTF__UNKNOWN_LENGTH, * assume STR is null-terminated; otherwise, consider the string only - * up to the given length. Place the tranformed string in *RESULT, which + * up to the given length. Place the transformed string in *RESULT, which * shares storage with BUF and is valid only until the next time BUF is * modified. * Modified: subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h (original) +++ subversion/branches/multi-wc-format/subversion/include/private/svn_wc_private.h Fri Jan 14 14:01:45 2022 @@ -37,6 +37,7 @@ #ifndef SVN_WC_PRIVATE_H #define SVN_WC_PRIVATE_H +#include "svn_subst.h" #include "svn_types.h" #include "svn_wc.h" #include "private/svn_diff_tree.h" @@ -348,9 +349,9 @@ svn_wc__get_wcroot(const char **wcroot_a 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. * @@ -358,11 +359,11 @@ svn_wc__get_wcroot(const char **wcroot_a */ 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 @@ -409,7 +410,7 @@ svn_wc__status2_from_3(svn_wc_status2_t * Return every path that refers to a child of the working node at * @a dir_abspath. Do not include a path just because it was a child of a * deleted directory that existed at @a dir_abspath if that directory is now - * sheduled to be replaced by the working node at @a dir_abspath. + * scheduled to be replaced by the working node at @a dir_abspath. * * Allocate @a *children in @a result_pool. Use @a wc_ctx to access the * working copy, and @a scratch_pool for all temporary allocations. @@ -635,6 +636,24 @@ svn_wc__find_working_nodes_with_basename 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. @@ -899,7 +918,7 @@ svn_wc__node_get_lock_tokens_recursive(a /* Set @a *min_revision and @a *max_revision to the lowest and highest revision * numbers found within @a local_abspath, using context @a wc_ctx. * If @a committed is TRUE, set @a *min_revision and @a *max_revision - * to the lowest and highest comitted (i.e. "last changed") revision numbers, + * to the lowest and highest committed (i.e. "last changed") revision numbers, * respectively. Use @a scratch_pool for temporary allocations. * * Either of MIN_REVISION and MAX_REVISION may be passed as NULL if @@ -1071,7 +1090,7 @@ svn_wc__get_not_present_descendants(cons * If PARENT_DEPTH is not NULL, set *PARENT_DEPTH to the depth stored on the * parent. (Set to svn_depth_unknown if LOCAL_ABSPATH itself exists as node) * - * All output arguments except OBSTRUCTION_STATE can be NULL to ommit the + * All output arguments except OBSTRUCTION_STATE can be NULL to omit the * result. * * This function performs temporary allocations in SCRATCH_POOL. @@ -1782,7 +1801,7 @@ svn_wc__resolve_conflicts(svn_wc_context 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 @@ -1799,7 +1818,7 @@ svn_wc__conflict_text_mark_resolved(svn_ 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. @@ -1830,7 +1849,7 @@ svn_wc__conflict_prop_mark_resolved(svn_ * * 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 @@ -1867,7 +1886,7 @@ svn_wc__conflict_tree_update_break_moved * * 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 @@ -1903,7 +1922,7 @@ svn_wc__conflict_tree_update_raise_moved * * 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 @@ -2062,7 +2081,7 @@ svn_wc__acquire_write_lock_for_resolve(c apr_pool_t *result_pool, apr_pool_t *scratch_pool); -/* The implemementation of svn_wc_diff6(), but reporting to a diff processor +/* The implementation of svn_wc_diff6(), but reporting to a diff processor * * New mode, when ANCHOR_AT_GIVEN_PATHS is true: * @@ -2090,7 +2109,7 @@ svn_wc__diff7(svn_boolean_t anchor_at_gi /** * Read all conflicts at LOCAL_ABSPATH into an array containing pointers to - * svn_wc_conflict_description2_t data structures alloated in RESULT_POOL. + * svn_wc_conflict_description2_t data structures allocated in RESULT_POOL. */ svn_error_t * svn_wc__read_conflict_descriptions2_t(const apr_array_header_t **conflicts, @@ -2110,13 +2129,63 @@ svn_wc__translated_stream(svn_stream_t * apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Context of the working file writer. */ +typedef struct svn_wc__working_file_writer_t svn_wc__working_file_writer_t; + +/* Create a write context for the (provisioned) working file with the specified + properties. The file writer must be given data in the repository-normal + form and will handle its translation according to the specified properties. + Place the temporary file in the TMP_ABSPATH directory. If FINAL_MTIME is + non-negative, it will be set as the last modification time on the installed + file. */ +svn_error_t * +svn_wc__working_file_writer_open(svn_wc__working_file_writer_t **writer_p, + const char *tmp_abspath, + apr_time_t final_mtime, + svn_subst_eol_style_t eol_style, + const char *eol, + svn_boolean_t repair_eol, + apr_hash_t *keywords, + svn_boolean_t is_special, + svn_boolean_t is_executable, + svn_boolean_t is_readonly, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/* Get the writable stream for WRITER. The returned stream supports reset + and is configured to be truncated on seek. */ +svn_stream_t * +svn_wc__working_file_writer_get_stream(svn_wc__working_file_writer_t *writer); + +/* Finalize the content, attributes and the timestamps of the underlying + temporary file. Return the properties of the finalized file in MTIME_P + and SIZE_P. MTIME_P and SIZE_P both may be NULL. */ +svn_error_t * +svn_wc__working_file_writer_finalize(apr_time_t *mtime_p, + apr_off_t *size_p, + svn_wc__working_file_writer_t *writer, + apr_pool_t *scratch_pool); + +/* Atomically install the contents of WRITER to TARGET_ABSPATH. + If the writer has not been previously finalized with a call to + svn_wc__working_file_writer_finalize(), the behavior is undefined. */ +svn_error_t * +svn_wc__working_file_writer_install(svn_wc__working_file_writer_t *writer, + const char *target_abspath, + apr_pool_t *scratch_pool); + +/* Cleanup WRITER by closing and removing the underlying file. */ +svn_error_t * +svn_wc__working_file_writer_close(svn_wc__working_file_writer_t *writer); + + /** * Convert @a version to that version's characteristic working copy * format, returned in @a format. * * Use @a scratch_pool for temporary allocations. * - * @since New in 1.12. + * @since New in 1.15. */ svn_error_t * svn_wc__format_from_version(int *format, @@ -2130,7 +2199,7 @@ svn_wc__format_from_version(int *format, * * Use @a scratch_pool for temporary allocations. * - * @since New in 1.12. + * @since New in 1.15. */ svn_error_t * svn_wc__format_from_context(int *format, @@ -2162,7 +2231,7 @@ svn_wc__format_from_context(int *format, * * Use @a scratch_pool for temporary allocations. * - * @since New in 1.12. + * @since New in 1.15. */ svn_error_t * svn_wc__ensure_adm(svn_wc_context_t *wc_ctx, @@ -2193,7 +2262,7 @@ svn_wc__ensure_adm(svn_wc_context_t *wc_ * repository uuid, @a repos_info_func (if non-NULL) will be called * with @a repos_info_baton to provide the missing information. * - * @since New in 1.12. + * @since New in 1.15. */ svn_error_t * svn_wc__upgrade(svn_wc_context_t *wc_ctx, Modified: subversion/branches/multi-wc-format/subversion/include/svn_auth.h URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/include/svn_auth.h?rev=1897034&r1=1897033&r2=1897034&view=diff ============================================================================== --- subversion/branches/multi-wc-format/subversion/include/svn_auth.h (original) +++ subversion/branches/multi-wc-format/subversion/include/svn_auth.h Fri Jan 14 14:01:45 2022 @@ -628,12 +628,12 @@ svn_auth_get_parameter(svn_auth_baton_t #define SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO SVN_AUTH_PARAM_PREFIX \ "ssl:cert-info" -/** This provides a pointer to a @c svn_config_t containting the config +/** This provides a pointer to a @c svn_config_t containing the config * category. */ #define SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG SVN_AUTH_PARAM_PREFIX \ "config-category-config" -/** This provides a pointer to a @c svn_config_t containting the servers +/** This provides a pointer to a @c svn_config_t containing the servers * category. */ #define SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS SVN_AUTH_PARAM_PREFIX \ "config-category-servers"
