Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_ra_svn_private.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_ra_svn_private.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/private/svn_ra_svn_private.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/private/svn_ra_svn_private.h Fri Sep 11 15:51:30 2015 @@ -34,6 +34,99 @@ extern "C" { #endif /* __cplusplus */ +/** Memory representation of an on-the-wire data item. */ +typedef struct svn_ra_svn__item_t svn_ra_svn__item_t; + +/* A list of svn_ra_svn__item_t objects. */ +typedef struct svn_ra_svn__list_t +{ + /* List contents (array). May be NULL if NELTS is 0. */ + struct svn_ra_svn__item_t *items; + + /* Number of elements in ITEMS. */ + int nelts; +} svn_ra_svn__list_t; + +/* List element access macro. */ +#define SVN_RA_SVN__LIST_ITEM(list, idx) (list)->items[idx] + +/** Memory representation of an on-the-wire data item. */ +struct svn_ra_svn__item_t +{ + /** Variant indicator. */ + svn_ra_svn_item_kind_t kind; + + /** Variant data. */ + union { + apr_uint64_t number; + svn_string_t string; + const char *word; + svn_ra_svn__list_t list; + } u; +}; + +/** Command handler, used by svn_ra_svn__handle_commands(). */ +typedef svn_error_t *(*svn_ra_svn__command_handler)(svn_ra_svn_conn_t *conn, + apr_pool_t *pool, + svn_ra_svn__list_t *params, + void *baton); + +/** Command table, used by svn_ra_svn_handle_commands(). + */ +typedef struct svn_ra_svn__cmd_entry_t +{ + /** Name of the command */ + const char *cmdname; + + /** Handler for the command */ + svn_ra_svn__command_handler handler; + + /** Only set when used through a deprecated API. + * HANDLER is NULL in that case. */ + svn_ra_svn_command_handler deprecated_handler; + + /** Termination flag. If set, command-handling will cease after + * command is processed. */ + svn_boolean_t terminate; +} svn_ra_svn__cmd_entry_t; + + +/* Return a deep copy of the SOURCE array containing private API + * svn_ra_svn__item_t SOURCE to public API *TARGET, allocating + * sub-structures in RESULT_POOL. */ +apr_array_header_t * +svn_ra_svn__to_public_array(const svn_ra_svn__list_t *source, + apr_pool_t *result_pool); + +/* Deep copy contents from private API *SOURCE to public API *TARGET, + * allocating sub-structures in RESULT_POOL. */ +void +svn_ra_svn__to_public_item(svn_ra_svn_item_t *target, + const svn_ra_svn__item_t *source, + apr_pool_t *result_pool); + +svn_ra_svn__list_t * +svn_ra_svn__to_private_array(const apr_array_header_t *source, + apr_pool_t *result_pool); + +/* Deep copy contents from public API *SOURCE to private API *TARGET, + * allocating sub-structures in RESULT_POOL. */ +void +svn_ra_svn__to_private_item(svn_ra_svn__item_t *target, + const svn_ra_svn_item_t *source, + apr_pool_t *result_pool); + +/** Add the capabilities in @a list to @a conn's capabilities. + * @a list contains svn_ra_svn__item_t entries (which should be of type + * SVN_RA_SVN_WORD; a malformed data error will result if any are not). + * + * This is idempotent: if a given capability was already set for + * @a conn, it remains set. + */ +svn_error_t * +svn_ra_svn__set_capabilities(svn_ra_svn_conn_t *conn, + const svn_ra_svn__list_t *list); + /** * Set the shim callbacks to be used by @a conn to @a shim_callbacks. @@ -175,7 +268,7 @@ svn_ra_svn__write_tuple(svn_ra_svn_conn_ svn_error_t * svn_ra_svn__read_item(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - svn_ra_svn_item_t **item); + svn_ra_svn__item_t **item); /** Scan data on @a conn until we find something which looks like the * beginning of an svn server greeting (an open paren followed by a @@ -226,7 +319,7 @@ svn_ra_svn__skip_leading_garbage(svn_ra_ * 'b' may not appear inside an optional tuple specification; use '3' instead. */ svn_error_t * -svn_ra_svn__parse_tuple(const apr_array_header_t *list, +svn_ra_svn__parse_tuple(const svn_ra_svn__list_t *list, apr_pool_t *pool, const char *fmt, ...); @@ -238,13 +331,13 @@ svn_ra_svn__read_tuple(svn_ra_svn_conn_t apr_pool_t *pool, const char *fmt, ...); -/** Parse an array of @c svn_ra_svn_item_t structures as a list of +/** Parse an array of @c svn_ra_svn__item_t structures as a list of * properties, storing the properties in a hash table. * * @since New in 1.5. */ svn_error_t * -svn_ra_svn__parse_proplist(const apr_array_header_t *list, +svn_ra_svn__parse_proplist(const svn_ra_svn__list_t *list, apr_pool_t *pool, apr_hash_t **props); @@ -300,7 +393,7 @@ svn_ra_svn__handle_command(svn_boolean_t svn_error_t * svn_ra_svn__handle_commands2(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const svn_ra_svn_cmd_entry_t *commands, + const svn_ra_svn__cmd_entry_t *commands, void *baton, svn_boolean_t error_on_disconnect); @@ -347,7 +440,7 @@ svn_error_t * svn_ra_svn__write_cmd_open_root(svn_ra_svn_conn_t *conn, apr_pool_t *pool, svn_revnum_t rev, - const char *token); + const svn_string_t *token); /** Send a "delete-entry" command over connection @a conn. Delete the * @a path at optional revision @a rev below @a parent_token. @@ -358,7 +451,7 @@ svn_ra_svn__write_cmd_delete_entry(svn_r apr_pool_t *pool, const char *path, svn_revnum_t rev, - const char *parent_token); + const svn_string_t *parent_token); /** Send a "add-dir" command over connection @a conn. Add a new directory * node named @a path under the directory identified by @a parent_token. @@ -370,8 +463,8 @@ svn_error_t * svn_ra_svn__write_cmd_add_dir(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token, - const char *token, + const svn_string_t *parent_token, + const svn_string_t *token, const char *copy_path, svn_revnum_t copy_rev); @@ -384,8 +477,8 @@ svn_error_t * svn_ra_svn__write_cmd_open_dir(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token, - const char *token, + const svn_string_t *parent_token, + const svn_string_t *token, svn_revnum_t rev); /** Send a "change-dir-prop" command over connection @a conn. Set the @@ -395,7 +488,7 @@ svn_ra_svn__write_cmd_open_dir(svn_ra_sv svn_error_t * svn_ra_svn__write_cmd_change_dir_prop(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token, + const svn_string_t *token, const char *name, const svn_string_t *value); @@ -406,7 +499,7 @@ svn_ra_svn__write_cmd_change_dir_prop(sv svn_error_t * svn_ra_svn__write_cmd_close_dir(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token); + const svn_string_t *token); /** Send a "absent-dir" command over connection @a conn. Directory node * named @a path under the directory identified by @a parent_token is @@ -416,7 +509,7 @@ svn_error_t * svn_ra_svn__write_cmd_absent_dir(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token); + const svn_string_t *parent_token); /** Send a "add-file" command over connection @a conn. Add a new file * node named @a path under the directory identified by @a parent_token. @@ -428,8 +521,8 @@ svn_error_t * svn_ra_svn__write_cmd_add_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token, - const char *token, + const svn_string_t *parent_token, + const svn_string_t *token, const char *copy_path, svn_revnum_t copy_rev); @@ -442,8 +535,8 @@ svn_error_t * svn_ra_svn__write_cmd_open_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token, - const char *token, + const svn_string_t *parent_token, + const svn_string_t *token, svn_revnum_t rev); /** Send a "change-file-prop" command over connection @a conn. Set the @@ -453,7 +546,7 @@ svn_ra_svn__write_cmd_open_file(svn_ra_s svn_error_t * svn_ra_svn__write_cmd_change_file_prop(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token, + const svn_string_t *token, const char *name, const svn_string_t *value); @@ -465,7 +558,7 @@ svn_ra_svn__write_cmd_change_file_prop(s svn_error_t * svn_ra_svn__write_cmd_close_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token, + const svn_string_t *token, const char *text_checksum); /** Send a "absent-file" command over connection @a conn. File node @@ -476,7 +569,7 @@ svn_error_t * svn_ra_svn__write_cmd_absent_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *parent_token); + const svn_string_t *parent_token); /** Send a "apply-textdelta" command over connection @a conn. Starts a * series of text deltas to be applied to the file identified by @a token. @@ -486,7 +579,7 @@ svn_ra_svn__write_cmd_absent_file(svn_ra svn_error_t * svn_ra_svn__write_cmd_apply_textdelta(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token, + const svn_string_t *token, const char *base_checksum); /** Send a "textdelta-chunk" command over connection @a conn. Apply @@ -496,7 +589,7 @@ svn_ra_svn__write_cmd_apply_textdelta(sv svn_error_t * svn_ra_svn__write_cmd_textdelta_chunk(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token, + const svn_string_t *token, const svn_string_t *chunk); /** Send a "textdelta-end" command over connection @a conn. Ends the @@ -506,7 +599,7 @@ svn_ra_svn__write_cmd_textdelta_chunk(sv svn_error_t * svn_ra_svn__write_cmd_textdelta_end(svn_ra_svn_conn_t *conn, apr_pool_t *pool, - const char *token); + const svn_string_t *token); /** Send a "close-edit" command over connection @a conn. Ends the editor * drive (successfully). Use @a pool for allocations. @@ -790,7 +883,7 @@ svn_error_t * svn_ra_svn__write_cmd_unlock(svn_ra_svn_conn_t *conn, apr_pool_t *pool, const char *path, - const char *token, + const svn_string_t *token, svn_boolean_t break_lock); /** Send a "get-lock" command over connection @a conn. @@ -931,7 +1024,7 @@ svn_ra_svn__write_data_log_entry(svn_ra_ * @see svn_log_changed_path2_t for a description of the output parameters. */ svn_error_t * -svn_ra_svn__read_data_log_changed_entry(const apr_array_header_t *items, +svn_ra_svn__read_data_log_changed_entry(const svn_ra_svn__list_t *items, svn_string_t **cpath, const char **action, const char **copy_path,
Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h Fri Sep 11 15:51:30 2015 @@ -689,6 +689,19 @@ svn_dso__pool(void); /** @} */ + +/* Return the xml (expat) version we compiled against. */ +const char *svn_xml__compiled_version(void); + +/* Return the xml (expat) version we run against. */ +const char *svn_xml__runtime_version(void); + +/* Return the zlib version we compiled against. */ +const char *svn_zlib__compiled_version(void); + +/* Return the zlib version we run against. */ +const char *svn_zlib__runtime_version(void); + #ifdef __cplusplus } #endif /* __cplusplus */ Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_temp_serializer.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_temp_serializer.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/private/svn_temp_serializer.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/private/svn_temp_serializer.h Fri Sep 11 15:51:30 2015 @@ -206,7 +206,7 @@ svn_temp_serializer__get(svn_temp_serial * the pointer to resolve in @a ptr. */ void -svn_temp_deserializer__resolve(void *buffer, void **ptr); +svn_temp_deserializer__resolve(const void *buffer, void **ptr); /** * Similar to svn_temp_deserializer__resolve() but instead of modifying Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h Fri Sep 11 15:51:30 2015 @@ -1849,6 +1849,17 @@ svn_wc__diff7(const char **root_relpath, apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/** + * Read all conflicts at LOCAL_ABSPATH into an array containing pointers to + * svn_wc_conflict_description2_t data structures alloated in RESULT_POOL. + */ +svn_error_t * +svn_wc__read_conflict_descriptions2_t(const apr_array_header_t **conflicts, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + #ifdef __cplusplus } #endif /* __cplusplus */ Modified: subversion/branches/reuse-ra-session/subversion/include/svn_client.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_client.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_client.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_client.h Fri Sep 11 15:51:30 2015 @@ -4362,14 +4362,225 @@ svn_client_revert(const apr_array_header */ /** + * An opaque type which represents a conflicted node in the working copy. + * + * @since New in 1.10. + */ +typedef struct svn_client_conflict_t svn_client_conflict_t; + +/** + * An opaque type which represents a resolution option for a conflict. + * + * @since New in 1.10. + */ +typedef struct svn_client_conflict_option_t svn_client_conflict_option_t; + +/** + * A public enumuneration of conflict option IDs. + * + * @since New in 1.10, unless noted otherwise. + */ +typedef enum svn_client_conflict_option_id_t { + + /* These values intentionally mirror svn_wc_conflict_choice_t. */ + svn_client_conflict_option_undefined = -1, /* for private use only */ + svn_client_conflict_option_postpone = 0, + svn_client_conflict_option_base_text, + svn_client_conflict_option_incoming_new_text, + svn_client_conflict_option_working_text, + svn_client_conflict_option_incoming_new_text_for_conflicted_hunks_only, + svn_client_conflict_option_working_text_for_conflicted_hunks_only, + svn_client_conflict_option_merged_text, + svn_client_conflict_option_unspecified + /* Values derived from svn_wc_conflict_choice_t end here. */ + +} 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. + * + * The contents of @a merged_propval are not copied, so the storage it + * points to needs to remain valid until svn_client_conflict_prop_resolve() + * has been called with @a option. + * + * @since New in 1.10. + */ +void +svn_client_conflict_option_set_merged_propval( + svn_client_conflict_option_t *option, + const svn_string_t *merged_propval); + +/** + * Given an @a option_id, try to find the corresponding option in @a options, + * which is an array of svn_client_conflict_option_t * elements. + * + * Return NULL if no corresponding option can be be found. + * + * @since New in 1.10. + */ +svn_client_conflict_option_t * +svn_client_conflict_option_find_by_id( + apr_array_header_t *options, + svn_client_conflict_option_id_t option_id); + +/** + * Return a conflict for the conflicted path @a local_abspath. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_get(svn_client_conflict_t **conflict, + const char *local_abspath, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Return a conflict corresponding to legacy conflict description @a desc. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_from_wc_description2_t( + svn_client_conflict_t **conflict, + const svn_wc_conflict_description2_t *desc, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Callback for svn_client_conflict_walk_conflicts(); + * + * @since New in 1.10. + */ +typedef svn_error_t *(svn_client_conflict_walk_func_t)( + void *baton, + svn_client_conflict_t *conflict, + apr_pool_t *scratch_pool); + +/** + * Walk all conflicts within the specified @a depth of @a local_abspath. + * Pass each conflict found during the walk to the @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 * +svn_client_conflict_walk(const char *local_abspath, + svn_depth_t depth, + svn_client_conflict_walk_func_t conflict_walk_func, + void *conflict_walk_func_baton, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool); + +/** +* Indicate the types of conflicts present on the working copy node +* described by @a conflict. Any output argument may be @c NULL if +* the caller is not interested in the status of a particular type. +* +* The returned @a *props_conflicted array is allocated in @a result_pool. +* It contains the names of conflicted properties. If no property conflict +* exists, the array will contain no elements. +* +* @since New in 1.10. +*/ +svn_error_t * +svn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted, + apr_array_header_t **props_conflicted, + svn_boolean_t *tree_conflicted, + svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Set @a *options to an array of pointers to svn_client_conflict_option_t + * objects applicable to text conflicts described by @a conflict. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_text_get_resolution_options(apr_array_header_t **options, + svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Set @a *options to an array of pointers to svn_client_conflict_option_t + * objects applicable to property conflicts described by @a conflict. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_prop_get_resolution_options(apr_array_header_t **options, + svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Set @a *options to an array of pointers to svn_client_conflict_option_t + * objects applicable to the tree conflict described by @a conflict. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_tree_get_resolution_options(apr_array_header_t **options, + svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Return an ID for @a option. This ID can be used by callers to associate + * arbitrary data with a particular conflict resolution option. + * + * The ID of a particular resolution option will never change in future + * revisions of this API. + * + * @since New in 1.10. + */ +svn_client_conflict_option_id_t +svn_client_conflict_option_get_id(svn_client_conflict_option_t *option); + +/** + * Return a textual human-readable description of @a option, allocated in + * @a result_pool. The description is encoded in UTF-8 and may contain + * multiple lines separated by @c APR_EOL_STR. + * + * Additionally, the description may be localized to the language used + * by the current locale. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_option_describe(const char **description, + svn_client_conflict_option_t *option, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Return the kind of conflict (text conflict, property conflict, + * or tree conflict) represented by @a conflict. + * + * New in 1.10. + */ +svn_wc_conflict_kind_t +svn_client_conflict_get_kind(const svn_client_conflict_t *conflict); + +/** * Return the absolute path to the conflicted working copy node described * by @a conflict. * * @since New in 1.10. */ const char * -svn_client_conflict_get_local_abspath( - const svn_wc_conflict_description2_t *conflict); +svn_client_conflict_get_local_abspath(const svn_client_conflict_t *conflict); /** * Return the operation during which the conflict described by @a @@ -4378,8 +4589,7 @@ svn_client_conflict_get_local_abspath( * @since New in 1.10. */ svn_wc_operation_t -svn_client_conflict_get_operation( - const svn_wc_conflict_description2_t *conflict); +svn_client_conflict_get_operation(const svn_client_conflict_t *conflict); /** * Return the action an update, switch, or merge operation attempted to @@ -4388,8 +4598,7 @@ svn_client_conflict_get_operation( * @since New in 1.10. */ svn_wc_conflict_action_t -svn_client_conflict_get_incoming_change( - const svn_wc_conflict_description2_t *conflict); +svn_client_conflict_get_incoming_change(const svn_client_conflict_t *conflict); /** * Return the reason why the attempted action performed by an update, switch, @@ -4403,61 +4612,257 @@ svn_client_conflict_get_incoming_change( * @since New in 1.10. */ svn_wc_conflict_reason_t -svn_client_conflict_get_local_change( - const svn_wc_conflict_description2_t *conflict); +svn_client_conflict_get_local_change(const svn_client_conflict_t *conflict); /** - * Accessor functions for svn_wc_conflict_description2_t. This is a temporary - * API for eventually replacing svn_wc_conflict_description2_t with an opaque - * type and providing improved APIs for conflict resolution. + * 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. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_get_repos_info(const char **repos_root_url, + const char **repos_uuid, + const svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); + +/** + * Return the repository-relative location and the node kind of the incoming + * 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, + * + * If the peg revision is not available, @a *incoming_old_regrev will be + * set to SVN_INVALID_REVNUM. * - * @since New in 1.10. + * 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. + * ### Should return svn_node_unkown if not available? + * + * 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 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 + * the old and new incoming versions. + * + * @since New in 1.10. */ +svn_error_t * +svn_client_conflict_get_incoming_old_repos_location( + const char **incoming_old_repos_relpath, + svn_revnum_t *incoming_old_regrev, + svn_node_kind_t *incoming_old_node_kind, + const svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_node_kind(conflict) \ - ((conflict)->node_kind) +/** + * Like svn_client_conflict_get_incoming_old_repos_location(), expect this + * function returns the same data for the incoming new version. + * + * The same note about tree conflicts applies. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_get_incoming_new_repos_location( + const char **incoming_new_repos_relpath, + svn_revnum_t *incoming_new_regrev, + svn_node_kind_t *incoming_new_node_kind, + const svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_kind(conflict) \ - ((conflict)->kind) +/** + * Return the node kind of the tree conflict victim described by @a conflict. + * The victim is the local node in the working copy which was affected by the + * tree conflict at the time the conflict was raised. + * + * @since New in 1.10. + */ +svn_node_kind_t +svn_client_conflict_tree_get_victim_node_kind( + const svn_client_conflict_t *conflict); -#define svn_client_conflict_get_property_name(conflict) \ - ((conflict)->property_name) +/** + * Resolve a tree @a conflict using resolution option @a option. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict, + svn_client_conflict_option_t *option, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_is_binary(conflict) \ - ((conflict)->is_binary) +/** + * If the provided @a option_id is the ID of an option which resolves + * @a conflict, resolve the tree conflict using that option. + * Else, return an error. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_tree_resolve_by_id( + svn_client_conflict_t *conflict, + svn_client_conflict_option_id_t option_id, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_mime_type(conflict) \ - ((conflict)->mime_type) +/** + * Return the ID of the option this tree @a conflict has been resolved to. + * If the conflict has not been resolved yet, then return + * @c svn_client_conflict_option_undefined. + * + * @since New in 1.10. + */ +svn_client_conflict_option_id_t +svn_client_conflict_tree_get_resolution(const svn_client_conflict_t *conflict); -#define svn_client_conflict_get_base_abspath(conflict) \ - ((conflict)->base_abspath) -#define svn_client_conflict_get_their_abspath(conflict) \ - ((conflict)->their_abspath) +/** + * Return the name of the conflicted property represented by @a conflict. + * + * @since New in 1.10. + */ +const char * +svn_client_conflict_prop_get_propname(const svn_client_conflict_t *conflict); -#define svn_client_conflict_get_my_abspath(conflict) \ - ((conflict)->my_abspath) +/** + * Return the path to the legacy property conflicts reject file + * for the property conflicts represented by @a conflict. + * + * This function exists for backwards compatibility only and should not be + * used in new code. + * + * @since New in 1.10. + */ +const char * +svn_client_conflict_prop_get_reject_abspath( + const svn_client_conflict_t *conflict); -#define svn_client_conflict_get_merged_file(conflict) \ - ((conflict)->merged_file) +/** + * Return the set of property values involved in the property conflict + * 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(). + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_prop_get_propvals(const svn_string_t **base_propval, + const svn_string_t **working_propval, + const svn_string_t **incoming_old_propval, + const svn_string_t **incoming_new_propval, + const svn_client_conflict_t *conflict, + apr_pool_t *result_pool); -#define svn_client_conflict_get_src_left_version(conflict) \ - ((conflict)->src_left_version) +/** + * Resolve a property @a conflict in property @a propname using resolution + * option @a option. To resolve all properties to the same option at once, + * set @a propname to the empty string "". + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict, + const char *propname, + svn_client_conflict_option_t *option, + apr_pool_t *scratch_pool); +/** + * If the provided @a option_id is the ID of an option which resolves + * @a conflict, resolve the property conflict in property @a propname + * using that option. Else, return an error. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_prop_resolve_by_id( + svn_client_conflict_t *conflict, + const char *propname, + svn_client_conflict_option_id_t option_id, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_src_right_version(conflict) \ - ((conflict)->src_right_version) +/** + * Return the ID of the option this property @a conflict in property + * @a propname has been resolved to. + * If the conflict has not been resolved yet, then return + * @c svn_client_conflict_option_undefined. + * + * @since New in 1.10. + */ +svn_client_conflict_option_id_t +svn_client_conflict_prop_get_resolution(const svn_client_conflict_t *conflict, + const char *propname); -#define svn_client_conflict_get_prop_reject_abspath(conflict) \ - ((conflict)->prop_reject_abspath) +/** + * Return the MIME-type of the working version of the text-conflicted file + * described by @a conflict. + * + * ### Really needed? What about base/incoming_old/incoming_new values? + * @since: New in 1.10. + */ +const char * +svn_client_conflict_text_get_mime_type(const svn_client_conflict_t *conflict); + +/** + * 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. + */ +svn_error_t * +svn_client_conflict_text_get_contents(const char **base_abspath, + const char **working_abspath, + const char **incoming_old_abspath, + const char **incoming_new_abspath, + const svn_client_conflict_t *conflict, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_prop_value_working(conflict) \ - ((conflict)->prop_value_working) +/** + * Resolve a text @a conflict using resolution option @a option. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_text_resolve(svn_client_conflict_t *conflict, + svn_client_conflict_option_t *option, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_prop_value_incoming_old(conflict) \ - ((conflict)->prop_value_incoming_old) +/** + * If the provided @a option_id is the ID of an option which resolves + * @a conflict, resolve the text conflict using that option. + * Else, return an error. + * + * @since New in 1.10. + */ +svn_error_t * +svn_client_conflict_text_resolve_by_id( + svn_client_conflict_t *conflict, + svn_client_conflict_option_id_t option_id, + apr_pool_t *scratch_pool); -#define svn_client_conflict_get_prop_value_incoming_new(conflict) \ - ((conflict)->prop_value_incoming_new) +/** + * Return the ID of the option this text @a conflict has been resolved to. + * If the conflict has not been resolved yet, then return + * @c svn_client_conflict_option_undefined. + * + * @since New in 1.10. + */ +svn_client_conflict_option_id_t +svn_client_conflict_text_get_resolution(const svn_client_conflict_t *conflict); /** @} */ Modified: subversion/branches/reuse-ra-session/subversion/include/svn_error_codes.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_error_codes.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_error_codes.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_error_codes.h Fri Sep 11 15:51:30 2015 @@ -922,11 +922,6 @@ SVN_ERROR_START SVN_ERR_REPOS_CATEGORY_START + 10, "Repository upgrade is not supported") - /** @since New in 1.9. */ - SVN_ERRDEF(SVN_ERR_REPOS_VERIFY_FAILED, - SVN_ERR_REPOS_CATEGORY_START + 11, - "Repository verification failed") - /* generic RA errors */ SVN_ERRDEF(SVN_ERR_RA_ILLEGAL_URL, @@ -1497,6 +1492,11 @@ SVN_ERROR_START SVN_ERR_CL_CATEGORY_START + 11, "Failed processing one or more externals definitions") + /** @since New in 1.9. */ + SVN_ERRDEF(SVN_ERR_CL_REPOS_VERIFY_FAILED, + SVN_ERR_CL_CATEGORY_START + 12, + "Repository verification failed") + /* ra_svn errors */ SVN_ERRDEF(SVN_ERR_RA_SVN_CMD_ERR, Modified: subversion/branches/reuse-ra-session/subversion/include/svn_fs.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_fs.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_fs.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_fs.h Fri Sep 11 15:51:30 2015 @@ -2962,7 +2962,13 @@ typedef enum svn_fs_pack_notify_action_t /** packing of the shard revprops has completed @since New in 1.7. */ - svn_fs_pack_notify_end_revprop + svn_fs_pack_notify_end_revprop, + + /** pack has been a no-op for this repository. The next / future packable + shard will be given. If the shard is -1, then the repository does not + support packing at all. + @since New in 1.10. */ + svn_fs_pack_notify_noop } svn_fs_pack_notify_action_t; Modified: subversion/branches/reuse-ra-session/subversion/include/svn_io.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_io.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_io.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_io.h Fri Sep 11 15:51:30 2015 @@ -1157,6 +1157,18 @@ svn_stream_t * svn_stream_from_string(const svn_string_t *str, apr_pool_t *pool); +/** Return a generic read-only stream that forwards data from @a inner but + * uses buffering for efficiency. Allocate the stream in @a result_pool. + * + * @note The returned stream has no support for writing nor mark and seek + * even if @a inner does support those functions. + * + * @since New in 1.10. + */ +svn_stream_t * +svn_stream_wrap_buffered_read(svn_stream_t *inner, + apr_pool_t *result_pool); + /** Return a generic stream which implements buffered reads and writes. * The stream will preferentially store data in-memory, but may use * disk storage as backup if the amount of data is large. @@ -2344,9 +2356,26 @@ svn_io_stat(apr_finfo_t *finfo, * @a from_path to a new path @a to_path within the same filesystem. * In some cases, an existing node at @a to_path will be overwritten. * - * A wrapper for apr_file_rename(). @a from_path and @a to_path are - * utf8-encoded. + * @a from_path and @a to_path are utf8-encoded. If @a flush_to_disk + * is non-zero, do not return until the node has actually been moved on + * the disk. + * + * @note The flush to disk operation can be very expensive on systems + * that implement flushing on all IO layers, like Windows. Please use + * @a flush_to_disk flag only for critical data. + * + * @since New in 1.10. + */ +svn_error_t * +svn_io_file_rename2(const char *from_path, const char *to_path, + svn_boolean_t flush_to_disk, apr_pool_t *pool); + +/** Similar to svn_io_file_rename2(), but with @a flush_to_disk set + * to @c FALSE. + * + * @deprecated Provided for backward compatibility with the 1.9 API */ +SVN_DEPRECATED svn_error_t * svn_io_file_rename(const char *from_path, const char *to_path, Modified: subversion/branches/reuse-ra-session/subversion/include/svn_ra_svn.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_ra_svn.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_ra_svn.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_ra_svn.h Fri Sep 11 15:51:30 2015 @@ -141,16 +141,21 @@ typedef struct svn_ra_svn_cmd_entry_t svn_boolean_t terminate; } svn_ra_svn_cmd_entry_t; +/** Data types defined by the svn:// protocol. */ +typedef enum +{ + SVN_RA_SVN_NUMBER, + SVN_RA_SVN_STRING, + SVN_RA_SVN_WORD, + SVN_RA_SVN_LIST +} svn_ra_svn_item_kind_t; + /** Memory representation of an on-the-wire data item. */ typedef struct svn_ra_svn_item_t { /** Variant indicator. */ - enum { - SVN_RA_SVN_NUMBER, - SVN_RA_SVN_STRING, - SVN_RA_SVN_WORD, - SVN_RA_SVN_LIST - } kind; + svn_ra_svn_item_kind_t kind; + /** Variant data. */ union { apr_uint64_t number; Modified: subversion/branches/reuse-ra-session/subversion/include/svn_repos.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_repos.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_repos.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_repos.h Fri Sep 11 15:51:30 2015 @@ -234,9 +234,6 @@ typedef enum svn_repos_notify_action_t /** The structure of a revision is being verified. @since New in 1.8. */ svn_repos_notify_verify_rev_structure, - /** A revision is found with corruption/errors. @since New in 1.9. */ - svn_repos_notify_failure, - /** A revprop shard got packed. @since New in 1.9. */ svn_repos_notify_pack_revprops, @@ -247,7 +244,13 @@ typedef enum svn_repos_notify_action_t svn_repos_notify_format_bumped, /** A revision range was copied. @since New in 1.9. */ - svn_repos_notify_hotcopy_rev_range + svn_repos_notify_hotcopy_rev_range, + + /** The repository pack did not do anything. @since New in 1.10. */ + svn_repos_notify_pack_noop, + + /** The revision properties got set. @since New in 1.10. */ + svn_repos_notify_load_revprop_set } svn_repos_notify_action_t; /** The type of warning occurring. @@ -348,11 +351,6 @@ typedef struct svn_repos_notify_t /** For #svn_repos_notify_load_node_start, the path of the node. */ const char *path; - /** For #svn_repos_notify_failure, this error chain indicates what - went wrong during verification. - @since New in 1.9. */ - svn_error_t *err; - /** For #svn_repos_notify_hotcopy_rev_range, the start of the copied revision range. @since New in 1.9. */ @@ -2825,6 +2823,28 @@ enum svn_repos_load_uuid svn_repos_load_uuid_force }; +/** Callback type for use with svn_repos_verify_fs3(). @a revision + * and @a verify_err are the details of a single verification failure + * that occurred during the svn_repos_verify_fs3() call. @a baton is + * the same baton given to svn_repos_verify_fs3(). @a scratch_pool is + * provided for the convenience of the implementor, who should not + * expect it to live longer than a single callback call. + * + * @a verify_err will be cleared and becomes invalid after the callback + * returns, use svn_error_dup() to preserve the error. If a callback uses + * @a verify_err as the return value or as a part of the return value, it + * should also call svn_error_dup() for @a verify_err. Implementors of this + * callback are forbidden to call svn_error_clear() for @a verify_err. + * + * @see svn_repos_verify_fs3 + * + * @since New in 1.9. + */ +typedef svn_error_t *(*svn_repos_verify_callback_t)(void *baton, + svn_revnum_t revision, + svn_error_t *verify_err, + apr_pool_t *scratch_pool); + /** * Verify the contents of the file system in @a repos. * @@ -2835,9 +2855,6 @@ enum svn_repos_load_uuid * range, then also verify "global invariants" of the repository, as * described in svn_fs_verify(). * - * When a failure is found, if @a keep_going is @c TRUE then continue - * verification from the next revision, otherwise stop. - * * If @a check_normalization is @c TRUE, report any name collisions * within the same directory or svn:mergeinfo property where the names * differ only in character representation, but are otherwise @@ -2848,25 +2865,31 @@ enum svn_repos_load_uuid * file context reconstruction and verification. For FSFS format 7+ and * FSX, this allows for a very fast check against external corruption. * + * If @a verify_callback is not @c NULL, call it with @a verify_baton upon + * receiving an FS-specific structure failure or a revision verification + * failure. Set @c revision callback argument to #SVN_INVALID_REVNUM or + * to the revision number respectively. Set @c verify_err to svn_error_t + * describing the reason of the failure. @c verify_err will be cleared + * after the callback returns, use svn_error_dup() to preserve the error. + * If @a verify_callback returns an error different from #SVN_NO_ERROR, + * stop verifying the repository and immediately return the error from + * @a verify_callback. + * + * If @a verify_callback is @c NULL, this function returns the first + * encountered verification error or #SVN_NO_ERROR if there were no failures + * during the verification. Errors that prevent the verification process + * from continuing, such as #SVN_ERR_CANCELLED, are returned immediately + * and do not trigger an invocation of @a verify_callback. + * * If @a notify_func is not null, then call it with @a notify_baton and * with a notification structure in which the fields are set as follows. - * (For a warning or error notification that does not apply to a specific - * revision, the revision number is #SVN_INVALID_REVNUM.) + * (For a warning that does not apply to a specific revision, the revision + * number is #SVN_INVALID_REVNUM.) * * For each FS-specific structure warning: * @c action = svn_repos_notify_verify_rev_structure * @c revision = the revision or #SVN_INVALID_REVNUM * - * For a FS-specific structure failure: - * @c action = #svn_repos_notify_failure - * @c revision = #SVN_INVALID_REVNUM - * @c err = the corresponding error chain - * - * For each revision verification failure: - * @c action = #svn_repos_notify_failure - * @c revision = the revision - * @c err = the corresponding error chain - * * For each revision verification warning: * @c action = #svn_repos_notify_warning * @c warning and @c warning_str fields set accordingly @@ -2888,10 +2911,7 @@ enum svn_repos_load_uuid * * Use @a scratch_pool for temporary allocation. * - * Return an error if there were any failures during verification, or - * #SVN_NO_ERROR if there were no failures. A failure means an event that, - * if a notification callback were provided, would send a notification - * with @c action = #svn_repos_notify_failure. + * @see svn_repos_verify_callback_t * * @since New in 1.9. */ @@ -2899,18 +2919,20 @@ svn_error_t * svn_repos_verify_fs3(svn_repos_t *repos, svn_revnum_t start_rev, svn_revnum_t end_rev, - svn_boolean_t keep_going, svn_boolean_t check_normalization, svn_boolean_t metadata_only, svn_repos_notify_func_t notify_func, void *notify_baton, + svn_repos_verify_callback_t verify_callback, + void *verify_baton, svn_cancel_func_t cancel, void *cancel_baton, apr_pool_t *scratch_pool); /** - * Like svn_repos_verify_fs3(), but with @a keep_going, - * @a check_normalization and @a metadata_only set to @c FALSE. + * Like svn_repos_verify_fs3(), but with @a verify_callback and + * @a verify_baton set to @c NULL and with @a check_normalization + * and @a metadata_only set to @c FALSE. * * @since New in 1.7. * @deprecated Provided for backward compatibility with the 1.8 API. @@ -2967,6 +2989,12 @@ svn_repos_verify_fs(svn_repos_t *repos, * be done with full plain text. A dump with @a use_deltas set cannot * be loaded by Subversion 1.0.x. * + * If @a include_revprops is @c TRUE, output the revision properties as + * well, otherwise omit them. + * + * If @a include_changes is @c TRUE, output the revision contents, i.e. + * tree and node changes. + * * If @a notify_func is not null, then call it with @a notify_baton and * with a notification structure in which the fields are set as follows. * (For a warning or error notification that does not apply to a specific @@ -2998,8 +3026,31 @@ svn_repos_verify_fs(svn_repos_t *repos, * * Use @a scratch_pool for temporary allocation. * + * @since New in 1.10. + */ +svn_error_t * +svn_repos_dump_fs4(svn_repos_t *repos, + svn_stream_t *stream, + svn_revnum_t start_rev, + svn_revnum_t end_rev, + svn_boolean_t incremental, + svn_boolean_t use_deltas, + svn_boolean_t include_revprops, + svn_boolean_t include_changes, + svn_repos_notify_func_t notify_func, + void *notify_baton, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *pool); + +/** + * Similar to svn_repos_dump_fs4(), but with @a include_revprops and + * @a include_changes both set to @c TRUE. + * * @since New in 1.7. + * @deprecated Provided for backward compatibility with the 1.9 API. */ +SVN_DEPRECATED svn_error_t * svn_repos_dump_fs3(svn_repos_t *repos, svn_stream_t *dumpstream, @@ -3203,6 +3254,52 @@ svn_repos_load_fs(svn_repos_t *repos, void *cancel_baton, apr_pool_t *pool); +/** + * Read and parse dumpfile-formatted @a dumpstream, extracting the + * revision properties from it and apply them to the already-open + * @a repos. Use @a scratch_pool for temporary allocations. + * + * If, after filtering by the @a start_rev and @a end_rev, the dumpstream + * contains revisions missing in @a repos, an error will be thrown. + * + * @a start_rev and @a end_rev act as filters, the lower and upper + * (inclusive) range values of revisions in @a dumpstream which will + * be loaded. Either both of these values are #SVN_INVALID_REVNUM (in + * which case no revision-based filtering occurs at all), or both are + * valid revisions (where @a start_rev is older than or equivalent to + * @a end_rev). + * + * If @a validate_props is set, then validate Subversion revision + * properties (those in the svn: namespace) against established + * rules for those things. + * + * If @a ignore_dates is set, ignore any revision datestamps found in + * @a dumpstream, keeping whatever timestamps the revisions currently + * have. + * + * If non-NULL, use @a notify_func and @a notify_baton to send notification + * of events to the caller. + * + * If @a cancel_func is not @c NULL, it is called periodically with + * @a cancel_baton as argument to see if the client wishes to cancel + * the load. + * + * @remark No repository hooks will be triggered. + * + * @since New in 1.10. + */ +svn_error_t * +svn_repos_load_fs_revprops(svn_repos_t *repos, + svn_stream_t *dumpstream, + svn_revnum_t start_rev, + svn_revnum_t end_rev, + svn_boolean_t validate_props, + svn_boolean_t ignore_dates, + svn_repos_notify_func_t notify_func, + void *notify_baton, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *scratch_pool); /** * A vtable that is driven by svn_repos_parse_dumpstream3(). @@ -3346,6 +3443,9 @@ typedef struct svn_repos_parse_fns3_t * could stop reading entirely after the youngest required rev. * * @since New in 1.8. + + * @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 * svn_repos_parse_dumpstream3(svn_stream_t *stream, @@ -3405,7 +3505,7 @@ svn_repos_parse_dumpstream3(svn_stream_t * @since New in 1.9. */ svn_error_t * -svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **callbacks, +svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **parser, void **parse_baton, svn_repos_t *repos, svn_revnum_t start_rev, Modified: subversion/branches/reuse-ra-session/subversion/include/svn_string.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_string.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_string.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_string.h Fri Sep 11 15:51:30 2015 @@ -541,7 +541,17 @@ svn_cstring_casecmp(const char *str1, co * Assume that the number is represented in base @a base. * Raise an error if conversion fails (e.g. due to overflow), or if the * converted number is smaller than @a minval or larger than @a maxval. + * * Leading whitespace in @a str is skipped in a locale-dependent way. + * After that, the string may contain an optional '+' (positive, default) + * or '-' (negative) character, followed by an optional '0x' prefix if + * @a base is 0 or 16, followed by numeric digits appropriate for the base. + * If there are any more characters after the numeric digits, an error is + * returned. + * + * If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal, + * else a leading '0' means octal (implemented, though not documented, in + * apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten. * * @since New in 1.7. */ @@ -554,7 +564,8 @@ svn_cstring_strtoi64(apr_int64_t *n, con * Parse the C string @a str into a 64 bit number, and return it in @a *n. * Assume that the number is represented in base 10. * Raise an error if conversion fails (e.g. due to overflow). - * Leading whitespace in @a str is skipped in a locale-dependent way. + * + * The behaviour otherwise is as described for svn_cstring_strtoi64(). * * @since New in 1.7. */ @@ -565,7 +576,8 @@ svn_cstring_atoi64(apr_int64_t *n, const * Parse the C string @a str into a 32 bit number, and return it in @a *n. * Assume that the number is represented in base 10. * Raise an error if conversion fails (e.g. due to overflow). - * Leading whitespace in @a str is skipped in a locale-dependent way. + * + * The behaviour otherwise is as described for svn_cstring_strtoi64(). * * @since New in 1.7. */ @@ -577,7 +589,21 @@ svn_cstring_atoi(int *n, const char *str * it in @a *n. Assume that the number is represented in base @a base. * Raise an error if conversion fails (e.g. due to overflow), or if the * converted number is smaller than @a minval or larger than @a maxval. + * * Leading whitespace in @a str is skipped in a locale-dependent way. + * After that, the string may contain an optional '+' (positive, default) + * or '-' (negative) character, followed by an optional '0x' prefix if + * @a base is 0 or 16, followed by numeric digits appropriate for the base. + * If there are any more characters after the numeric digits, an error is + * returned. + * + * If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal, + * else a leading '0' means octal (implemented, though not documented, in + * apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten. + * + * @warning The implementation used since version 1.7 returns an error + * if the parsed number is greater than APR_INT64_MAX, even if it is not + * greater than @a maxval. * * @since New in 1.7. */ @@ -590,7 +616,9 @@ svn_cstring_strtoui64(apr_uint64_t *n, c * Parse the C string @a str into an unsigned 64 bit number, and return * it in @a *n. Assume that the number is represented in base 10. * Raise an error if conversion fails (e.g. due to overflow). - * Leading whitespace in @a str is skipped in a locale-dependent way. + * + * The behaviour otherwise is as described for svn_cstring_strtoui64(), + * including the upper limit of APR_INT64_MAX. * * @since New in 1.7. */ @@ -601,7 +629,9 @@ svn_cstring_atoui64(apr_uint64_t *n, con * Parse the C string @a str into an unsigned 32 bit number, and return * it in @a *n. Assume that the number is represented in base 10. * Raise an error if conversion fails (e.g. due to overflow). - * Leading whitespace in @a str is skipped in a locale-dependent way. + * + * The behaviour otherwise is as described for svn_cstring_strtoui64(), + * including the upper limit of APR_INT64_MAX. * * @since New in 1.7. */ Modified: subversion/branches/reuse-ra-session/subversion/include/svn_user.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_user.h?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/include/svn_user.h (original) +++ subversion/branches/reuse-ra-session/subversion/include/svn_user.h Fri Sep 11 15:51:30 2015 @@ -45,6 +45,9 @@ svn_user_get_name(apr_pool_t *pool); * any necessary allocation, returning NULL on error. * * @since New in 1.4. + * @since 1.10 returns a canonical path. Earlier versions returned a + * non-canonical path if the operating system reported a non-canonical + * path such as "/home/user/" or "//home/user". */ const char * svn_user_get_homedir(apr_pool_t *pool); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_auth_kwallet/kwallet.cpp URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_auth_kwallet/kwallet.cpp?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_auth_kwallet/kwallet.cpp (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_auth_kwallet/kwallet.cpp Fri Sep 11 15:51:30 2015 @@ -47,6 +47,7 @@ #include "svn_auth.h" #include "svn_config.h" #include "svn_error.h" +#include "svn_hash.h" #include "svn_io.h" #include "svn_pools.h" #include "svn_string.h" @@ -135,34 +136,36 @@ get_wid(void) return wid; } +/* Forward definition */ +static apr_status_t +kwallet_terminate(void *data); + static KWallet::Wallet * get_wallet(QString wallet_name, apr_hash_t *parameters) { KWallet::Wallet *wallet = - static_cast<KWallet::Wallet *> (apr_hash_get(parameters, - "kwallet-wallet", - APR_HASH_KEY_STRING)); - if (! wallet && ! apr_hash_get(parameters, - "kwallet-opening-failed", - APR_HASH_KEY_STRING)) + static_cast<KWallet::Wallet *> (svn_hash_gets(parameters, + "kwallet-wallet")); + if (! wallet && ! svn_hash_gets(parameters, "kwallet-opening-failed")) { wallet = KWallet::Wallet::openWallet(wallet_name, get_wid(), KWallet::Wallet::Synchronous); - } - if (wallet) - { - apr_hash_set(parameters, - "kwallet-wallet", - APR_HASH_KEY_STRING, - wallet); - } - else - { - apr_hash_set(parameters, - "kwallet-opening-failed", - APR_HASH_KEY_STRING, - ""); + + if (wallet) + { + svn_hash_sets(parameters, "kwallet-wallet", wallet); + + apr_pool_cleanup_register(apr_hash_pool_get(parameters), + parameters, kwallet_terminate, + apr_pool_cleanup_null); + + svn_hash_sets(parameters, "kwallet-initialized", ""); + } + else + { + svn_hash_sets(parameters, "kwallet-opening-failed", ""); + } } return wallet; } @@ -171,14 +174,12 @@ static apr_status_t kwallet_terminate(void *data) { apr_hash_t *parameters = static_cast<apr_hash_t *> (data); - if (apr_hash_get(parameters, "kwallet-initialized", APR_HASH_KEY_STRING)) + if (svn_hash_gets(parameters, "kwallet-initialized")) { KWallet::Wallet *wallet = get_wallet(NULL, parameters); delete wallet; - apr_hash_set(parameters, - "kwallet-initialized", - APR_HASH_KEY_STRING, - NULL); + svn_hash_sets(parameters, "kwallet-wallet", NULL); + svn_hash_sets(parameters, "kwallet-initialized", NULL); } return APR_SUCCESS; } @@ -236,10 +237,6 @@ kwallet_password_get(svn_boolean_t *done KWallet::Wallet *wallet = get_wallet(wallet_name, parameters); if (wallet) { - apr_hash_set(parameters, - "kwallet-initialized", - APR_HASH_KEY_STRING, - ""); if (wallet->setFolder(folder)) { QString q_password; @@ -254,9 +251,6 @@ kwallet_password_get(svn_boolean_t *done } } - apr_pool_cleanup_register(pool, parameters, kwallet_terminate, - apr_pool_cleanup_null); - return SVN_NO_ERROR; } @@ -310,10 +304,6 @@ kwallet_password_set(svn_boolean_t *done KWallet::Wallet *wallet = get_wallet(wallet_name, parameters); if (wallet) { - apr_hash_set(parameters, - "kwallet-initialized", - APR_HASH_KEY_STRING, - ""); if (! wallet->hasFolder(folder)) { wallet->createFolder(folder); @@ -329,9 +319,6 @@ kwallet_password_set(svn_boolean_t *done } } - apr_pool_cleanup_register(pool, parameters, kwallet_terminate, - apr_pool_cleanup_null); - return SVN_NO_ERROR; } Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/copy.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/copy.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/copy.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/copy.c Fri Sep 11 15:51:30 2015 @@ -2442,7 +2442,7 @@ repos_to_wc_copy_single(svn_boolean_t *t pool)); /* Move the temporary disk tree into place. */ - SVN_ERR(svn_io_file_rename(tmp_abspath, dst_abspath, pool)); + SVN_ERR(svn_io_file_rename2(tmp_abspath, dst_abspath, FALSE, pool)); } else { @@ -2571,7 +2571,7 @@ repos_to_wc_copy_single(svn_boolean_t *t static svn_error_t * repos_to_wc_copy_locked(svn_boolean_t *timestamp_sleep, const apr_array_header_t *copy_pairs, - const char *top_dst_path, + const char *top_dst_abspath, svn_boolean_t ignore_externals, svn_boolean_t pin_externals, const apr_hash_t *externals_to_pin, @@ -2591,39 +2591,25 @@ repos_to_wc_copy_locked(svn_boolean_t *t /* Decide whether the two repositories are the same or not. */ { - svn_error_t *src_err, *dst_err; - const char *parent; const char *parent_abspath; const char *src_uuid, *dst_uuid; /* Get the repository uuid of SRC_URL */ - src_err = svn_ra_get_uuid2(ra_session, &src_uuid, iterpool); - if (src_err && src_err->apr_err != SVN_ERR_RA_NO_REPOS_UUID) - return svn_error_trace(src_err); + SVN_ERR(svn_ra_get_uuid2(ra_session, &src_uuid, iterpool)); /* Get repository uuid of dst's parent directory, since dst may not exist. ### TODO: we should probably walk up the wc here, in case the parent dir has an imaginary URL. */ if (copy_pairs->nelts == 1) - parent = svn_dirent_dirname(top_dst_path, scratch_pool); + parent_abspath = svn_dirent_dirname(top_dst_abspath, scratch_pool); else - parent = top_dst_path; + parent_abspath = top_dst_abspath; - SVN_ERR(svn_dirent_get_absolute(&parent_abspath, parent, scratch_pool)); - dst_err = svn_client_get_repos_root(NULL /* root_url */, &dst_uuid, - parent_abspath, ctx, - iterpool, iterpool); - if (dst_err && dst_err->apr_err != SVN_ERR_RA_NO_REPOS_UUID) - return dst_err; - - /* If either of the UUIDs are nonexistent, then at least one of - the repositories must be very old. Rather than punish the - user, just assume the repositories are different, so no - copy-history is attempted. */ - if (src_err || dst_err || (! src_uuid) || (! dst_uuid)) - same_repositories = FALSE; - else - same_repositories = (strcmp(src_uuid, dst_uuid) == 0); + SVN_ERR(svn_client_get_repos_root(NULL /* root_url */, &dst_uuid, + parent_abspath, ctx, + iterpool, iterpool)); + /* ### Also check repos_root_url? */ + same_repositories = (strcmp(src_uuid, dst_uuid) == 0); } /* Perform the move for each of the copy_pairs. */ @@ -2659,7 +2645,7 @@ repos_to_wc_copy(svn_boolean_t *timestam apr_pool_t *pool) { svn_ra_session_t *ra_session; - const char *top_src_url, *top_dst_path; + const char *top_src_url, *top_dst_abspath; apr_pool_t *iterpool = svn_pool_create(pool); const char *lock_abspath; int i; @@ -2684,13 +2670,13 @@ repos_to_wc_copy(svn_boolean_t *timestam pair->src_abspath_or_url = apr_pstrdup(pool, src); } - SVN_ERR(get_copy_pair_ancestors(copy_pairs, &top_src_url, &top_dst_path, + SVN_ERR(get_copy_pair_ancestors(copy_pairs, &top_src_url, &top_dst_abspath, NULL, pool)); - lock_abspath = top_dst_path; + lock_abspath = top_dst_abspath; if (copy_pairs->nelts == 1) { top_src_url = svn_uri_dirname(top_src_url, pool); - lock_abspath = svn_dirent_dirname(top_dst_path, pool); + lock_abspath = svn_dirent_dirname(top_dst_abspath, pool); } /* Open a repository session to the longest common src ancestor. We do not @@ -2762,7 +2748,7 @@ repos_to_wc_copy(svn_boolean_t *timestam SVN_WC__CALL_WITH_WRITE_LOCK( repos_to_wc_copy_locked(timestamp_sleep, - copy_pairs, top_dst_path, ignore_externals, + copy_pairs, top_dst_abspath, ignore_externals, pin_externals, externals_to_pin, ra_session, ctx, pool), ctx->wc_ctx, lock_abspath, FALSE, pool); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/diff.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/diff.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/diff.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/diff.c Fri Sep 11 15:51:30 2015 @@ -259,7 +259,7 @@ print_git_diff_header_added(svn_stream_t "diff --git a/%s b/%s%s", path1, path2, APR_EOL_STR)); SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool, - "new file mode 10644" APR_EOL_STR)); + "new file mode 100644" APR_EOL_STR)); return SVN_NO_ERROR; } @@ -275,7 +275,7 @@ print_git_diff_header_deleted(svn_stream "diff --git a/%s b/%s%s", path1, path2, APR_EOL_STR)); SVN_ERR(svn_stream_printf_from_utf8(os, header_encoding, result_pool, - "deleted file mode 10644" + "deleted file mode 100644" APR_EOL_STR)); return SVN_NO_ERROR; } Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/export.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/export.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/export.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/export.c Fri Sep 11 15:51:30 2015 @@ -432,7 +432,7 @@ export_node(void *baton, scratch_pool)); /* Now that dst_tmp contains the translated data, do the atomic rename. */ - SVN_ERR(svn_io_file_rename(dst_tmp, to_abspath, scratch_pool)); + SVN_ERR(svn_io_file_rename2(dst_tmp, to_abspath, FALSE, scratch_pool)); if (eib->notify_func) { @@ -816,7 +816,7 @@ close_file(void *file_baton, if ((! fb->eol_style_val) && (! fb->keywords_val) && (! fb->special)) { - SVN_ERR(svn_io_file_rename(fb->tmppath, fb->path, pool)); + SVN_ERR(svn_io_file_rename2(fb->tmppath, fb->path, FALSE, pool)); } else { @@ -1035,7 +1035,7 @@ add_file_ev2(void *baton, eb->cancel_baton, scratch_pool)); /* Move the file into place. */ - SVN_ERR(svn_io_file_rename(tmppath, full_path, scratch_pool)); + SVN_ERR(svn_io_file_rename2(tmppath, full_path, FALSE, scratch_pool)); } if (executable_val) Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/externals.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/externals.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/externals.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/externals.c Fri Sep 11 15:51:30 2015 @@ -120,7 +120,7 @@ relegate_dir_external(svn_wc_context_t * /* And if it is no longer a working copy, we should just rename it */ - err = svn_io_file_rename(local_abspath, new_path, scratch_pool); + err = svn_io_file_rename2(local_abspath, new_path, FALSE, scratch_pool); } /* ### TODO: We should notify the user about the rename */ Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c Fri Sep 11 15:51:30 2015 @@ -2794,12 +2794,6 @@ merge_dir_opened(void **new_dir_baton, db->tree_conflict_reason = added ? svn_wc_conflict_reason_added : svn_wc_conflict_reason_obstructed; - - if ((merge_b->merge_source.ancestral || merge_b->reintegrate_merge) - && !(pdb && pdb->shadowed)) - { - store_path(merge_b->skipped_abspaths, local_abspath); - } } } @@ -11717,6 +11711,7 @@ merge_reintegrate_locked(conflict_report if (! source) { + *conflict_report = NULL; return SVN_NO_ERROR; } @@ -12598,12 +12593,19 @@ client_find_automatic_merge(automatic_me allow_switched_subtrees, ctx, result_pool, scratch_pool)); + if (!s_t->target->loc.url) + return svn_error_createf(SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL, + _("Can't perform automatic merge into '%s' " + "because it is locally added and therefore " + "not related to the merge source"), + svn_dirent_local_style(target_abspath, + scratch_pool)); + /* Open RA sessions to the source and target trees. */ SVN_ERR(svn_client_open_ra_session2(&s_t->target_ra_session, s_t->target->loc.url, s_t->target->abspath, ctx, result_pool, scratch_pool)); - /* ### check for null URL (i.e. added path) here, like in reintegrate? */ SVN_ERR(svn_client__ra_session_from_path2( &s_t->source_ra_session, &s_t->source, source_path_or_url, NULL, source_revision, source_revision, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c Fri Sep 11 15:51:30 2015 @@ -976,19 +976,19 @@ svn_client__mtcc_check_path(svn_node_kin if (op->kind == OP_OPEN_DIR || op->kind == OP_ADD_DIR) op->performed_stat = TRUE; else if (op->kind == OP_OPEN_FILE || op->kind == OP_ADD_FILE) - return svn_error_createf(SVN_ERR_FS_NOT_DIRECTORY, NULL, - _("Can't perform directory operation " - "on '%s' as it is not a directory"), + return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL, + _("Can't perform file operation " + "on '%s' as it is not a file"), relpath); } - else if (op && *kind == svn_node_dir) + else if (op && *kind == svn_node_file) { if (op->kind == OP_OPEN_FILE || op->kind == OP_ADD_FILE) op->performed_stat = TRUE; else if (op->kind == OP_OPEN_DIR || op->kind == OP_ADD_DIR) - return svn_error_createf(SVN_ERR_FS_NOT_FILE, NULL, - _("Can't perform file operation " - "on '%s' as it is not a file"), + return svn_error_createf(SVN_ERR_FS_NOT_DIRECTORY, NULL, + _("Can't perform directory operation " + "on '%s' as it is not a directory"), relpath); } else if (op && (op->kind == OP_OPEN_DIR || op->kind == OP_OPEN_FILE)) Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c Fri Sep 11 15:51:30 2015 @@ -819,22 +819,9 @@ write_file(void *baton, const char *buf, return SVN_NO_ERROR; } -/* Handling symbolic links: - * - * In Subversion, symlinks can be represented on disk in two distinct ways. - * On systems which support symlinks, a symlink is created on disk. - * On systems which do not support symlink, a file is created on disk - * which contains the "normal form" of the symlink, which looks like: - * link TARGET - * where TARGET is the file the symlink points to. - * - * When reading symlinks (i.e. the link itself, not the file the symlink - * is pointing to) through the svn_subst_create_specialfile() function - * into a buffer, the buffer always contains the "normal form" of the symlink. - * Due to this representation symlinks always contain a single line of text. - * - * The functions below are needed to deal with the case where a patch - * wants to change the TARGET that a symlink points to. +/* Symlinks appear in patches in their repository normal form, abstracted by + * the svn_subst_* module. The functions below enable patches to change the + * targets of symlinks. */ /* Baton for the (readline|tell|seek|write)_symlink functions. */ @@ -870,10 +857,12 @@ readline_symlink(void *baton, svn_string } else { - svn_string_t *dest; + svn_stream_t *stream; + const apr_size_t len_hint = 64; /* arbitrary */ - SVN_ERR(svn_io_read_link(&dest, sb->local_abspath, scratch_pool)); - *line = svn_stringbuf_createf(result_pool, "link %s", dest->data); + SVN_ERR(svn_subst_read_specialfile(&stream, sb->local_abspath, + scratch_pool, scratch_pool)); + SVN_ERR(svn_stringbuf_from_stream(line, stream, len_hint, result_pool)); sb->at_eof = TRUE; } @@ -910,22 +899,17 @@ write_symlink(void *baton, const char *b apr_pool_t *scratch_pool) { const char *target_abspath = baton; - const char *new_name; - const char *sym_link = apr_pstrndup(scratch_pool, buf, len); - - if (strncmp(sym_link, "link ", 5) != 0) - return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL, - _("Invalid link representation")); - - sym_link += 5; /* Skip "link " */ /* We assume the entire symlink is written at once, as the patch format is line based */ - SVN_ERR(svn_io_create_unique_link(&new_name, target_abspath, sym_link, - ".tmp", scratch_pool)); - - SVN_ERR(svn_io_file_rename(new_name, target_abspath, scratch_pool)); + { + svn_stream_t *stream; + SVN_ERR(svn_subst_create_specialfile(&stream, target_abspath, + scratch_pool, scratch_pool)); + SVN_ERR(svn_stream_write(stream, buf, &len)); + SVN_ERR(svn_stream_close(stream)); + } return SVN_NO_ERROR; } Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c?rev=1702504&r1=1702503&r2=1702504&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c Fri Sep 11 15:51:30 2015 @@ -729,7 +729,7 @@ repos_locations(const char **start_url, /* We'd better have all the paths we were looking for! */ if (start_url) { - start_path = apr_hash_get(rev_locs, &start_revnum, sizeof(svn_revnum_t)); + start_path = apr_hash_get(rev_locs, &start_revnum, sizeof(start_revnum)); if (! start_path) return svn_error_createf (SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL, @@ -741,7 +741,7 @@ repos_locations(const char **start_url, if (end_url) { - end_path = apr_hash_get(rev_locs, &end_revnum, sizeof(svn_revnum_t)); + end_path = apr_hash_get(rev_locs, &end_revnum, sizeof(end_revnum)); if (! end_path) return svn_error_createf (SVN_ERR_CLIENT_UNRELATED_RESOURCES, NULL,
