You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2016/10/11 09:11:54 UTC
svn commit: r1764214 [3/21] - in /subversion/branches/ra-git: ./ build/
build/ac-macros/ build/generator/ build/win32/ contrib/client-side/
contrib/client-side/svnmerge/ contrib/hook-scripts/ contrib/server-side/
contrib/server-side/fsfsfixer/fixer/ co...
Modified: subversion/branches/ra-git/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/private/svn_wc_private.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/ra-git/subversion/include/private/svn_wc_private.h Tue Oct 11 09:11:50 2016
@@ -1748,6 +1748,195 @@ 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
+ * svn_wc__acquire_write_lock_for_resolve() first.
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_wc__conflict_text_mark_resolved(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_wc_conflict_choice_t choice,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ 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.
+ *
+ * The working copy must already be locked for resolving, e.g. by calling
+ * svn_wc__acquire_write_lock_for_resolve() first.
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_wc__conflict_prop_mark_resolved(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const char *propname,
+ svn_wc_conflict_choice_t choice,
+ const svn_string_t *merged_value,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/* Resolve a tree conflict where the victim at LOCAL_ABSPATH is a directory
+ * which was locally deleted, replaced or moved away, and which received an
+ * arbitrary incoming change during an update or switch operation.
+ *
+ * The conflict is resolved by accepting the current working copy state and
+ * breaking the 'moved-here' link for any files or directories which were
+ * moved out of the victim directory before the update operation.
+ * As a result, any such files or directories become copies (rather than moves)
+ * of content which the victim directory contained before it was updated.
+ *
+ * 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
+ * svn_wc_conflict_reason_moved_away
+ * incoming change: any
+ *
+ * The working copy must already be locked for resolving, e.g. by calling
+ * svn_wc__acquire_write_lock_for_resolve() first.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_wc__conflict_tree_update_break_moved_away(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+
+/* Resolve a tree conflict where the victim at LOCAL_ABSPATH is a directory
+ * which was locally deleted or replaced, and which received an edit (some
+ * change inside the directory, or a change to the direcotory's properties)
+ * during an update or switch operation.
+ *
+ * The conflict is resolved by keeping the victim deleted, and propagating
+ * its tree conflict to any children which were moved out of the directory
+ * before the update operation.
+ * As a result, any such files or directories become victims of the tree
+ * conflict as well and must be resolved independently.
+ * Additionally, LOCAL_ABSPATH itself may become the victim of a different
+ * tree conflict as a result of resolving the existing tree conflict.
+ *
+ * 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
+ * incoming change: svn_wc_conflict_action_edit
+ *
+ * If this conflict cannot be resolved because the conflict cannot be
+ * propagated to moved-away children, this function returns
+ * SVN_ERR_WC_OBSTRUCTED_UPDATE or SVN_ERR_WC_FOUND_CONFLICT.
+ * The caller should continue by resolving other conflicts and attempt to
+ * resolve this conflict again later.
+ *
+ * The working copy must already be locked for resolving, e.g. by calling
+ * svn_wc__acquire_write_lock_for_resolve() first.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_wc__conflict_tree_update_raise_moved_away(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/* Resolve a tree conflict where the victim at LOCAL_ABSPATH is a file or
+ * directory which was locally moved away, and which received an edit (some
+ * change inside the directory or file, or a change to properties) during an
+ * update or switch operation.
+ *
+ * The conflict is resolved by keeping the victim moved-away, and propagating
+ * the incoming edits to the victim's moved-to location.
+ *
+ * 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
+ *
+ * If this conflict cannot be resolved this function returns
+ * SVN_ERR_WC_OBSTRUCTED_UPDATE or SVN_ERR_WC_FOUND_CONFLICT.
+ * The caller should continue by resolving other conflicts and attempt to
+ * resolve this conflict again later.
+ *
+ * The working copy must already be locked for resolving, e.g. by calling
+ * svn_wc__acquire_write_lock_for_resolve() first.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_wc__conflict_tree_update_moved_away_node(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/* Merge local changes from a tree conflict victim of an incoming deletion
+ * to the specified DEST_ABSPATH. Both LOCAL_ABSPATH and DEST_ABSPATH must
+ * be directories.
+ *
+ * Assuming DEST_ABSPATH is the correct destination, this function allows
+ * local changes to "follow" incoming moves.
+ *
+ * @since New in 1.10. */
+svn_error_t *
+svn_wc__conflict_tree_merge_local_changes(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const char *dest_abspath,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/* Find nodes in the working copy which corresponds to the new location
+ * MOVED_TO_REPOS_RELPATH@REV of the tree conflict victim at VICTIM_ABSPATH.
+ * The nodes must be of the same node kind as VICTIM_NODE_KIND.
+ * If no such node can be found, set *POSSIBLE_TARGETS to an empty array.
+ *
+ * The nodes should be useful for conflict resolution, e.g. it should be
+ * possible to merge changes into these nodes to resolve an incoming-move
+ * tree conflict. But the exact criteria for selecting a node are left
+ * to the implementation of this function.
+ * Note that this function may not necessarily return a node which was
+ * actually moved. The only hard guarantee is that the node corresponds to
+ * the repository node MOVED_TO_REPOS_RELPATH@REV specified by the caller.
+ * In many cases, this will be a moved node if the caller's parameters are
+ * correct. Users should be able to perform a sanity check on the results
+ * returned from this function.
+ */
+svn_error_t *
+svn_wc__guess_incoming_move_target_nodes(apr_array_header_t **possible_targets,
+ svn_wc_context_t *wc_ctx,
+ const char *victim_abspath,
+ svn_node_kind_t victim_node_kind,
+ const char *moved_to_repos_relpath,
+ svn_revnum_t rev,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/**
* Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath
* for addition to the repository, remembering the history. Mark @a src_abspath
Modified: subversion/branches/ra-git/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_client.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_client.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_client.h Tue Oct 11 09:11:50 2016
@@ -4382,18 +4382,51 @@ typedef struct svn_client_conflict_optio
*/
typedef enum svn_client_conflict_option_id_t {
- /* These values intentionally mirror svn_wc_conflict_choice_t. */
+ /* Options for text and property conflicts.
+ * 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_text,
- svn_client_conflict_option_working_text,
+ svn_client_conflict_option_incoming_text, /* "theirs-full" */
+ svn_client_conflict_option_working_text, /* "mine-full" */
svn_client_conflict_option_incoming_text_where_conflicted,
svn_client_conflict_option_working_text_where_conflicted,
svn_client_conflict_option_merged_text,
- svn_client_conflict_option_unspecified
+ svn_client_conflict_option_unspecified,
/* Values derived from svn_wc_conflict_choice_t end here. */
+ /* Tree conflict resolution options start here. */
+
+ /* Accept current working copy state. */
+ svn_client_conflict_option_accept_current_wc_state,
+
+ /* Options for local move vs incoming edit on update. */
+ svn_client_conflict_option_update_move_destination,
+
+ /* Options for local delete/replace vs incoming edit on update. */
+ svn_client_conflict_option_update_any_moved_away_children,
+
+ /* Options for incoming add vs local add or obstruction. */
+ svn_client_conflict_option_incoming_add_ignore,
+
+ /* Options for incoming file add vs local file add or obstruction. */
+ svn_client_conflict_option_incoming_added_file_text_merge,
+ svn_client_conflict_option_incoming_added_file_replace,
+ svn_client_conflict_option_incoming_added_file_replace_and_merge,
+
+ /* Options for incoming dir add vs local dir add or obstruction. */
+ svn_client_conflict_option_incoming_added_dir_merge,
+ svn_client_conflict_option_incoming_added_dir_replace,
+ svn_client_conflict_option_incoming_added_dir_replace_and_merge,
+
+ /* Options for incoming delete vs any */
+ svn_client_conflict_option_incoming_delete_ignore,
+ svn_client_conflict_option_incoming_delete_accept,
+
+ /* Options for incoming move vs local edit */
+ svn_client_conflict_option_incoming_move_file_text_merge,
+ svn_client_conflict_option_incoming_move_dir_merge,
+
} svn_client_conflict_option_id_t;
/**
@@ -4414,6 +4447,96 @@ svn_client_conflict_option_set_merged_pr
const svn_string_t *merged_propval);
/**
+ * Get a list of possible repository paths which can be applied to the
+ * svn_client_conflict_option_incoming_move_file_text_merge or
+ * svn_client_conflict_option_incoming_move_dir_merge resolution
+ * @a option. (If a different option is passed in, this function will
+ * raise an assertion failure.)
+ *
+ * In some situations, there can be multiple possible destinations for an
+ * incoming move. One such situation is where a file was copied and moved
+ * in the same revision: svn cp a b; svn mv a c; svn commit
+ * When this move is merged elsewhere, both b and c will appear as valid move
+ * destinations to the conflict resolver. To resolve such ambiguity, the client
+ * may call this function to obtain a list of possible destinations the user
+ * may choose from.
+ *
+ * The array is allocated in @a result_pool and will have "const char *"
+ * elements pointing to strings also allocated in @a result_pool.
+ * All paths are relpaths, and relative to the repository root.
+ *
+ * @see svn_client_conflict_option_set_moved_to_repos_relpath()
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_option_get_moved_to_repos_relpath_candidates(
+ apr_array_header_t **possible_moved_to_repos_relpaths,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Set the preferred moved target repository path for the
+ * svn_client_conflict_option_incoming_move_file_text_merge or
+ * svn_client_conflict_option_incoming_move_dir_merge resolution option.
+ *
+ * @a preferred_move_target_idx must be a valid index into the list returned
+ * by svn_client_conflict_option_get_moved_to_repos_relpath_candidates().
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_option_set_moved_to_repos_relpath(
+ svn_client_conflict_option_t *option,
+ int preferred_move_target_idx,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Get a list of possible moved-to abspaths in the working copy which can be
+ * applied to the svn_client_conflict_option_incoming_move_file_text_merge
+ * or svn_client_conflict_option_incoming_move_dir_merge resolution @a option.
+ * (If a different option is passed in, this function will raise an assertion
+ * failure.)
+ *
+ * All paths in the returned list correspond to the repository path which
+ * is assumed to be the destination of the incoming move operation.
+ * To support cases where this destination path is ambiguous, the client may
+ * call svn_client_conflict_option_get_moved_to_repos_relpath_candidates()
+ * before calling this function to let the user select a repository path first.
+ *
+ * If no possible moved-to paths can be found, return an empty array.
+ * This doesn't mean that no move happened in the repository. It is possible
+ * that the move destination is outside the scope of the current working copy,
+ * for example, in which case the conflict must be resolved in some other way.
+ *
+ * @see svn_client_conflict_option_set_moved_to_abspath()
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_option_get_moved_to_abspath_candidates(
+ apr_array_header_t **possible_moved_to_abspaths,
+ svn_client_conflict_option_t *option,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Set the preferred moved target abspath for the
+ * svn_client_conflict_option_incoming_move_file_text_merge or
+ * svn_client_conflict_option_incoming_move_dir_merge resolution option.
+ *
+ * @a preferred_move_target_idx must be a valid index into the list
+ * returned by svn_client_conflict_option_get_moved_to_abspath_candidates().
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_option_set_moved_to_abspath(
+ svn_client_conflict_option_t *option,
+ int preferred_move_target_idx,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/**
* 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.
*
@@ -4439,18 +4562,6 @@ svn_client_conflict_get(svn_client_confl
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);
-
-/**
* 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.
@@ -4470,6 +4581,70 @@ svn_client_conflict_get_conflicted(svn_b
apr_pool_t *scratch_pool);
/**
+ * Return a textual human-readable description of the property conflict
+ * described by @a conflict, allocated in @a result_pool. The description
+ * is encoded in UTF-8 and may contain multiple lines separated by
+ * @c APR_EOL_STR. The last line is not terminated by a newline.
+ *
+ * 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_prop_get_description(const char **description,
+ svn_client_conflict_t *conflict,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Return a textual human-readable description of the tree conflict
+ * described by @a conflict, allocated in @a result_pool. The description
+ * is encoded in UTF-8 and may contain multiple lines separated by
+ * @c APR_EOL_STR. The last line is not terminated by a newline.
+ *
+ * Additionally, the description may be localized to the language used
+ * by the current locale.
+ *
+ * While client implementors are free to enhance descriptions by adding
+ * additional information to the text, or break up very long lines for
+ * formatting purposes, there is no syntax defined for descriptions, and
+ * implementors should not rely on any particular parts of descriptions
+ * to remain stable over time, apart from what is stated below.
+ * Descriptions may or may not form complete sentences. They may contain
+ * paths relative to the repository root; such paths always start with "^/",
+ * and end with either a peg revision (e.g. "@100") or a colon followed by
+ * a range of revisions (as in svn:mergeinfo, e.g. ":100-200").
+ * Paths may appear on a line of their own to avoid overlong lines.
+ * Any revision numbers mentioned elsewhere in the description are
+ * prefixed with the letter 'r' (e.g. "r99").
+ *
+ * The description has two parts: One part describes the "incoming change"
+ * applied by an update, merge, or switch operation. The other part
+ * describes the "local change" which occurred in the working copy or
+ * perhaps in the history of a merge target branch.
+ * Both parts are provided independently to allow for some flexibility
+ * when displaying the description. As a convention, displaying the
+ * "incoming change" first and the "local change" second is recommended.
+ *
+ * By default, the description is based only on information available in
+ * the working copy. If svn_client_conflict_tree_get_details() was already
+ * called for @a conflict, the description might also contain useful
+ * information obtained from the repository and provide for a much better
+ * user experience.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_get_description(
+ const char **incoming_change_description,
+ const char **local_change_description,
+ svn_client_conflict_t *conflict,
+ svn_client_ctx_t *ctx,
+ 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.
*
@@ -4478,6 +4653,7 @@ svn_client_conflict_get_conflicted(svn_b
svn_error_t *
svn_client_conflict_text_get_resolution_options(apr_array_header_t **options,
svn_client_conflict_t *conflict,
+ svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4490,6 +4666,7 @@ svn_client_conflict_text_get_resolution_
svn_error_t *
svn_client_conflict_prop_get_resolution_options(apr_array_header_t **options,
svn_client_conflict_t *conflict,
+ svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4497,15 +4674,39 @@ svn_client_conflict_prop_get_resolution_
* Set @a *options to an array of pointers to svn_client_conflict_option_t
* objects applicable to the tree conflict described by @a conflict.
*
+ * By default, the list of options is based only on information available in
+ * the working copy. If svn_client_conflict_tree_get_details() was already
+ * called for @a conflict, a more useful list of options might be returned.
+ *
* @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,
+ svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
+ * Find more information about the tree conflict represented by @a conflict.
+ *
+ * A call to svn_client_conflict_tree_get_description() may yield much better
+ * results after this function has been called.
+ *
+ * A call to svn_client_conflict_tree_get_resolution_options() may provide
+ * more useful resolution options if this function has been called.
+ *
+ * This function may contact the repository. Use the authentication baton
+ * cached in @a ctx for authentication if contacting the repository.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_get_details(svn_client_conflict_t *conflict,
+ svn_client_ctx_t *ctx,
+ 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.
*
@@ -4534,22 +4735,13 @@ svn_client_conflict_option_describe(cons
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_client_conflict_t *conflict);
+svn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict);
/**
* Return the operation during which the conflict described by @a
@@ -4558,7 +4750,7 @@ svn_client_conflict_get_local_abspath(co
* @since New in 1.10.
*/
svn_wc_operation_t
-svn_client_conflict_get_operation(const svn_client_conflict_t *conflict);
+svn_client_conflict_get_operation(svn_client_conflict_t *conflict);
/**
* Return the action an update, switch, or merge operation attempted to
@@ -4567,7 +4759,7 @@ svn_client_conflict_get_operation(const
* @since New in 1.10.
*/
svn_wc_conflict_action_t
-svn_client_conflict_get_incoming_change(const svn_client_conflict_t *conflict);
+svn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict);
/**
* Return the reason why the attempted action performed by an update, switch,
@@ -4581,7 +4773,7 @@ svn_client_conflict_get_incoming_change(
* @since New in 1.10.
*/
svn_wc_conflict_reason_t
-svn_client_conflict_get_local_change(const svn_client_conflict_t *conflict);
+svn_client_conflict_get_local_change(svn_client_conflict_t *conflict);
/**
* Return information about the repository associated with @a conflict.
@@ -4593,7 +4785,7 @@ svn_client_conflict_get_local_change(con
svn_error_t *
svn_client_conflict_get_repos_info(const char **repos_root_url,
const char **repos_uuid,
- const svn_client_conflict_t *conflict,
+ svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4628,7 +4820,7 @@ svn_client_conflict_get_incoming_old_rep
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,
+ svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4645,7 +4837,7 @@ svn_client_conflict_get_incoming_new_rep
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,
+ svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4657,23 +4849,33 @@ svn_client_conflict_get_incoming_new_rep
* @since New in 1.10.
*/
svn_node_kind_t
-svn_client_conflict_tree_get_victim_node_kind(
- const svn_client_conflict_t *conflict);
+svn_client_conflict_tree_get_victim_node_kind(svn_client_conflict_t *conflict);
/**
* Resolve a tree @a conflict using resolution option @a option.
*
+ * May raise an error in case the tree conflict cannot be resolved yet, for
+ * instance @c SVN_ERR_WC_OBSTRUCTED_UPDATE or @c SVN_ERR_WC_FOUND_CONFLICT.
+ * This may happen when other tree conflicts, or unversioned obstructions,
+ * block the resolution of this tree conflict. In such a case the other
+ * conflicts should be resolved first and resolution of this conflict should
+ * be attempted again later.
+ *
* @since New in 1.10.
*/
svn_error_t *
svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict,
svn_client_conflict_option_t *option,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/**
+ * Like svn_client_conflict_tree_resolve(), except that it identifies
+ * the desired resolution option by ID @a option_id.
+ *
* 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.
+ * @a conflict, try to resolve the tree conflict using that option.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
*
* @since New in 1.10.
*/
@@ -4681,26 +4883,18 @@ svn_error_t *
svn_client_conflict_tree_resolve_by_id(
svn_client_conflict_t *conflict,
svn_client_conflict_option_id_t option_id,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/**
* 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.
+ * @c svn_client_conflict_option_unspecified.
*
* @since New in 1.10.
*/
svn_client_conflict_option_id_t
-svn_client_conflict_tree_get_resolution(const svn_client_conflict_t *conflict);
-
-
-/**
- * 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);
+svn_client_conflict_tree_get_resolution(svn_client_conflict_t *conflict);
/**
* Return the path to the legacy property conflicts reject file
@@ -4712,12 +4906,11 @@ svn_client_conflict_prop_get_propname(co
* @since New in 1.10.
*/
const char *
-svn_client_conflict_prop_get_reject_abspath(
- const svn_client_conflict_t *conflict);
+svn_client_conflict_prop_get_reject_abspath(svn_client_conflict_t *conflict);
/**
- * Return the set of property values involved in the property conflict
- * described by @a conflict. If a property value is unavailable the
+ * Return the set of property values involved in the conflict of property
+ * PROPNAME described by @a conflict. If a property value is unavailable the
* corresponding output argument is set to @c NULL.
*
* A 3-way diff of these property values can be generated with
@@ -4731,7 +4924,8 @@ svn_client_conflict_prop_get_propvals(co
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,
+ svn_client_conflict_t *conflict,
+ const char *propname,
apr_pool_t *result_pool);
/**
@@ -4745,11 +4939,13 @@ svn_error_t *
svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict,
const char *propname,
svn_client_conflict_option_t *option,
+ svn_client_ctx_t *ctx,
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.
+ * using that option.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
*
* @since New in 1.10.
*/
@@ -4758,18 +4954,19 @@ svn_client_conflict_prop_resolve_by_id(
svn_client_conflict_t *conflict,
const char *propname,
svn_client_conflict_option_id_t option_id,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/**
* 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.
+ * @c svn_client_conflict_option_unspecified.
*
* @since New in 1.10.
*/
svn_client_conflict_option_id_t
-svn_client_conflict_prop_get_resolution(const svn_client_conflict_t *conflict,
+svn_client_conflict_prop_get_resolution(svn_client_conflict_t *conflict,
const char *propname);
/**
@@ -4780,7 +4977,7 @@ svn_client_conflict_prop_get_resolution(
* @since: New in 1.10.
*/
const char *
-svn_client_conflict_text_get_mime_type(const svn_client_conflict_t *conflict);
+svn_client_conflict_text_get_mime_type(svn_client_conflict_t *conflict);
/**
* Return absolute paths to the versions of the text-conflicted file
@@ -4796,7 +4993,7 @@ svn_client_conflict_text_get_contents(co
const char **working_abspath,
const char **incoming_old_abspath,
const char **incoming_new_abspath,
- const svn_client_conflict_t *conflict,
+ svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -4808,12 +5005,13 @@ svn_client_conflict_text_get_contents(co
svn_error_t *
svn_client_conflict_text_resolve(svn_client_conflict_t *conflict,
svn_client_conflict_option_t *option,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/**
* 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.
+ * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE.
*
* @since New in 1.10.
*/
@@ -4821,17 +5019,18 @@ svn_error_t *
svn_client_conflict_text_resolve_by_id(
svn_client_conflict_t *conflict,
svn_client_conflict_option_id_t option_id,
+ svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/**
* 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.
+ * @c svn_client_conflict_option_unspecified.
*
* @since New in 1.10.
*/
svn_client_conflict_option_id_t
-svn_client_conflict_text_get_resolution(const svn_client_conflict_t *conflict);
+svn_client_conflict_text_get_resolution(svn_client_conflict_t *conflict);
/** @} */
@@ -4882,7 +5081,11 @@ svn_client_resolved(const char *path,
* - svn_wc_conflict_choose_unspecified
* invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
* a resolution decision for each conflict. This can be used to
- * implement interactive conflict resolution.
+ * implement interactive conflict resolution but is NOT RECOMMENDED for
+ * new code. To perform conflict resolution based on interactive user
+ * input on a per-conflict basis, use svn_client_conflict_text_resolve(),
+ * svn_client_conflict_prop_resolve(), and
+ * svn_client_conflict_tree_resolve() instead of svn_client_resolve().
*
* #svn_wc_conflict_choose_theirs_conflict and
* #svn_wc_conflict_choose_mine_conflict are not legal for binary
Modified: subversion/branches/ra-git/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_error_codes.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_error_codes.h Tue Oct 11 09:11:50 2016
@@ -1249,6 +1249,11 @@ SVN_ERROR_START
SVN_ERR_CLIENT_CATEGORY_START + 23,
"The operation is forbidden by the server")
+ /** @since New in 1.10. */
+ SVN_ERRDEF(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE,
+ SVN_ERR_CLIENT_CATEGORY_START + 24,
+ "The conflict resolution option is not applicable")
+
/* misc errors */
SVN_ERRDEF(SVN_ERR_BASE,
@@ -1455,6 +1460,11 @@ SVN_ERROR_START
SVN_ERR_MISC_CATEGORY_START + 43,
"Parser error: invalid input")
+ /** @since New in 1.10. */
+ SVN_ERRDEF(SVN_ERR_SQLITE_ROLLBACK_FAILED,
+ SVN_ERR_MISC_CATEGORY_START + 44,
+ "SQLite transaction rollback failed")
+
/* command-line client errors */
SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,
Modified: subversion/branches/ra-git/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_fs.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_fs.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_fs.h Tue Oct 11 09:11:50 2016
@@ -146,6 +146,12 @@ typedef struct svn_fs_t svn_fs_t;
*/
#define SVN_FS_CONFIG_FSFS_CACHE_NS "fsfs-cache-namespace"
+/** Enable / disable caching of node properties for a FSFS repository.
+ *
+ * @since New in 1.10.
+ */
+#define SVN_FS_CONFIG_FSFS_CACHE_NODEPROPS "fsfs-cache-nodeprops"
+
/** Enable / disable the FSFS format 7 "block read" feature.
*
* @since New in 1.9.
@@ -219,6 +225,20 @@ typedef struct svn_fs_t svn_fs_t;
* @since New in 1.9.
*/
#define SVN_FS_CONFIG_COMPATIBLE_VERSION "compatible-version"
+
+/** Specifies whether the filesystem should be forcing a physical write of
+ * the data to disk. Enabling the option allows the filesystem to return
+ * from the API calls without forcing the write to disk. If this option
+ * is disabled, the changes are always written to disk.
+ *
+ * @note Avoiding the forced write to disk usually is more efficient, but
+ * doesn't guarantee data integrity after a system crash or power failure
+ * and should be used with caution.
+ *
+ * @since New in 1.10.
+ */
+#define SVN_FS_CONFIG_NO_FLUSH_TO_DISK "no-flush-to-disk"
+
/** @} */
@@ -1499,7 +1519,75 @@ typedef enum svn_fs_path_change_kind_t
* by the commit API; this does not mean the new value is different from
* the old value.
*
- * @since New in 1.6. */
+ * @since New in 1.10. */
+typedef struct svn_fs_path_change3_t
+{
+ /** path of the node that got changed. */
+ svn_string_t path;
+
+ /** kind of change */
+ svn_fs_path_change_kind_t change_kind;
+
+ /** what node kind is the path?
+ (Note: it is legal for this to be #svn_node_unknown.) */
+ svn_node_kind_t node_kind;
+
+ /** was the text touched?
+ * For node_kind=dir: always false. For node_kind=file:
+ * modify: true iff text touched.
+ * add (copy): true iff text touched.
+ * add (plain): always true.
+ * delete: always false.
+ * replace: as for the add/copy part of the replacement.
+ */
+ svn_boolean_t text_mod;
+
+ /** were the properties touched?
+ * modify: true iff props touched.
+ * add (copy): true iff props touched.
+ * add (plain): true iff props touched.
+ * delete: always false.
+ * replace: as for the add/copy part of the replacement.
+ */
+ svn_boolean_t prop_mod;
+
+ /** was the mergeinfo property touched?
+ * modify: } true iff svn:mergeinfo property add/del/mod
+ * add (copy): } and fs format supports this flag.
+ * add (plain): }
+ * delete: always false.
+ * replace: as for the add/copy part of the replacement.
+ * (Note: Pre-1.9 repositories will report #svn_tristate_unknown.)
+ */
+ svn_tristate_t mergeinfo_mod;
+
+ /** Copyfrom revision and path; this is only valid if copyfrom_known
+ * is true. */
+ svn_boolean_t copyfrom_known;
+ svn_revnum_t copyfrom_rev;
+ const char *copyfrom_path;
+
+ /* NOTE! Please update svn_fs_path_change3_create() when adding new
+ fields here. */
+} svn_fs_path_change3_t;
+
+
+/** Similar to #svn_fs_path_change3_t, but with @a node_rev_id and without
+ * path information.
+ *
+ * @note Fields may be added to the end of this structure in future
+ * versions. Therefore, to preserve binary compatibility, users
+ * should not directly allocate structures of this type.
+ *
+ * @note The @c text_mod, @c prop_mod and @c mergeinfo_mod flags mean the
+ * text, properties and mergeinfo property (respectively) were "touched"
+ * by the commit API; this does not mean the new value is different from
+ * the old value.
+ *
+ * @since New in 1.6.
+ *
+ * @deprecated Provided for backwards compatibility with the 1.9 API.
+ */
typedef struct svn_fs_path_change2_t
{
/** node revision id of changed path */
@@ -1588,22 +1676,94 @@ svn_fs_path_change2_create(const svn_fs_
svn_fs_path_change_kind_t change_kind,
apr_pool_t *pool);
+/**
+ * Allocate an #svn_fs_path_change3_t structure in @a result_pool,
+ * initialize and return it.
+ *
+ * Set the @c change_kind field to @a change_kind. Set all other fields
+ * to their @c _unknown, @c NULL or invalid value, respectively.
+ *
+ * @since New in 1.10.
+ */
+svn_fs_path_change3_t *
+svn_fs_path_change3_create(svn_fs_path_change_kind_t change_kind,
+ apr_pool_t *result_pool);
+
+/**
+ * Return a deep copy of @a *change, allocated in @a result_pool.
+ *
+ * @since New in 1.10.
+ */
+svn_fs_path_change3_t *
+svn_fs_path_change3_dup(svn_fs_path_change3_t *change,
+ apr_pool_t *result_pool);
+
+/**
+ * Opaque iterator object type for a changed paths list.
+ *
+ * @since New in 1.10.
+ */
+typedef struct svn_fs_path_change_iterator_t svn_fs_path_change_iterator_t;
+
+/**
+ * Set @a *change to the path change that @a iterator currently points to
+ * and advance the @a iterator. If the change list has been exhausted,
+ * @a change will be set to @c NULL.
+ *
+ * You may modify @a **change but its content becomes invalid as soon as
+ * either @a iterator becomes invalid or you call this function again.
+ *
+ * @note The @c node_kind field in @a change may be #svn_node_unknown and
+ * the @c copyfrom_known fields may be FALSE.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_fs_path_change_get(svn_fs_path_change3_t **change,
+ svn_fs_path_change_iterator_t *iterator);
+
+
/** Determine what has changed under a @a root.
*
+ * Set @a *iterator to an iterator object, allocated in @a result_pool,
+ * which will give access to the full list of changed paths under @a root.
+ * Each call to @a svn_fs_path_change_get will return a new unique path
+ * change and has amortized O(1) runtime. The iteration order is undefined
+ * and may change even for the same @a root.
+ *
+ * If @a root becomes invalid, @a *iterator becomes invalid, too.
+ *
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @note The @a *iterator may be a large object and bind limited system
+ * resources such as file handles. Be sure to clear the owning
+ * pool once you don't need that iterator anymore.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_fs_paths_changed3(svn_fs_path_change_iterator_t **iterator,
+ svn_fs_root_t *root,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/** Same as svn_fs_paths_changed3() but returning all changes in a single,
+ * large data structure and using a single pool for all allocations.
+ *
* Allocate and return a hash @a *changed_paths2_p containing descriptions
* of the paths changed under @a root. The hash is keyed with
* <tt>const char *</tt> paths, and has #svn_fs_path_change2_t * values.
*
- * Callers can assume that this function takes time proportional to
- * the amount of data output, and does not need to do tree crawls;
- * however, it is possible that some of the @c node_kind fields in the
- * #svn_fs_path_change2_t * values will be #svn_node_unknown or
- * that and some of the @c copyfrom_known fields will be FALSE.
- *
* Use @a pool for all allocations, including the hash and its values.
*
+ * @note Retrieving the #node_rev_id element of #svn_fs_path_change2_t may
+ * be expensive in some FS backends.
+ *
* @since New in 1.6.
+ *
+ * @deprecated Provided for backward compatibility with the 1.9 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_fs_paths_changed2(apr_hash_t **changed_paths2_p,
svn_fs_root_t *root,
Modified: subversion/branches/ra-git/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_io.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_io.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_io.h Tue Oct 11 09:11:50 2016
@@ -918,6 +918,17 @@ typedef svn_error_t *(*svn_stream_seek_f
typedef svn_error_t *(*svn_stream_data_available_fn_t)(void *baton,
svn_boolean_t *data_available);
+/** Readline handler function for a generic stream. @see svn_stream_t and
+ * svn_stream_readline().
+ *
+ * @since New in 1.10.
+ */
+typedef svn_error_t *(*svn_stream_readline_fn_t)(void *baton,
+ svn_stringbuf_t **stringbuf,
+ const char *eol,
+ svn_boolean_t *eof,
+ apr_pool_t *pool);
+
/** Create a generic stream. @see svn_stream_t. */
svn_stream_t *
svn_stream_create(void *baton,
@@ -992,6 +1003,14 @@ void
svn_stream_set_data_available(svn_stream_t *stream,
svn_stream_data_available_fn_t data_available);
+/** Set @a stream's readline function to @a readline_fn
+ *
+ * @since New in 1.10.
+ */
+void
+svn_stream_set_readline(svn_stream_t *stream,
+ svn_stream_readline_fn_t readline_fn);
+
/** Create a stream that is empty for reading and infinite for writing. */
svn_stream_t *
svn_stream_empty(apr_pool_t *pool);
@@ -1148,8 +1167,8 @@ svn_stream_for_stdout(svn_stream_t **out
apr_pool_t *pool);
/** Read the contents of @a stream into memory, from its current position
- * to its end, returning the data in @a *result. The stream will be closed
- * when it has been successfully and completely read.
+ * to its end, returning the data in @a *result. This function does not
+ * close the @a stream upon completion.
*
* @a len_hint gives a hint about the expected length, in bytes, of the
* actual data that will be read from the stream. It may be 0, meaning no
@@ -1254,6 +1273,24 @@ svn_stream_checksummed(svn_stream_t *str
svn_boolean_t read_all,
apr_pool_t *pool);
+/** Read the contents of the readable stream @a stream and return its
+ * checksum of type @a kind in @a *checksum.
+ *
+ * The stream will be closed before this function returns (regardless
+ * of the result, or any possible error).
+ *
+ * Use @a scratch_pool for temporary allocations and @a result_pool
+ * to allocate @a *checksum.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_stream_contents_checksum(svn_checksum_t **checksum,
+ svn_stream_t *stream,
+ svn_checksum_kind_t kind,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/** Read from a generic stream until @a buffer is filled upto @a *len or
* until EOF is reached. @see svn_stream_t
*
Modified: subversion/branches/ra-git/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_repos.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_repos.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_repos.h Tue Oct 11 09:11:50 2016
@@ -1870,13 +1870,132 @@ svn_repos_node_location_segments(svn_rep
/* Retrieving log messages. */
+/** Path change descriptor.
+ *
+ * @note Identical to #svn_fs_path_change3_t but with all information
+ * known, i.e. @a node_kind is never #svn_node_unknown and
+ * @a copyfrom_known is always @c TRUE.
+ *
+ * @see svn_fs_path_change3_t
+ *
+ * @since New in 1.10.
+ */
+typedef svn_fs_path_change3_t svn_repos_path_change_t;
+
+/** The callback invoked by log message loopers, such as
+ * svn_repos_get_logs5().
+ *
+ * This function is invoked once on each changed path, in a potentially
+ * random order that may even change between invocations for the same
+ * revisions.
+ *
+ * @a baton is what you think it is, and @a change contains relevant
+ * information for the changed path. Please note that @a change may be
+ * modified within this callback but it will become invalid as soon as
+ * the callback returns.
+ *
+ * Use @a scratch_pool for temporary allocation. The caller may clear it
+ * between or after invocations.
+ *
+ * @since New in 1.10.
+ */
+typedef svn_error_t *(*svn_repos_path_change_receiver_t)(
+ void *baton,
+ svn_repos_path_change_t *change,
+ apr_pool_t *scratch_pool);
+
/**
- * Invoke @a receiver with @a receiver_baton on each log message from
- * @a start to @a end in @a repos's filesystem. @a start may be greater
- * or less than @a end; this just controls whether the log messages are
+ * A structure to represent all the information about a particular log entry.
+ *
+ * @since New in 1.10.
+ */
+typedef struct svn_repos_log_entry_t
+{
+ /** The revision of the commit. */
+ svn_revnum_t revision;
+
+ /** The hash of requested revision properties, which may be NULL if it
+ * would contain no revprops. Maps (const char *) property name to
+ * (svn_string_t *) property value. */
+ apr_hash_t *revprops;
+
+ /**
+ * Whether or not this message has children.
+ *
+ * When a log operation requests additional merge information, extra log
+ * entries may be returned as a result of this entry. The new entries, are
+ * considered children of the original entry, and will follow it. When
+ * the HAS_CHILDREN flag is set, the receiver should increment its stack
+ * depth, and wait until an entry is provided with SVN_INVALID_REVNUM which
+ * indicates the end of the children.
+ *
+ * For log operations which do not request additional merge information, the
+ * HAS_CHILDREN flag is always FALSE.
+ *
+ * For more information see:
+ * https://svn.apache.org/repos/asf/subversion/trunk/notes/merge-tracking/design.html#commutative-reporting
+ */
+ svn_boolean_t has_children;
+
+ /**
+ * Whether @a revision should be interpreted as non-inheritable in the
+ * same sense of #svn_merge_range_t.
+ *
+ * Currently always FALSE.
+ */
+ svn_boolean_t non_inheritable;
+
+ /**
+ * Whether @a revision is a merged revision resulting from a reverse merge.
+ */
+ svn_boolean_t subtractive_merge;
+
+ /* NOTE: Add new fields at the end to preserve binary compatibility. */
+} svn_repos_log_entry_t;
+
+
+/** The callback invoked by log message loopers, such as
+ * svn_repos_get_logs5().
+ *
+ * This function is invoked once on each log message, in the order
+ * determined by the caller (see above-mentioned functions).
+ *
+ * @a baton is what you think it is, and @a log_entry contains relevant
+ * information for the log message.
+ *
+ * If @a log_entry->has_children is @c TRUE, the message will be followed
+ * immediately by any number of merged revisions (child messages), which are
+ * terminated by an invocation with SVN_INVALID_REVNUM. This usage may
+ * be recursive.
+ *
+ * Use @a scratch_pool for temporary allocation. The caller may clear it
+ * between or after invocations.
+ *
+ * @since New in 1.10.
+ */
+typedef svn_error_t *(*svn_repos_log_entry_receiver_t)(
+ void *baton,
+ svn_repos_log_entry_t *log_entry,
+ apr_pool_t *scratch_pool);
+
+
+/**
+ * Invoke @a revision_receiver with @a revision_receiver_baton on each
+ * revision from @a start to @a end in @a repos's filesystem. @a start may
+ * be greater or less than @a end; this just controls whether the log is
* processed in descending or ascending revision number order.
*
+ * If not @c NULL, @a path_change_receiver will be invoked with
+ * @a path_change_receiver_baton for each changed path in the respective
+ * revision. These changes will be reported before the @a revision_receiver
+ * is invoked for that revision. So, for each revision in the log, there
+ * is a number of calls to @a path_change_receiver followed by a single
+ * invocation of @a revision_receiver, implicitly marking the end of the
+ * changes list for that revision. If a revision does not contain any
+ * changes (or if none are visible due to @a authz_read_func),
+ * @a path_change_receiver will not be called for that revision.
+ *
* If @a start or @a end is #SVN_INVALID_REVNUM, it defaults to youngest.
*
* If @a paths is non-NULL and has one or more elements, then only show
@@ -1887,13 +2006,8 @@ svn_repos_node_location_segments(svn_rep
* show all revisions regardless of what paths were changed in those
* revisions.
*
- * If @a limit is greater than zero then only invoke @a receiver on the first
- * @a limit logs.
- *
- * If @a discover_changed_paths, then each call to @a receiver passes a
- * hash mapping paths committed in that revision to information about them
- * as the receiver's @a changed_paths argument.
- * Otherwise, each call to @a receiver passes NULL for @a changed_paths.
+ * If @a limit is greater than zero then only invoke @a revision_receiver
+ * on the first @a limit logs.
*
* If @a strict_node_history is set, copy history (if any exists) will
* not be traversed while harvesting revision logs for each path.
@@ -1908,28 +2022,64 @@ svn_repos_node_location_segments(svn_rep
* only the revision properties named by the (const char *) array elements
* (i.e. retrieve none if the array is empty).
*
- * If any invocation of @a receiver returns error, return that error
- * immediately and without wrapping it.
+ * If any invocation of @a revision_receiver or @a path_change_receiver
+ * returnn an error, return that error immediately and without wrapping it.
*
* If @a start or @a end is a non-existent revision, return the error
- * #SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a receiver.
+ * #SVN_ERR_FS_NO_SUCH_REVISION, without ever invoking @a revision_receiver.
*
* If optional @a authz_read_func is non-NULL, then use this function
* (along with optional @a authz_read_baton) to check the readability
* of each changed-path in each revision about to be "pushed" at
- * @a receiver. If a revision has some changed-paths readable and
- * others unreadable, unreadable paths are omitted from the
- * changed_paths field and only svn:author and svn:date will be
- * available in the revprops field. If a revision has no
- * changed-paths readable at all, then all paths are omitted and no
- * revprops are available.
+ * @a path_change_receiver. If a revision has some changed-paths readable
+ * and others unreadable, unreadable paths are omitted from the
+ * @a path_change_receiver invocations and only svn:author and svn:date
+ * will be available in the revprops field in the @a revision_receiver
+ * callback. If a revision has no changed-paths readable at all, then all
+ * paths are omitted and no revprops are available. If
+ * @a path_change_receiver is @c NULL, the same filtering is performed
+ * just without reporting any path changes.
+ *
+ * Use @a scratch_pool for temporary allocations.
*
- * See also the documentation for #svn_log_entry_receiver_t.
+ * @see svn_repos_path_change_receiver_t, svn_repos_log_entry_receiver_t
*
- * Use @a pool for temporary allocations.
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_repos_get_logs5(svn_repos_t *repos,
+ const apr_array_header_t *paths,
+ svn_revnum_t start,
+ svn_revnum_t end,
+ int limit,
+ svn_boolean_t strict_node_history,
+ svn_boolean_t include_merged_revisions,
+ const apr_array_header_t *revprops,
+ svn_repos_authz_func_t authz_read_func,
+ void *authz_read_baton,
+ svn_repos_path_change_receiver_t path_change_receiver,
+ void *path_change_receiver_baton,
+ svn_repos_log_entry_receiver_t revision_receiver,
+ void *revision_receiver_baton,
+ apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_repos_get_logs5 but using a #svn_log_entry_receiver_t
+ * @a receiver to receive revision properties and changed paths through a
+ * single callback and the @a discover_changed_paths flag to control it.
+ *
+ * If @a discover_changed_paths, then each call to @a receiver passes a
+ * hash mapping paths committed in that revision to information about them
+ * as the receiver's @a changed_paths argument.
+ * Otherwise, each call to @a receiver passes NULL for @a changed_paths.
+ *
+ * @see svn_log_entry_receiver_t
*
* @since New in 1.5.
+ *
+ * @deprecated Provided for backward compatibility with the 1.9 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_repos_get_logs4(svn_repos_t *repos,
const apr_array_header_t *paths,
Modified: subversion/branches/ra-git/subversion/include/svn_types.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_types.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_types.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_types.h Tue Oct 11 09:11:50 2016
@@ -416,7 +416,7 @@ svn_tristate__from_word(const char * wor
* 2. Creating a new textual name similar to
* SVN_SUBST__SPECIAL_LINK_STR in libsvn_subr/subst.c.
* 3. Handling the translation/detranslation case for the new type in
- * create_special_file and detranslate_special_file, using the
+ * create_special_file_from_stream and detranslate_special_file, using the
* routines from 1.
*/
@@ -1078,6 +1078,11 @@ typedef svn_error_t *(*svn_log_message_r
* @a commit_info, along with the @a baton closure.
* @a pool can be used for temporary allocations.
*
+ * @note Implementers of this callback that pass this callback to
+ * svn_ra_get_commit_editor3() should be careful with returning errors
+ * as these might be returned as commit errors. See the documentation
+ * of svn_ra_get_commit_editor3() for more details.
+ *
* @since New in 1.4.
*/
typedef svn_error_t *(*svn_commit_callback2_t)(
Modified: subversion/branches/ra-git/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_wc.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_wc.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_wc.h Tue Oct 11 09:11:50 2016
@@ -998,7 +998,10 @@ typedef enum svn_wc_notify_action_t
/** A revert operation has failed. */
svn_wc_notify_failed_revert,
- /** Resolving a conflict. */
+ /** All conflicts on a path were marked as resolved.
+ * @note As of 1.10, separate notifications are sent for individually
+ * resolved text, property, and tree conflicts. This notification is used
+ * only if all conflicts on a path were marked resolved at once. */
svn_wc_notify_resolved,
/** Skipping a path. */
@@ -1274,7 +1277,34 @@ typedef enum svn_wc_notify_action_t
/** Finalizing commit.
* @since New in 1.9. */
- svn_wc_notify_commit_finalizing
+ svn_wc_notify_commit_finalizing,
+
+ /** All text conflicts in a file were marked as resolved.
+ * @since New in 1.10. */
+ svn_wc_notify_resolved_text,
+
+ /** A property conflict on a path was marked as resolved.
+ * The name of the property is specified in #svn_wc_notify_t.prop_name.
+ * @since New in 1.10. */
+ svn_wc_notify_resolved_prop,
+
+ /** A tree conflict on a path was marked as resolved.
+ * @since New in 1.10. */
+ svn_wc_notify_resolved_tree,
+
+ /** Starting to search the repository for details about a tree conflict.
+ * @since New in 1.10. */
+ svn_wc_notify_begin_search_tree_conflict_details,
+
+ /** Progressing in search of repository for details about a tree conflict.
+ * The revision being searched is specified in #svn_wc_notify_t.revision.
+ * @since New in 1.10. */
+ svn_wc_notify_tree_conflict_details_progress,
+
+ /** Done searching the repository for details about a conflict.
+ * @since New in 1.10. */
+ svn_wc_notify_end_search_tree_conflict_details,
+
} svn_wc_notify_action_t;
@@ -5054,7 +5084,11 @@ svn_wc_remove_from_revision_control(svn_
* Temporary allocations will be performed in @a scratch_pool.
*
* @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.9 API.
+ * Use svn_client_conflict_text_resolve(), svn_client_conflict_prop_resolve(),
+ * and svn_client_conflict_tree_resolve() instead.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict5(svn_wc_context_t *wc_ctx,
const char *local_abspath,
Modified: subversion/branches/ra-git/subversion/include/svn_x509.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/include/svn_x509.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/include/svn_x509.h (original)
+++ subversion/branches/ra-git/subversion/include/svn_x509.h Tue Oct 11 09:11:50 2016
@@ -166,7 +166,7 @@ svn_x509_certinfo_get_valid_from(const s
*
* @since New in 1.9.
*/
-const apr_time_t
+apr_time_t
svn_x509_certinfo_get_valid_to(const svn_x509_certinfo_t *certinfo);
/**
Modified: subversion/branches/ra-git/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_client/client.h?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ra-git/subversion/libsvn_client/client.h Tue Oct 11 09:11:50 2016
@@ -1185,6 +1185,88 @@ svn_client__remote_propget(apr_hash_t *p
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* */
+typedef struct merge_source_t
+{
+ /* "left" side URL and revision (inclusive iff youngest) */
+ const svn_client__pathrev_t *loc1;
+
+ /* "right" side URL and revision (inclusive iff youngest) */
+ const svn_client__pathrev_t *loc2;
+
+ /* True iff LOC1 is an ancestor of LOC2 or vice-versa (history-wise). */
+ svn_boolean_t ancestral;
+} merge_source_t;
+
+/* Description of the merge target root node (a WC working node) */
+typedef struct merge_target_t
+{
+ /* Absolute path to the WC node */
+ const char *abspath;
+
+ /* The repository location of the base node of the target WC. If the node
+ * is locally added, then URL & REV are NULL & SVN_INVALID_REVNUM.
+ * REPOS_ROOT_URL and REPOS_UUID are always valid. */
+ svn_client__pathrev_t loc;
+
+} merge_target_t;
+
+/*
+ * Similar API to svn_client_merge_peg5().
+ */
+svn_error_t *
+svn_client__merge_elements(svn_boolean_t *use_sleep,
+ apr_array_header_t *merge_sources,
+ merge_target_t *target,
+ svn_ra_session_t *ra_session,
+ svn_boolean_t diff_ignore_ancestry,
+ svn_boolean_t force_delete,
+ svn_boolean_t dry_run,
+ const apr_array_header_t *merge_options,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Data for reporting when a merge aborted because of raising conflicts.
+ *
+ * ### TODO: More info, including the ranges (or other parameters) the user
+ * needs to complete the merge.
+ */
+typedef struct svn_client__conflict_report_t
+{
+ const char *target_abspath;
+ /* The revision range during which conflicts were raised */
+ const merge_source_t *conflicted_range;
+ /* Was the conflicted range the last range in the whole requested merge? */
+ svn_boolean_t was_last_range;
+} svn_client__conflict_report_t;
+
+/* Create and return an error structure appropriate for the unmerged
+ revisions range(s). */
+svn_error_t *
+svn_client__make_merge_conflict_error(svn_client__conflict_report_t *report,
+ apr_pool_t *scratch_pool);
+
+/* The body of svn_client_merge5(), which see for details. */
+svn_error_t *
+svn_client__merge_locked(svn_client__conflict_report_t **conflict_report,
+ const char *source1,
+ const svn_opt_revision_t *revision1,
+ const char *source2,
+ const svn_opt_revision_t *revision2,
+ const char *target_abspath,
+ svn_depth_t depth,
+ svn_boolean_t ignore_mergeinfo,
+ svn_boolean_t diff_ignore_ancestry,
+ svn_boolean_t force_delete,
+ svn_boolean_t record_only,
+ svn_boolean_t dry_run,
+ svn_boolean_t allow_mixed_rev,
+ const apr_array_header_t *merge_options,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
Modified: subversion/branches/ra-git/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_client/copy.c?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_client/copy.c Tue Oct 11 09:11:50 2016
@@ -2415,10 +2415,10 @@ repos_to_wc_copy_single(svn_boolean_t *t
*timestamp_sleep = TRUE;
- /* Schedule dst_path for addition in parent, with copy history.
- Don't send any notification here.
- Then remove the temporary checkout's .svn dir in preparation for
- moving the rest of it into the final destination. */
+ /* Schedule dst_path for addition in parent, with copy history.
+ Don't send any notification here.
+ Then remove the temporary checkout's .svn dir in preparation for
+ moving the rest of it into the final destination. */
SVN_ERR(svn_wc_copy3(ctx->wc_ctx, tmp_abspath, dst_abspath,
TRUE /* metadata_only */,
ctx->cancel_func, ctx->cancel_baton,
Modified: subversion/branches/ra-git/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_client/diff.c?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_client/diff.c Tue Oct 11 09:11:50 2016
@@ -726,12 +726,13 @@ diff_props_changed(const char *diff_relp
return SVN_NO_ERROR;
}
-/* Given a file TMPFILE, return a path to a temporary file that lives at least
- as long as RESULT_POOL, containing the git-like represention of TMPFILE */
+/* Given a file ORIG_TMPFILE, return a path to a temporary file that lives at
+ * least as long as RESULT_POOL, containing the git-like represention of
+ * ORIG_TMPFILE */
static svn_error_t *
transform_link_to_git(const char **new_tmpfile,
const char **git_sha1,
- const char *tmpfile,
+ const char *orig_tmpfile,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -741,7 +742,7 @@ transform_link_to_git(const char **new_t
*git_sha1 = NULL;
- SVN_ERR(svn_io_file_open(&orig, tmpfile, APR_READ, APR_OS_DEFAULT,
+ SVN_ERR(svn_io_file_open(&orig, orig_tmpfile, APR_READ, APR_OS_DEFAULT,
scratch_pool));
SVN_ERR(svn_io_open_unique_file3(&gitlike, new_tmpfile, NULL,
svn_io_file_del_on_pool_cleanup,
@@ -773,7 +774,7 @@ transform_link_to_git(const char **new_t
else
{
/* Not a link... so can't convert */
- *new_tmpfile = apr_pstrdup(result_pool, tmpfile);
+ *new_tmpfile = apr_pstrdup(result_pool, orig_tmpfile);
}
SVN_ERR(svn_io_file_close(orig, scratch_pool));
@@ -2238,22 +2239,20 @@ diff_repos_wc(const char **root_relpath,
else
diff_depth = svn_depth_unknown;
-
+ /* Tell the RA layer we want a delta to change our txn to URL1 */
+ SVN_ERR(svn_ra_do_diff3(ra_session,
+ &reporter, &reporter_baton,
+ loc1->rev,
+ target,
+ diff_depth,
+ ignore_ancestry,
+ TRUE, /* text_deltas */
+ loc1->url,
+ diff_editor, diff_edit_baton,
+ scratch_pool));
if (is_copy && revision2_kind != svn_opt_revision_base)
{
- /* Tell the RA layer we want a delta to change our txn to URL1 */
- SVN_ERR(svn_ra_do_diff3(ra_session,
- &reporter, &reporter_baton,
- loc1->rev,
- target,
- diff_depth,
- ignore_ancestry,
- TRUE, /* text_deltas */
- loc1->url,
- diff_editor, diff_edit_baton,
- scratch_pool));
-
/* Report the copy source. */
if (cf_depth == svn_depth_unknown)
cf_depth = svn_depth_infinity;
@@ -2277,18 +2276,6 @@ diff_repos_wc(const char **root_relpath,
}
else
{
- /* Tell the RA layer we want a delta to change our txn to URL1 */
- SVN_ERR(svn_ra_do_diff3(ra_session,
- &reporter, &reporter_baton,
- loc1->rev,
- target,
- diff_depth,
- ignore_ancestry,
- TRUE, /* text_deltas */
- loc1->url,
- diff_editor, diff_edit_baton,
- scratch_pool));
-
/* Create a txn mirror of path2; the diff editor will print
diffs in reverse. :-) */
SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx, abspath2,
Modified: subversion/branches/ra-git/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_client/diff_local.c?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_client/diff_local.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_client/diff_local.c Tue Oct 11 09:11:50 2016
@@ -179,7 +179,7 @@ inner_dir_diff(const char *left_abspath,
{
svn_error_clear(err);
right_dirents = apr_hash_make(scratch_pool);
- right_only = TRUE;
+ left_only = TRUE;
}
else
SVN_ERR(err);
@@ -669,9 +669,6 @@ svn_client__arbitrary_nodes_diff(const c
SVN_ERR(svn_io_check_resolved_path(left_abspath, &left_kind, scratch_pool));
SVN_ERR(svn_io_check_resolved_path(right_abspath, &right_kind, scratch_pool));
- if (depth == svn_depth_unknown)
- depth = svn_depth_infinity;
-
if (left_kind == svn_node_dir && right_kind == svn_node_dir)
{
left_root_abspath = left_abspath;
Modified: subversion/branches/ra-git/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_client/externals.c?rev=1764214&r1=1764213&r2=1764214&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_client/externals.c Tue Oct 11 09:11:50 2016
@@ -534,7 +534,7 @@ switch_file_external(const char *local_a
SVN_ERR(svn_io_check_path(local_abspath, &disk_kind, scratch_pool));
- if (kind == svn_node_file || kind == svn_node_dir)
+ if (disk_kind == svn_node_file || disk_kind == svn_node_dir)
return svn_error_createf(SVN_ERR_WC_PATH_FOUND, NULL,
_("The file external '%s' can not be "
"created because the node exists."),