Author: stsp
Date: Tue Aug 19 17:26:20 2014
New Revision: 1618906
URL: http://svn.apache.org/r1618906
Log:
Undo the introduction of svn_wc_conflict_description3_t.
Instead of revving svn_wc_conflict_description2_t ("desc2"), we can extend the
struct with a pointer to private data to be accessed via functions.
This approach avoids an unwieldy cascade of changes to callbacks and other API
elements which already use desc2. This commit does not add new private data
or accessor functions for desc2 -- that is future work.
Discussed with philip, julianfoad, rhuijben, and breser.
* subversion/include/private/svn_wc_private.h
(svn_wc__get_tree_conflict, svn_wc__add_tree_conflict): Switch back to desc2.
(svn_wc__cd3_to_cd2, svn_wc__cd3_array_to_cd2_array ): Remove declaration.
* subversion/include/svn_wc.h
(svn_wc_conflict_description_private_t): New typedef.
(svn_wc_conflict_description3_t): Remove.
(svn_wc_conflict_description2_t): Enhance documentation based on improvements
made for desc3. Extend this structure with a pointer to private data.
(svn_wc_conflict_description_create_text3,
svn_wc_conflict_description_create_prop3,
svn_wc_conflict_description_create_tree3,
svn_wc__conflict_description3_dup,
svn_wc_conflict_resolver_func3_t): Un-declare.
(svn_wc_conflict_description_create_text2,
svn_wc_conflict_description_create_prop2,
svn_wc_conflict_description_create_tree2,
svn_wc_conflict_resolver_func2_t): Un-deprecate.
(svn_wc_info_t): Remove 'conflicts2' field.
* subversion/libsvn_client/merge.c
(merge_dir_baton_t): Document that 'new_tree_conflicts' array now has
desc2 elements again.
(record_tree_conflict, merge_file_opened, merge_dir_opened): Use desc2.
* subversion/libsvn_wc/conflicts.c
(local_change_map): Rename back to reason_map for consistency.
(incoming_change_map): Rename back to action_map for consistency.
(svn_wc__conflict_skel_add_tree_conflict,
svn_wc__conflict_read_prop_conflict,
svn_wc__conflict_read_tree_conflict): Rename local_change and
incoming_change parameters back to reason and action for consistency.
(generate_propconflict, resolve_text_conflict, read_text_conflict_desc,
svn_wc__conflict_invoke_resolver, read_prop_conflict_descs,
svn_wc__read_conflicts, conflict_status_walker): Use desc2.
(eval_text_conflict_func_result): Rename 'merged_abspath' parameter back to
'merged_file' for consistency. Use desc2.
* subversion/libsvn_wc/deprecated.c
(svn_wc__status2_from_3): Use desc2.
(svn_wc_conflict_description_create_text2,
svn_wc_conflict_description_create_prop2,
svn_wc_conflict_description_create_tree2): Moved back to libsvn_wc/util.c.
* subversion/libsvn_wc/entries.c
(read_one_entry, write_entry): Use desc2.
* subversion/libsvn_wc/info.c
(svn_wc_info_dup, build_info_for_node, svn_wc__get_info): Use desc2 and drop
support for removed 'conflicts2' member of svn_wc_info_t.
* subversion/libsvn_wc/tree_conflicts.c
(svn_wc__deserialize_conflict, svn_wc__serialize_conflict,
svn_wc__add_tree_conflict, svn_wc__get_tree_conflict): Use desc2.
* subversion/libsvn_wc/tree_conflicts.h
(svn_wc__serialize_conflict,
svn_wc__deserialize_conflict): Tweak declarations for desc2.
* subversion/libsvn_wc/upgrade.c
(read_tree_conflicts, migrate_single_tree_conflict_data,
svn_wc__upgrade_conflict_skel_from_raw): Use desc2.
* subversion/libsvn_wc/util.c
(svn_wc_conflict_description_create_text3,
svn_wc_conflict_description_create_prop3,
svn_wc_conflict_description_create_tree3,
svn_wc__conflict_description3_dup,
svn_wc__cd3_array_to_cd2_array, svn_wc__cd3_to_cd2): Remove.
(svn_wc_conflict_description_create_text2,
svn_wc_conflict_description_create_prop2,
svn_wc_conflict_description_create_tree2): Move back here
from libsvn_wc/deprecated.c
* subversion/libsvn_wc/wc.h
(svn_wc__read_conflicts): Change mention in docstring back to desc2.
* subversion/svn/cl-conflicts.c
(svn_cl__get_human_readable_prop_conflict_description,
svn_cl__get_human_readable_tree_conflict_description,
append_tree_conflict_info_xml, svn_cl__append_conflict_info_xml): Use desc2.
* subversion/svn/cl-conflicts.h
(svn_cl__get_human_readable_prop_conflict_description,
svn_cl__get_human_readable_tree_conflict_description,
svn_cl__append_conflict_info_xml): Change declarations for desc2.
* subversion/svn/cl.h
(svn_cl__conflict_func_interactive): Change declaration back to desc2.
* subversion/svn/conflict-callbacks.c
(show_diff, show_conflicts, merge_prop_conflict, show_prop_conflict,
edit_prop_conflict, handle_text_conflict, handle_prop_conflict,
handle_tree_conflict, handle_obstructed_add,
conflict_func_interactive): Use desc2. In handle_prop_conflict, restore
workaround for wrongly filled in fields in desc2 for now.
* subversion/svn/info-cmd.c
(print_info_xml, print_info): Use desc2.
* subversion/svn/status.c
(print_status): Use desc2.
* subversion/tests/libsvn_wc/conflict-data-test.c
(compare_version, compare_file_content, compare_prop_conflict,
tree_conflict_create, test_deserialize_tree_conflict,
test_read_write_tree_conflicts, test_serialize_tree_conflict): Use desc2.
* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
(raise_tree_conflict): Use desc2.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_wc/conflicts.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/info.c
subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
subversion/trunk/subversion/libsvn_wc/upgrade.c
subversion/trunk/subversion/libsvn_wc/util.c
subversion/trunk/subversion/libsvn_wc/wc.h
subversion/trunk/subversion/svn/cl-conflicts.c
subversion/trunk/subversion/svn/cl-conflicts.h
subversion/trunk/subversion/svn/cl.h
subversion/trunk/subversion/svn/conflict-callbacks.c
subversion/trunk/subversion/svn/info-cmd.c
subversion/trunk/subversion/svn/status.c
subversion/trunk/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/trunk/tools/dev/svnraisetreeconflict/svnraisetreeconflict.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Tue Aug 19
17:26:20 2014
@@ -291,7 +291,7 @@ svn_wc__close_db(const char *external_ab
* use @a scratch_pool for temporary allocations.
*/
svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
svn_wc_context_t *wc_ctx,
const char *victim_abspath,
apr_pool_t *result_pool,
@@ -309,7 +309,7 @@ svn_wc__get_tree_conflict(const svn_wc_c
*/
svn_error_t *
svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *scratch_pool);
/* Remove any tree conflict on victim @a victim_abspath using @a wc_ctx.
@@ -353,26 +353,6 @@ svn_wc__get_wcroot(const char **wcroot_a
*/
/*
- * Convert from svn_wc_conflict_description3_t to
- * svn_wc_conflict_description2_t.
- *
- * Allocate the result in RESULT_POOL.
- */
-svn_wc_conflict_description2_t *
-svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
- apr_pool_t *result_pool);
-
-/*
- * Convert an array of svn_wc_conflict_description3_t * elements to an
- * array of * svn_wc_conflict_description2_t * elements.
- *
- * Allocate the result in RESULT_POOL.
- */
-apr_array_header_t *
-svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
- apr_pool_t *result_pool);
-
-/*
* Convert from svn_wc_conflict_description2_t to
* svn_wc_conflict_description_t. This is needed by some backwards-compat
* code in libsvn_client/ctx.c
Modified: subversion/trunk/subversion/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Tue Aug 19 17:26:20 2014
@@ -1748,6 +1748,11 @@ svn_wc_conflict_version_t *
svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version,
apr_pool_t *pool);
+
+/* Extended conflict information. */
+typedef struct svn_wc_conflict_description_private_t
+ svn_wc_conflict_description_private_t;
+
/** A struct that describes a conflict that has occurred in the
* working copy.
*
@@ -1761,13 +1766,13 @@ svn_wc_conflict_version_dup(const svn_wc
* @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 but should use
- * svn_wc_conflict_description_create_text3() or
- * svn_wc_conflict_description_create_prop3() or
- * svn_wc_conflict_description_create_tree3() instead.
+ * svn_wc_conflict_description_create_text2() or
+ * svn_wc_conflict_description_create_prop2() or
+ * svn_wc_conflict_description_create_tree2() instead.
*
- * @since New in 1.9.
+ * @since New in 1.7.
*/
-typedef struct svn_wc_conflict_description3_t
+typedef struct svn_wc_conflict_description2_t
{
/** The path that is in conflict (for a tree conflict, it is the victim) */
const char *local_abspath;
@@ -1776,7 +1781,7 @@ typedef struct svn_wc_conflict_descripti
* For a tree conflict, this is the node kind of the tree conflict victim.
* For the left/right node kinds of the incoming conflicting change see
* src_left_version->node_kind and src_right_version->node_kind. */
- svn_node_kind_t local_node_kind;
+ svn_node_kind_t node_kind;
/** What sort of conflict are we describing? */
svn_wc_conflict_kind_t kind;
@@ -1797,7 +1802,7 @@ typedef struct svn_wc_conflict_descripti
/** The incoming action being attempted on the conflicted node or property.
* When @c kind is 'text', this action must be 'edit', but generally it can
* be any kind of possible change. */
- svn_wc_conflict_action_t incoming_change;
+ svn_wc_conflict_action_t action;
/** The local change or state of the target node or property, relative
* to its merge-left source, that conflicts with the incoming action.
@@ -1807,110 +1812,6 @@ typedef struct svn_wc_conflict_descripti
* can be local to the target branch of a merge operation, for example,
* and is not necessarily visible in a working copy of the target branch
* at any given revision. */
- svn_wc_conflict_reason_t local_change;
-
- /** If this is text-conflict and involves the merging of two files
- * descended from a common ancestor, here are the paths of up to
- * four fulltext files that can be used to interactively resolve the
- * conflict.
- *
- * @a base_abspath, @a their_abspath and @a my_abspath are absolute
- * paths.
- *
- * All four files will be in repository-normal form -- Standardized LF
- * and contracted keywords. (If any of these files are not available
- * they default to NULL.)
- *
- * On the other hand, if this is a property-conflict, then these
- * paths represent temporary files that contain the three different
- * property-values in conflict. The fourth path (@c merged_file)
- * may or may not be NULL; if set, it represents libsvn_wc's
- * attempt to merge the property values together. (Remember that files
- * and property values are technically binary values, and thus can't
- * always be merged.)
- */
- const char *base_abspath; /* common ancestor of the two files being merged
*/
-
- /** their version of the file */
- const char *their_abspath;
-
- /** my locally-edited version of the file */
- const char *my_abspath;
-
- /** merged version; may contain conflict markers */
- const char *merged_abspath;
-
- /** For property conflicts, the path to the property reject file. */
- const char *prop_reject_abspath;
-
- /** The operation that exposed the conflict.
- * Used only for tree conflicts.
- */
- svn_wc_operation_t operation;
-
- /** Info on the "merge-left source" or "older" version of incoming change. */
- const svn_wc_conflict_version_t *src_left_version;
-
- /** Info on the "merge-right source" or "their" version of incoming change.
*/
- const svn_wc_conflict_version_t *src_right_version;
-
- /* Remember to adjust svn_wc__conflict_description3_dup()
- * if you add new fields to this struct. */
-} svn_wc_conflict_description3_t;
-
-
-/** A struct that describes a conflict that has occurred in the
- * working copy.
- *
- * The conflict described by this structure is one of:
- * - a conflict on the content of the file node @a local_abspath
- * - a conflict on the property @a property_name of @a local_abspath
- * - a tree conflict, of which @a local_abspath is the victim
- * Be aware that the victim of a tree conflict can be a non-existent node.
- * The three kinds of conflict are distinguished by @a kind.
- *
- * @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 but should use
- * svn_wc_conflict_description_create_text2() or
- * svn_wc_conflict_description_create_prop2() or
- * svn_wc_conflict_description_create_tree2() instead.
- *
- * @since New in 1.7.
- * @deprecated Provided for backward compatibility with the 1.8 API.
- */
-typedef struct svn_wc_conflict_description2_t
-{
- /** The path that is in conflict (for a tree conflict, it is the victim) */
- const char *local_abspath;
-
- /** The node type of the path being operated on (for a tree conflict,
- * ### which version?) */
- svn_node_kind_t node_kind;
-
- /** What sort of conflict are we describing? */
- svn_wc_conflict_kind_t kind;
-
- /** The name of the property whose conflict is being described.
- * (Only if @a kind is 'property'; else undefined.) */
- const char *property_name;
-
- /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
- * (Only if @c kind is 'text', else undefined.) */
- svn_boolean_t is_binary;
-
- /** The svn:mime-type property of ('my' version of) @c path, if available,
- * else NULL.
- * (Only if @c kind is 'text', else undefined.) */
- const char *mime_type;
-
- /** The action being attempted on the conflicted node or property.
- * (When @c kind is 'text', this action must be 'edit'.) */
- svn_wc_conflict_action_t action;
-
- /** The state of the target node or property, relative to its merge-left
- * source, that is the reason for the conflict.
- * (When @c kind is 'text', this reason must be 'edited'.) */
svn_wc_conflict_reason_t reason;
/** If this is text-conflict and involves the merging of two files
@@ -1945,7 +1846,8 @@ typedef struct svn_wc_conflict_descripti
/** my locally-edited version of the file */
const char *my_abspath;
- /** merged version; may contain conflict markers */
+ /** merged version; may contain conflict markers
+ * ### For property conflicts, this contains 'their_abspath'. */
const char *merged_file;
/** The operation that exposed the conflict.
@@ -1959,8 +1861,11 @@ typedef struct svn_wc_conflict_descripti
/** Info on the "merge-right source" or "their" version of incoming change.
*/
const svn_wc_conflict_version_t *src_right_version;
- /* Remember to adjust svn_wc_conflict_description2_dup()
- * if you add new fields to this struct. */
+ /* Extended conflict information. */
+ svn_wc_conflict_description_private_t *priv;
+
+ /* Instead of adding new fields here, add new fields to the above
+ * 'priv' structure and provide accesstor functions for them. */
} svn_wc_conflict_description2_t;
@@ -2056,7 +1961,7 @@ typedef struct svn_wc_conflict_descripti
} svn_wc_conflict_description_t;
/**
- * Allocate an #svn_wc_conflict_description3_t structure in @a result_pool,
+ * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
* initialize to represent a text conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
@@ -2068,19 +1973,8 @@ typedef struct svn_wc_conflict_descripti
* @note It is the caller's responsibility to set the other required fields
* (such as the four file names and @c mime_type and @c is_binary).
*
- * @since New in 1.9.
- */
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_text3(const char *local_abspath,
- apr_pool_t *result_pool);
-
-/** Similar to svn_wc_conflict_description_create_text3(), but returns
- * an svn_wc_conflict_description2_t *.
- *
* @since New in 1.7.
- * @deprecated Provided for backward compatibility with the 1.8 API.
*/
-SVN_DEPRECATED
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_text2(const char *local_abspath,
apr_pool_t *result_pool);
@@ -2099,7 +1993,7 @@ svn_wc_conflict_description_create_text(
apr_pool_t *pool);
/**
- * Allocate an #svn_wc_conflict_description3_t structure in @a result_pool,
+ * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
* initialize to represent a property conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
@@ -2110,21 +2004,8 @@ svn_wc_conflict_description_create_text(
* @note: It is the caller's responsibility to set the other required fields
* (such as the four file names and @c action and @c reason).
*
- * @since New in 1.9.
- */
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_prop3(const char *local_abspath,
- svn_node_kind_t node_kind,
- const char *property_name,
- apr_pool_t *result_pool);
-
-/** Similar to svn_wc_conflict_description_create_prop3(), but returns
- * an svn_wc_conflict_description2_t *.
- *
* @since New in 1.7.
- * @deprecated Provided for backward compatibility with the 1.8 API.
*/
-SVN_DEPRECATED
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_prop2(const char *local_abspath,
svn_node_kind_t node_kind,
@@ -2146,7 +2027,7 @@ svn_wc_conflict_description_create_prop(
apr_pool_t *pool);
/**
- * Allocate an #svn_wc_conflict_description_t structure in @a pool,
+ * Allocate an #svn_wc_conflict_description2_t structure in @a pool,
* initialize to represent a tree conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
@@ -2159,24 +2040,8 @@ svn_wc_conflict_description_create_prop(
* @note: It is the caller's responsibility to set the other required fields
* (such as the four file names and @c action and @c reason).
*
- * @since New in 1.9.
- */
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_tree3(
- const char *local_abspath,
- svn_node_kind_t local_node_kind,
- svn_wc_operation_t operation,
- const svn_wc_conflict_version_t *src_left_version,
- const svn_wc_conflict_version_t *src_right_version,
- apr_pool_t *result_pool);
-
-/** Similar to svn_wc_conflict_description_create_tree3(), but returns
- * an svn_wc_conflict_description2_t *.
- *
* @since New in 1.7.
- * @deprecated Provided for backward compatibility with the 1.8 API.
*/
-SVN_DEPRECATED
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_tree2(
const char *local_abspath,
@@ -2208,18 +2073,7 @@ svn_wc_conflict_description_create_tree(
/** Return a duplicate of @a conflict, allocated in @a result_pool.
* A deep copy of all members will be made.
*
- * @since New in 1.9.
- */
-svn_wc_conflict_description3_t *
-svn_wc__conflict_description3_dup(
- const svn_wc_conflict_description3_t *conflict,
- apr_pool_t *result_pool);
-
-
-/** Return a duplicate of @a conflict, allocated in @a result_pool.
- * A deep copy of all members will be made.
- *
- * @since New in 1.9.
+ * @since New in 1.7.
*/
svn_wc_conflict_description2_t *
svn_wc_conflict_description2_dup(
@@ -2231,7 +2085,6 @@ svn_wc_conflict_description2_dup(
* as a private function when it is intended to be a public API.
*
* @since New in 1.7.
- *
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
@@ -2344,21 +2197,7 @@ svn_wc_create_conflict_result(svn_wc_con
* of conflicts are automatically resolvable and which require user
* interaction.
*
- * @since New in 1.9.
- */
-typedef svn_error_t *(*svn_wc_conflict_resolver_func3_t)(
- svn_wc_conflict_result_t **result,
- const svn_wc_conflict_description3_t *description,
- void *baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
-/** Similar to #svn_wc_conflict_resolver_func3_t, but expects an
- * svn_wc_conflict_description2_t description.
- *
* @since New in 1.7.
- * @deprecated Provided for backward compatibility with the 1.8 API.
*/
typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
svn_wc_conflict_result_t **result,
@@ -3375,11 +3214,6 @@ typedef struct svn_wc_info_t
/** The path the node was moved to, if it was moved away. Else NULL.
* @since New in 1.8. */
const char *moved_to_abspath;
-
- /** Array of const svn_wc_conflict_description3_t * which contains info
- * on any conflict of which this node is a victim. Otherwise NULL.
- * @since New in 1.9. */
- const apr_array_header_t *conflicts2;
} svn_wc_info_t;
/**
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Aug 19 17:26:20 2014
@@ -1208,7 +1208,7 @@ struct merge_dir_baton_t
apr_hash_t *pending_deletes;
/* NULL, or an hashtable mapping const char * LOCAL_ABSPATHs to
- a const svn_wc_conflict_description3_t * instance, describing the just
+ a const svn_wc_conflict_description2_t * instance, describing the just
installed conflict */
apr_hash_t *new_tree_conflicts;
@@ -1314,7 +1314,7 @@ record_tree_conflict(merge_cmd_baton_t *
svn_node_kind_t merge_right_node_kind,
svn_wc_conflict_action_t action,
svn_wc_conflict_reason_t reason,
- const svn_wc_conflict_description3_t *existing_conflict,
+ const svn_wc_conflict_description2_t *existing_conflict,
svn_boolean_t notify_tc,
apr_pool_t *scratch_pool)
{
@@ -1334,7 +1334,7 @@ record_tree_conflict(merge_cmd_baton_t *
if (!merge_b->dry_run)
{
- svn_wc_conflict_description3_t *conflict;
+ svn_wc_conflict_description2_t *conflict;
const svn_wc_conflict_version_t *left;
const svn_wc_conflict_version_t *right;
apr_pool_t *result_pool = parent_baton ? parent_baton->pool
@@ -1375,13 +1375,13 @@ record_tree_conflict(merge_cmd_baton_t *
if (existing_conflict != NULL && existing_conflict->src_left_version)
left = existing_conflict->src_left_version;
- conflict = svn_wc_conflict_description_create_tree3(
+ conflict = svn_wc_conflict_description_create_tree2(
local_abspath, local_node_kind,
svn_wc_operation_merge,
left, right, result_pool);
- conflict->incoming_change = action;
- conflict->local_change = reason;
+ conflict->action = action;
+ conflict->reason = reason;
/* May return SVN_ERR_WC_PATH_UNEXPECTED_STATUS */
if (existing_conflict)
@@ -1882,7 +1882,7 @@ merge_file_opened(void **new_file_baton,
}
else
{
- const svn_wc_conflict_description3_t *old_tc = NULL;
+ const svn_wc_conflict_description2_t *old_tc = NULL;
/* The node doesn't exist pre-merge: We have an addition */
fb->added = TRUE;
@@ -1902,11 +1902,11 @@ merge_file_opened(void **new_file_baton,
&& (old_tc = svn_hash_gets(pdb->new_tree_conflicts, local_abspath)))
{
fb->tree_conflict_action = svn_wc_conflict_action_replace;
- fb->tree_conflict_reason = old_tc->local_change;
+ fb->tree_conflict_reason = old_tc->reason;
/* Update the tree conflict to store that this is a replace */
SVN_ERR(record_tree_conflict(merge_b, local_abspath, pdb,
- old_tc->local_node_kind,
+ old_tc->node_kind,
old_tc->src_left_version->node_kind,
svn_node_file,
fb->tree_conflict_action,
@@ -1914,8 +1914,8 @@ merge_file_opened(void **new_file_baton,
old_tc, FALSE,
scratch_pool));
- if (old_tc->local_change == svn_wc_conflict_reason_deleted
- || old_tc->local_change == svn_wc_conflict_reason_moved_away)
+ if (old_tc->reason == svn_wc_conflict_reason_deleted
+ || old_tc->reason == svn_wc_conflict_reason_moved_away)
{
/* Issue #3806: Incoming replacements on local deletes produce
inconsistent result.
@@ -2672,7 +2672,7 @@ merge_dir_opened(void **new_dir_baton,
}
else
{
- const svn_wc_conflict_description3_t *old_tc = NULL;
+ const svn_wc_conflict_description2_t *old_tc = NULL;
/* The node doesn't exist pre-merge: We have an addition */
db->added = TRUE;
@@ -2692,10 +2692,10 @@ merge_dir_opened(void **new_dir_baton,
&& (old_tc = svn_hash_gets(pdb->new_tree_conflicts, local_abspath)))
{
db->tree_conflict_action = svn_wc_conflict_action_replace;
- db->tree_conflict_reason = old_tc->local_change;
+ db->tree_conflict_reason = old_tc->reason;
- if (old_tc->local_change == svn_wc_conflict_reason_deleted
- || old_tc->local_change == svn_wc_conflict_reason_moved_away)
+ if (old_tc->reason == svn_wc_conflict_reason_deleted
+ || old_tc->reason == svn_wc_conflict_reason_moved_away)
{
/* Issue #3806: Incoming replacements on local deletes produce
inconsistent result.
@@ -2710,7 +2710,7 @@ merge_dir_opened(void **new_dir_baton,
/* Update the tree conflict to store that this is a replace */
SVN_ERR(record_tree_conflict(merge_b, local_abspath, pdb,
- old_tc->local_node_kind,
+ old_tc->node_kind,
old_tc->src_left_version->node_kind,
svn_node_dir,
db->tree_conflict_action,
@@ -2842,7 +2842,7 @@ merge_dir_opened(void **new_dir_baton,
{
/* ### Should be atomic with svn_wc_add(4|_from_disk2)() */
SVN_ERR(record_tree_conflict(merge_b, local_abspath, pdb,
- old_tc->local_node_kind,
+ old_tc->node_kind,
svn_node_none,
svn_node_dir,
db->tree_conflict_action,
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Tue Aug 19 17:26:20 2014
@@ -508,7 +508,7 @@ svn_wc__conflict_skel_add_prop_conflict(
}
/* A map for svn_wc_conflict_reason_t values. */
-static const svn_token_map_t local_change_map[] =
+static const svn_token_map_t reason_map[] =
{
{ "edited", svn_wc_conflict_reason_edited },
{ "obstructed", svn_wc_conflict_reason_obstructed },
@@ -522,7 +522,7 @@ static const svn_token_map_t local_chang
{ NULL }
};
-static const svn_token_map_t incoming_change_map[] =
+static const svn_token_map_t action_map[] =
{
{ "edited", svn_wc_conflict_action_edit },
{ "added", svn_wc_conflict_action_add },
@@ -535,8 +535,8 @@ svn_error_t *
svn_wc__conflict_skel_add_tree_conflict(svn_skel_t *conflict_skel,
svn_wc__db_t *db,
const char *wri_abspath,
- svn_wc_conflict_reason_t local_change,
- svn_wc_conflict_action_t
incoming_change,
+ svn_wc_conflict_reason_t reason,
+ svn_wc_conflict_action_t action,
const char *move_src_op_root_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -549,12 +549,12 @@ svn_wc__conflict_skel_add_tree_conflict(
SVN_ERR_ASSERT(!tree_conflict); /* ### Use proper error? */
- SVN_ERR_ASSERT(local_change == svn_wc_conflict_reason_moved_away
+ SVN_ERR_ASSERT(reason == svn_wc_conflict_reason_moved_away
|| !move_src_op_root_abspath); /* ### Use proper error? */
tree_conflict = svn_skel__make_empty_list(result_pool);
- if (local_change == svn_wc_conflict_reason_moved_away
+ if (reason == svn_wc_conflict_reason_moved_away
&& move_src_op_root_abspath)
{
const char *move_src_op_root_relpath;
@@ -568,13 +568,11 @@ svn_wc__conflict_skel_add_tree_conflict(
result_pool);
}
- svn_skel__prepend_str(
- svn_token__to_word(incoming_change_map, incoming_change),
- tree_conflict, result_pool);
-
- svn_skel__prepend_str(
- svn_token__to_word(local_change_map, local_change),
- tree_conflict, result_pool);
+ svn_skel__prepend_str(svn_token__to_word(action_map, action),
+ tree_conflict, result_pool);
+
+ svn_skel__prepend_str(svn_token__to_word(reason_map, reason),
+ tree_conflict, result_pool);
/* Tree conflicts have no marker files */
markers = svn_skel__make_empty_list(result_pool);
@@ -930,8 +928,8 @@ svn_wc__conflict_read_prop_conflict(cons
}
svn_error_t *
-svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *local_change,
- svn_wc_conflict_action_t *incoming_change,
+svn_wc__conflict_read_tree_conflict(svn_wc_conflict_reason_t *reason,
+ svn_wc_conflict_action_t *action,
const char **move_src_op_root_abspath,
svn_wc__db_t *db,
const char *wri_abspath,
@@ -956,28 +954,28 @@ svn_wc__conflict_read_tree_conflict(svn_
c = c->next; /* Skip markers */
{
- int value = svn_token__from_mem(local_change_map, c->data, c->len);
+ int value = svn_token__from_mem(reason_map, c->data, c->len);
- if (local_change)
+ if (reason)
{
if (value != SVN_TOKEN_UNKNOWN)
- *local_change = value;
+ *reason = value;
else
- *local_change = svn_wc_conflict_reason_edited;
+ *reason = svn_wc_conflict_reason_edited;
}
is_moved_away = (value == svn_wc_conflict_reason_moved_away);
}
c = c->next;
- if (incoming_change)
+ if (action)
{
- int value = svn_token__from_mem(incoming_change_map, c->data, c->len);
+ int value = svn_token__from_mem(action_map, c->data, c->len);
if (value != SVN_TOKEN_UNKNOWN)
- *incoming_change = value;
+ *action = value;
else
- *incoming_change = svn_wc_conflict_action_edit;
+ *action = svn_wc_conflict_action_edit;
}
c = c->next;
@@ -1278,7 +1276,7 @@ generate_propconflict(svn_boolean_t *con
apr_pool_t *scratch_pool)
{
svn_wc_conflict_result_t *result = NULL;
- svn_wc_conflict_description3_t *cdesc;
+ svn_wc_conflict_description2_t *cdesc;
const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
svn_node_kind_t kind;
const svn_string_t *new_value = NULL;
@@ -1295,7 +1293,7 @@ generate_propconflict(svn_boolean_t *con
svn_dirent_local_style(local_abspath,
scratch_pool));
- cdesc = svn_wc_conflict_description_create_prop3(
+ cdesc = svn_wc_conflict_description_create_prop2(
local_abspath,
(kind == svn_node_dir) ? svn_node_dir : svn_node_file,
propname, scratch_pool);
@@ -1324,7 +1322,10 @@ generate_propconflict(svn_boolean_t *con
incoming_new_val->len,
svn_io_file_del_on_pool_cleanup,
scratch_pool));
- cdesc->their_abspath = svn_dirent_join(dirpath, file_name, scratch_pool);
+
+ /* ### For property conflicts, cd2 stores prop_reject_abspath in
+ * ### their_abspath, and stores theirs_abspath in merged_file. */
+ cdesc->merged_file = svn_dirent_join(dirpath, file_name, scratch_pool);
}
if (!base_val && !incoming_old_val)
@@ -1397,8 +1398,9 @@ generate_propconflict(svn_boolean_t *con
svn_diff_file_options_t *options =
svn_diff_file_options_create(scratch_pool);
- SVN_ERR(svn_stream_open_unique(&mergestream,
- &cdesc->prop_reject_abspath,
+ /* ### For property conflicts, cd2 stores prop_reject_abspath in
+ * ### their_abspath, and stores theirs_abspath in merged_file. */
+ SVN_ERR(svn_stream_open_unique(&mergestream, &cdesc->their_abspath,
NULL, svn_io_file_del_on_pool_cleanup,
scratch_pool, scratch_pool));
SVN_ERR(svn_diff_mem_string_diff3(&diff, conflict_base_val,
@@ -1414,22 +1416,22 @@ generate_propconflict(svn_boolean_t *con
}
if (!incoming_old_val && incoming_new_val)
- cdesc->incoming_change = svn_wc_conflict_action_add;
+ cdesc->action = svn_wc_conflict_action_add;
else if (incoming_old_val && !incoming_new_val)
- cdesc->incoming_change = svn_wc_conflict_action_delete;
+ cdesc->action = svn_wc_conflict_action_delete;
else
- cdesc->incoming_change = svn_wc_conflict_action_edit;
+ cdesc->action = svn_wc_conflict_action_edit;
if (base_val && !working_val)
- cdesc->local_change = svn_wc_conflict_reason_deleted;
+ cdesc->reason = svn_wc_conflict_reason_deleted;
else if (!base_val && working_val)
- cdesc->local_change = svn_wc_conflict_reason_obstructed;
+ cdesc->reason = svn_wc_conflict_reason_obstructed;
else
- cdesc->local_change = svn_wc_conflict_reason_edited;
+ cdesc->reason = svn_wc_conflict_reason_edited;
/* Invoke the interactive conflict callback. */
- SVN_ERR(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
- conflict_baton, scratch_pool, scratch_pool));
+ SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+ scratch_pool));
if (result == NULL)
{
*conflict_remains = TRUE;
@@ -1475,7 +1477,7 @@ generate_propconflict(svn_boolean_t *con
{
svn_stringbuf_t *merged_stringbuf;
- if (!cdesc->merged_abspath && !result->merged_file)
+ if (!cdesc->merged_file && !result->merged_file)
return svn_error_create
(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
NULL, _("Conflict callback violated API:"
@@ -1484,7 +1486,7 @@ generate_propconflict(svn_boolean_t *con
SVN_ERR(svn_stringbuf_from_file2(&merged_stringbuf,
result->merged_file ?
result->merged_file :
- cdesc->merged_abspath,
+ cdesc->merged_file,
scratch_pool));
new_value = svn_stringbuf__morph_into_string(merged_stringbuf);
*conflict_remains = FALSE;
@@ -1608,7 +1610,7 @@ eval_text_conflict_func_result(svn_skel_
const apr_array_header_t *merge_options,
const char *left_abspath,
const char *right_abspath,
- const char *merged_abspath,
+ const char *merged_file,
const char *detranslated_target,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -1673,7 +1675,7 @@ eval_text_conflict_func_result(svn_skel_
good to use". */
case svn_wc_conflict_choose_merged:
{
- install_from_abspath = merged_abspath;
+ install_from_abspath = merged_file;
*is_resolved = TRUE;
break;
}
@@ -1785,7 +1787,7 @@ resolve_text_conflict(svn_skel_t **work_
svn_boolean_t *was_resolved,
svn_wc__db_t *db,
const char *local_abspath,
- svn_wc_conflict_description3_t *cdesc,
+ svn_wc_conflict_description2_t *cdesc,
const apr_array_header_t *merge_options,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
@@ -1803,8 +1805,8 @@ resolve_text_conflict(svn_skel_t **work_
/* Give the conflict resolution callback a chance to clean
up the conflicts before we mark the file 'conflicted' */
- SVN_ERR(conflict_func(&result, svn_wc__cd3_to_cd2(cdesc, scratch_pool),
- conflict_baton, scratch_pool, scratch_pool));
+ SVN_ERR(conflict_func(&result, cdesc, conflict_baton, scratch_pool,
+ scratch_pool));
if (result == NULL)
return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL,
_("Conflict callback violated API:"
@@ -1818,7 +1820,7 @@ resolve_text_conflict(svn_skel_t **work_
merged-file first: */
result->merged_file
? result->merged_file
- : cdesc->merged_abspath,
+ : cdesc->merged_file,
result_pool, scratch_pool));
}
@@ -1834,7 +1836,7 @@ resolve_text_conflict(svn_skel_t **work_
/* ### Sure this is an abspath? */
result->merged_file
? result->merged_file
- : cdesc->merged_abspath,
+ : cdesc->merged_file,
cdesc->my_abspath,
cancel_func, cancel_baton,
result_pool, scratch_pool));
@@ -1858,7 +1860,7 @@ resolve_text_conflict(svn_skel_t **work_
* Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
* allocations. */
static svn_error_t *
-read_text_conflict_desc(svn_wc_conflict_description3_t **desc,
+read_text_conflict_desc(svn_wc_conflict_description2_t **desc,
svn_wc__db_t *db,
const char *local_abspath,
const svn_skel_t *conflict_skel,
@@ -1870,7 +1872,7 @@ read_text_conflict_desc(svn_wc_conflict_
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- *desc = svn_wc_conflict_description_create_text3(local_abspath, result_pool);
+ *desc = svn_wc_conflict_description_create_text2(local_abspath, result_pool);
(*desc)->is_binary = is_binary;
(*desc)->mime_type = mime_type;
(*desc)->operation = operation;
@@ -1883,7 +1885,7 @@ read_text_conflict_desc(svn_wc_conflict_
db, local_abspath,
conflict_skel,
result_pool, scratch_pool));
- (*desc)->merged_abspath = apr_pstrdup(result_pool, local_abspath);
+ (*desc)->merged_file = apr_pstrdup(result_pool, local_abspath);
return SVN_NO_ERROR;
}
@@ -1898,7 +1900,7 @@ read_text_conflict_desc(svn_wc_conflict_
* Allocate results in RESULT_POOL. SCRATCH_POOL is used for temporary
* allocations. */
static svn_error_t *
-read_tree_conflict_desc(svn_wc_conflict_description3_t **desc,
+read_tree_conflict_desc(svn_wc_conflict_description2_t **desc,
svn_wc__db_t *db,
const char *local_abspath,
const svn_skel_t *conflict_skel,
@@ -1909,11 +1911,11 @@ read_tree_conflict_desc(svn_wc_conflict_
apr_pool_t *scratch_pool)
{
svn_node_kind_t tc_kind;
- svn_wc_conflict_reason_t local_change;
- svn_wc_conflict_action_t incoming_change;
+ svn_wc_conflict_reason_t reason;
+ svn_wc_conflict_action_t action;
SVN_ERR(svn_wc__conflict_read_tree_conflict(
- &local_change, &incoming_change, NULL,
+ &reason, &action, NULL,
db, local_abspath, conflict_skel, scratch_pool, scratch_pool));
if (left_version)
@@ -1923,12 +1925,12 @@ read_tree_conflict_desc(svn_wc_conflict_
else
tc_kind = svn_node_file; /* Avoid assertion */
- *desc = svn_wc_conflict_description_create_tree3(local_abspath, tc_kind,
+ *desc = svn_wc_conflict_description_create_tree2(local_abspath, tc_kind,
operation,
left_version, right_version,
result_pool);
- (*desc)->local_change = local_change;
- (*desc)->incoming_change = incoming_change;
+ (*desc)->reason = reason;
+ (*desc)->action = action;
return SVN_NO_ERROR;
}
@@ -2050,7 +2052,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
{
svn_skel_t *work_items;
svn_boolean_t was_resolved;
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
apr_hash_t *props;
SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
@@ -2090,7 +2092,7 @@ svn_wc__conflict_invoke_resolver(svn_wc_
if (tree_conflicted)
{
svn_wc_conflict_result_t *result;
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
SVN_ERR(read_tree_conflict_desc(&desc,
db, local_abspath, conflict_skel,
@@ -2098,8 +2100,8 @@ svn_wc__conflict_invoke_resolver(svn_wc_
scratch_pool, scratch_pool));
/* Tell the resolver func about this conflict. */
- SVN_ERR(resolver_func(&result, svn_wc__cd3_to_cd2(desc, scratch_pool),
- resolver_baton, scratch_pool, scratch_pool));
+ SVN_ERR(resolver_func(&result, desc, resolver_baton, scratch_pool,
+ scratch_pool));
/* Ignore the result. We cannot apply it here since this code runs
* during an update or merge operation. Tree conflicts are always
@@ -2155,19 +2157,21 @@ read_prop_conflict_descs(apr_array_heade
if ((! create_tempfiles) || apr_hash_count(conflicted_props) == 0)
{
/* Legacy prop conflict with only a .reject file. */
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
- desc = svn_wc_conflict_description_create_prop3(local_abspath,
+ desc = svn_wc_conflict_description_create_prop2(local_abspath,
node_kind,
"", result_pool);
- desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+ /* ### For property conflicts, cd2 stores prop_reject_abspath in
+ * ### their_abspath, and stores theirs_abspath in merged_file. */
+ desc->their_abspath = apr_pstrdup(result_pool, prop_reject_file);
desc->operation = operation;
desc->src_left_version = left_version;
desc->src_right_version = right_version;
- APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
+ APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t *) = desc;
return SVN_NO_ERROR;
}
@@ -2181,11 +2185,11 @@ read_prop_conflict_descs(apr_array_heade
svn_string_t *old_value;
svn_string_t *my_value;
svn_string_t *their_value;
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
svn_pool_clear(iterpool);
- desc = svn_wc_conflict_description_create_prop3(local_abspath,
+ desc = svn_wc_conflict_description_create_prop2(local_abspath,
node_kind,
propname,
result_pool);
@@ -2202,21 +2206,23 @@ read_prop_conflict_descs(apr_array_heade
/* Compute the incoming side of the conflict ('action'). */
if (their_value == NULL)
- desc->incoming_change = svn_wc_conflict_action_delete;
+ desc->action = svn_wc_conflict_action_delete;
else if (old_value == NULL)
- desc->incoming_change = svn_wc_conflict_action_add;
+ desc->action = svn_wc_conflict_action_add;
else
- desc->incoming_change = svn_wc_conflict_action_edit;
+ desc->action = svn_wc_conflict_action_edit;
/* Compute the local side of the conflict ('reason'). */
if (my_value == NULL)
- desc->local_change = svn_wc_conflict_reason_deleted;
+ desc->reason = svn_wc_conflict_reason_deleted;
else if (old_value == NULL)
- desc->local_change = svn_wc_conflict_reason_added;
+ desc->reason = svn_wc_conflict_reason_added;
else
- desc->local_change = svn_wc_conflict_reason_edited;
+ desc->reason = svn_wc_conflict_reason_edited;
- desc->prop_reject_abspath = apr_pstrdup(result_pool, prop_reject_file);
+ /* ### For property conflicts, cd2 stores prop_reject_abspath in
+ * ### their_abspath, and stores theirs_abspath in merged_file. */
+ desc->their_abspath = apr_pstrdup(result_pool, prop_reject_file);
/* ### This should be changed. The conflict description for
* ### props should contain these values as svn_string_t,
@@ -2240,7 +2246,9 @@ read_prop_conflict_descs(apr_array_heade
svn_stream_t *s;
apr_size_t len;
- SVN_ERR(svn_stream_open_unique(&s, &desc->their_abspath, NULL,
+ /* ### For property conflicts, cd2 stores prop_reject_abspath in
+ * ### their_abspath, and stores theirs_abspath in merged_file. */
+ SVN_ERR(svn_stream_open_unique(&s, &desc->merged_file, NULL,
svn_io_file_del_on_pool_cleanup,
result_pool, iterpool));
len = their_value->len;
@@ -2261,7 +2269,7 @@ read_prop_conflict_descs(apr_array_heade
SVN_ERR(svn_stream_close(s));
}
- APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description3_t *) = desc;
+ APR_ARRAY_PUSH(conflicts, svn_wc_conflict_description2_t *) = desc;
}
svn_pool_destroy(iterpool);
@@ -2293,7 +2301,7 @@ svn_wc__read_conflicts(const apr_array_h
{
/* Some callers expect not NULL */
*conflicts = apr_array_make(result_pool, 0,
- sizeof(svn_wc_conflict_description3_t *));;
+ sizeof(svn_wc_conflict_description2_t *));;
return SVN_NO_ERROR;
}
@@ -2303,7 +2311,7 @@ svn_wc__read_conflicts(const apr_array_h
result_pool, scratch_pool));
cflcts = apr_array_make(result_pool, 4,
- sizeof(svn_wc_conflict_description3_t *));
+ sizeof(svn_wc_conflict_description2_t *));
if (locations && locations->nelts > 0)
left_version = APR_ARRAY_IDX(locations, 0, const svn_wc_conflict_version_t
*);
@@ -2324,26 +2332,26 @@ svn_wc__read_conflicts(const apr_array_h
if (text_conflicted)
{
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
SVN_ERR(read_text_conflict_desc(&desc,
db, local_abspath, conflict_skel,
FALSE /*is_binary*/, NULL /*mime_type*/,
operation, left_version, right_version,
result_pool, scratch_pool));
- APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description3_t *) = desc;
+ APR_ARRAY_PUSH(cflcts, svn_wc_conflict_description2_t *) = desc;
}
if (tree_conflicted)
{
- svn_wc_conflict_description3_t *desc;
+ svn_wc_conflict_description2_t *desc;
SVN_ERR(read_tree_conflict_desc(&desc,
db, local_abspath, conflict_skel,
operation, left_version, right_version,
result_pool, scratch_pool));
- APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description3_t *) = desc;
+ APR_ARRAY_PUSH(cflcts, const svn_wc_conflict_description2_t *) = desc;
}
*conflicts = cflcts;
@@ -2980,12 +2988,12 @@ conflict_status_walker(void *baton,
for (i = 0; i < conflicts->nelts; i++)
{
- const svn_wc_conflict_description3_t *cd;
+ const svn_wc_conflict_description2_t *cd;
svn_boolean_t did_resolve;
svn_wc_conflict_choice_t my_choice = cswb->conflict_choice;
const char *merged_file = NULL;
- cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description3_t *);
+ cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *);
svn_pool_clear(iterpool);
@@ -2998,9 +3006,7 @@ conflict_status_walker(void *baton,
_("No conflict-callback and no "
"pre-defined conflict-choice provided"));
- SVN_ERR(cswb->conflict_func(&result,
- svn_wc__cd3_to_cd2(cd, scratch_pool),
- cswb->conflict_baton,
+ SVN_ERR(cswb->conflict_func(&result, cd, cswb->conflict_baton,
iterpool, iterpool));
my_choice = result->choice;
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Aug 19 17:26:20 2014
@@ -2735,12 +2735,8 @@ svn_wc__status2_from_3(svn_wc_status2_t
if (old_status->conflicted)
{
- const svn_wc_conflict_description3_t *tree_conflict;
- const svn_wc_conflict_description2_t *tree_conflict2;
- SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, wc_ctx, local_abspath,
+ SVN_ERR(svn_wc__get_tree_conflict(&(*status)->tree_conflict, wc_ctx,
local_abspath,
scratch_pool, scratch_pool));
- tree_conflict2 = svn_wc__cd3_to_cd2(tree_conflict, scratch_pool);
- (*status)->tree_conflict = svn_wc__cd2_to_cd(tree_conflict2,
result_pool);
}
(*status)->switched = old_status->switched;
@@ -4791,66 +4787,6 @@ svn_wc_read_kind(svn_node_kind_t *kind,
}
svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_text2(const char *local_abspath,
- apr_pool_t *result_pool)
-{
- svn_wc_conflict_description2_t *conflict;
-
- SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
- conflict = apr_pcalloc(result_pool, sizeof(*conflict));
- conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->node_kind = svn_node_file;
- conflict->kind = svn_wc_conflict_kind_text;
- conflict->action = svn_wc_conflict_action_edit;
- conflict->reason = svn_wc_conflict_reason_edited;
- return conflict;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_prop2(const char *local_abspath,
- svn_node_kind_t node_kind,
- const char *property_name,
- apr_pool_t *result_pool)
-{
- svn_wc_conflict_description2_t *conflict;
-
- SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
- conflict = apr_pcalloc(result_pool, sizeof(*conflict));
- conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->node_kind = node_kind;
- conflict->kind = svn_wc_conflict_kind_property;
- conflict->property_name = apr_pstrdup(result_pool, property_name);
- return conflict;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc_conflict_description_create_tree2(
- const char *local_abspath,
- svn_node_kind_t node_kind,
- svn_wc_operation_t operation,
- const svn_wc_conflict_version_t *src_left_version,
- const svn_wc_conflict_version_t *src_right_version,
- apr_pool_t *result_pool)
-{
- svn_wc_conflict_description2_t *conflict;
-
- SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
-
- conflict = apr_pcalloc(result_pool, sizeof(*conflict));
- conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->node_kind = node_kind;
- conflict->kind = svn_wc_conflict_kind_tree;
- conflict->operation = operation;
- conflict->src_left_version = svn_wc_conflict_version_dup(src_left_version,
- result_pool);
- conflict->src_right_version = svn_wc_conflict_version_dup(src_right_version,
- result_pool);
- return conflict;
-}
-
-svn_wc_conflict_description2_t *
svn_wc__conflict_description2_dup(const svn_wc_conflict_description2_t
*conflict,
apr_pool_t *pool)
{
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Tue Aug 19 17:26:20 2014
@@ -464,9 +464,9 @@ read_one_entry(const svn_wc_entry_t **ne
for (j = 0; j < child_conflicts->nelts; j++)
{
- const svn_wc_conflict_description3_t *conflict =
+ const svn_wc_conflict_description2_t *conflict =
APR_ARRAY_IDX(child_conflicts, j,
- svn_wc_conflict_description3_t *);
+ svn_wc_conflict_description2_t *);
if (conflict->kind == svn_wc_conflict_kind_tree)
{
@@ -1894,13 +1894,13 @@ write_entry(struct write_baton **entry_n
skel = skel->children;
while (skel)
{
- svn_wc_conflict_description3_t *conflict;
+ svn_wc_conflict_description2_t *conflict;
svn_skel_t *new_skel;
const char *key;
/* *CONFLICT is allocated so it is safe to use a non-const pointer */
SVN_ERR(svn_wc__deserialize_conflict(
- (const svn_wc_conflict_description3_t**)&conflict,
+ (const svn_wc_conflict_description2_t**)&conflict,
skel,
svn_dirent_join(root_abspath,
local_relpath,
@@ -1911,7 +1911,7 @@ write_entry(struct write_baton **entry_n
/* Fix dubious data stored by old clients, local adds don't have
a repository URL. */
- if (conflict->local_change == svn_wc_conflict_reason_added)
+ if (conflict->reason == svn_wc_conflict_reason_added)
conflict->src_left_version = NULL;
SVN_ERR(svn_wc__serialize_conflict(&new_skel, conflict,
Modified: subversion/trunk/subversion/libsvn_wc/info.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/info.c (original)
+++ subversion/trunk/subversion/libsvn_wc/info.c Tue Aug 19 17:26:20 2014
@@ -67,22 +67,6 @@ svn_wc_info_dup(const svn_wc_info_t *inf
new_info->moved_from_abspath = apr_pstrdup(pool, info->moved_from_abspath);
if (info->moved_to_abspath)
new_info->moved_to_abspath = apr_pstrdup(pool, info->moved_to_abspath);
- if (info->conflicts2)
- {
- int i;
-
- apr_array_header_t *new_conflicts
- = apr_array_make(pool, info->conflicts2->nelts,
info->conflicts2->elt_size);
- for (i = 0; i < info->conflicts2->nelts; i++)
- {
- APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description3_t *)
- = svn_wc__conflict_description3_dup(
- APR_ARRAY_IDX(info->conflicts2, i,
- const svn_wc_conflict_description3_t *),
- pool);
- }
- new_info->conflicts2 = new_conflicts;
- }
return new_info;
}
@@ -326,22 +310,12 @@ build_info_for_node(svn_wc__info2_t **in
local_abspath, result_pool, scratch_pool));
if (conflicted)
- {
- const apr_array_header_t *conflicts;
-
- SVN_ERR(svn_wc__read_conflicts(&conflicts, db,
- local_abspath,
- TRUE /* ### create tempfiles */,
- result_pool, scratch_pool));
- wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
- result_pool);
- wc_info->conflicts2 = conflicts;
- }
+ SVN_ERR(svn_wc__read_conflicts(&wc_info->conflicts, db,
+ local_abspath,
+ TRUE /* ### create tempfiles */,
+ result_pool, scratch_pool));
else
- {
- wc_info->conflicts = NULL;
- wc_info->conflicts2 = NULL;
- }
+ wc_info->conflicts = NULL;
/* lock stuff */
if (lock != NULL)
@@ -560,7 +534,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
hi = apr_hash_next(hi))
{
const char *this_abspath = apr_hash_this_key(hi);
- const svn_wc_conflict_description3_t *tree_conflict;
+ const svn_wc_conflict_description2_t *tree_conflict;
svn_wc__info2_t *info;
const apr_array_header_t *conflicts;
@@ -592,15 +566,13 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
continue;
tree_conflict = APR_ARRAY_IDX(conflicts, 0,
- const svn_wc_conflict_description3_t *);
+ const svn_wc_conflict_description2_t *);
if (!depth_includes(local_abspath, depth, tree_conflict->local_abspath,
- tree_conflict->local_node_kind, iterpool))
+ tree_conflict->node_kind, iterpool))
continue;
- info->wc_info->conflicts = svn_wc__cd3_array_to_cd2_array(conflicts,
- iterpool);
- info->wc_info->conflicts2 = conflicts;
+ info->wc_info->conflicts = conflicts;
SVN_ERR(receiver(receiver_baton, this_abspath, info, iterpool));
}
svn_pool_destroy(iterpool);
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.c Tue Aug 19 17:26:20
2014
@@ -196,7 +196,7 @@ read_node_version_info(const svn_wc_conf
svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
const svn_skel_t *skel,
const char *dir_path,
apr_pool_t *result_pool,
@@ -211,7 +211,7 @@ svn_wc__deserialize_conflict(const svn_w
const svn_wc_conflict_version_t *src_left_version;
const svn_wc_conflict_version_t *src_right_version;
int n;
- svn_wc_conflict_description3_t *new_conflict;
+ svn_wc_conflict_description2_t *new_conflict;
if (!is_valid_conflict_skel(skel))
return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
@@ -266,11 +266,11 @@ svn_wc__deserialize_conflict(const svn_w
SVN_ERR(read_node_version_info(&src_right_version, skel->next,
result_pool, scratch_pool));
- new_conflict = svn_wc_conflict_description_create_tree3(victim_abspath,
+ new_conflict = svn_wc_conflict_description_create_tree2(victim_abspath,
node_kind, operation, src_left_version, src_right_version,
result_pool);
- new_conflict->incoming_change = action;
- new_conflict->local_change = reason;
+ new_conflict->action = action;
+ new_conflict->reason = reason;
*conflict = new_conflict;
@@ -329,7 +329,7 @@ prepend_version_info_skel(svn_skel_t *pa
svn_error_t *
svn_wc__serialize_conflict(svn_skel_t **skel,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -355,21 +355,21 @@ svn_wc__serialize_conflict(svn_skel_t **
/* local change */
skel_prepend_enum(c_skel, svn_wc__conflict_reason_map,
- conflict->local_change, result_pool);
+ conflict->reason, result_pool);
/* incoming change */
skel_prepend_enum(c_skel, svn_wc__conflict_action_map,
- conflict->incoming_change, result_pool);
+ conflict->action, result_pool);
/* operation */
skel_prepend_enum(c_skel, svn_wc__operation_map, conflict->operation,
result_pool);
/* node_kind */
- SVN_ERR_ASSERT(conflict->local_node_kind == svn_node_dir
- || conflict->local_node_kind == svn_node_file
- || conflict->local_node_kind == svn_node_none);
- skel_prepend_enum(c_skel, node_kind_map, conflict->local_node_kind,
+ SVN_ERR_ASSERT(conflict->node_kind == svn_node_dir
+ || conflict->node_kind == svn_node_file
+ || conflict->node_kind == svn_node_none);
+ skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind,
result_pool);
/* Victim path (escaping separator chars). */
@@ -403,7 +403,7 @@ svn_wc__del_tree_conflict(svn_wc_context
svn_error_t *
svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *scratch_pool)
{
svn_boolean_t existing_conflict;
@@ -412,8 +412,8 @@ svn_wc__add_tree_conflict(svn_wc_context
SVN_ERR_ASSERT(conflict != NULL);
SVN_ERR_ASSERT(conflict->operation == svn_wc_operation_merge ||
- (conflict->local_change != svn_wc_conflict_reason_moved_away
&&
- conflict->local_change !=
svn_wc_conflict_reason_moved_here));
+ (conflict->reason != svn_wc_conflict_reason_moved_away &&
+ conflict->reason != svn_wc_conflict_reason_moved_here));
/* Re-adding an existing tree conflict victim is an error. */
err = svn_wc__internal_conflicted_p(NULL, NULL, &existing_conflict,
@@ -439,8 +439,8 @@ svn_wc__add_tree_conflict(svn_wc_context
SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(conflict_skel, wc_ctx->db,
conflict->local_abspath,
- conflict->local_change,
- conflict->incoming_change,
+ conflict->reason,
+ conflict->action,
NULL,
scratch_pool, scratch_pool));
@@ -474,7 +474,7 @@ svn_wc__add_tree_conflict(svn_wc_context
svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -496,13 +496,13 @@ svn_wc__get_tree_conflict(const svn_wc_c
for (i = 0; i < conflicts->nelts; i++)
{
- const svn_wc_conflict_description3_t *desc;
+ const svn_wc_conflict_description2_t *desc;
- desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
+ desc = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description2_t *);
if (desc->kind == svn_wc_conflict_kind_tree)
{
- *tree_conflict = svn_wc__conflict_description3_dup(desc,
result_pool);
+ *tree_conflict = svn_wc__conflict_description2_dup(desc,
result_pool);
return SVN_NO_ERROR;
}
}
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.h?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.h (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.h Tue Aug 19 17:26:20
2014
@@ -62,18 +62,18 @@ extern "C" {
svn_error_t *
svn_wc__serialize_conflict(svn_skel_t **skel,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Parse a newly allocated svn_wc_conflict_description3_t object from the
+/* Parse a newly allocated svn_wc_conflict_description2_t object from the
* provided SKEL. Return the result in *CONFLICT, allocated in RESULT_POOL.
* DIR_PATH is the path to the WC directory whose conflicts are being read.
* Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
-svn_wc__deserialize_conflict(const svn_wc_conflict_description3_t **conflict,
+svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
const svn_skel_t *skel,
const char *dir_path,
apr_pool_t *result_pool,
Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Tue Aug 19 17:26:20 2014
@@ -654,8 +654,8 @@ ensure_repos_info(svn_wc_entry_t *entry,
/*
* Read tree conflict descriptions from @a conflict_data. Set @a *conflicts
- * to a hash of pointers to svn_wc_conflict_description3_t objects indexed by
- * svn_wc_conflict_description3_t.local_abspath, all newly allocated in @a
+ * to a hash of pointers to svn_wc_conflict_description2_t objects indexed by
+ * svn_wc_conflict_description2_t.local_abspath, all newly allocated in @a
* pool. @a dir_path is the path to the working copy directory whose conflicts
* are being read. The conflicts read are the tree conflicts on the immediate
* child nodes of @a dir_path. Do all allocations in @a pool.
@@ -692,7 +692,7 @@ read_tree_conflicts(apr_hash_t **conflic
iterpool = svn_pool_create(pool);
for (skel = skel->children; skel != NULL; skel = skel->next)
{
- const svn_wc_conflict_description3_t *conflict;
+ const svn_wc_conflict_description2_t *conflict;
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path,
@@ -727,7 +727,7 @@ migrate_single_tree_conflict_data(svn_sq
hi;
hi = apr_hash_next(hi))
{
- const svn_wc_conflict_description3_t *conflict = apr_hash_this_val(hi);
+ const svn_wc_conflict_description2_t *conflict = apr_hash_this_val(hi);
const char *conflict_relpath;
const char *conflict_data;
svn_sqlite__stmt_t *stmt;
@@ -1431,7 +1431,7 @@ svn_wc__upgrade_conflict_skel_from_raw(s
if (tree_conflict_data)
{
svn_skel_t *tc_skel;
- const svn_wc_conflict_description3_t *tc;
+ const svn_wc_conflict_description2_t *tc;
const char *local_abspath;
if (!conflict_data)
@@ -1450,8 +1450,8 @@ svn_wc__upgrade_conflict_skel_from_raw(s
SVN_ERR(svn_wc__conflict_skel_add_tree_conflict(conflict_data,
db, wri_abspath,
- tc->local_change,
- tc->incoming_change,
+ tc->reason,
+ tc->action,
NULL,
scratch_pool,
scratch_pool));
Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Tue Aug 19 17:26:20 2014
@@ -188,57 +188,57 @@ svn_wc_match_ignore_list(const char *str
return svn_cstring_match_glob_list(str, list);
}
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_text3(const char *local_abspath,
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_text2(const char *local_abspath,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description3_t *conflict;
+ svn_wc_conflict_description2_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
conflict = apr_pcalloc(result_pool, sizeof(*conflict));
conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->local_node_kind = svn_node_file;
+ conflict->node_kind = svn_node_file;
conflict->kind = svn_wc_conflict_kind_text;
- conflict->incoming_change = svn_wc_conflict_action_edit;
- conflict->local_change = svn_wc_conflict_reason_edited;
+ conflict->action = svn_wc_conflict_action_edit;
+ conflict->reason = svn_wc_conflict_reason_edited;
return conflict;
}
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_prop3(const char *local_abspath,
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_prop2(const char *local_abspath,
svn_node_kind_t node_kind,
const char *property_name,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description3_t *conflict;
+ svn_wc_conflict_description2_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
conflict = apr_pcalloc(result_pool, sizeof(*conflict));
conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->local_node_kind = node_kind;
+ conflict->node_kind = node_kind;
conflict->kind = svn_wc_conflict_kind_property;
conflict->property_name = apr_pstrdup(result_pool, property_name);
return conflict;
}
-svn_wc_conflict_description3_t *
-svn_wc_conflict_description_create_tree3(
+svn_wc_conflict_description2_t *
+svn_wc_conflict_description_create_tree2(
const char *local_abspath,
- svn_node_kind_t local_node_kind,
+ svn_node_kind_t node_kind,
svn_wc_operation_t operation,
const svn_wc_conflict_version_t *src_left_version,
const svn_wc_conflict_version_t *src_right_version,
apr_pool_t *result_pool)
{
- svn_wc_conflict_description3_t *conflict;
+ svn_wc_conflict_description2_t *conflict;
SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
conflict = apr_pcalloc(result_pool, sizeof(*conflict));
conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
- conflict->local_node_kind = local_node_kind;
+ conflict->node_kind = node_kind;
conflict->kind = svn_wc_conflict_kind_tree;
conflict->operation = operation;
conflict->src_left_version = svn_wc_conflict_version_dup(src_left_version,
@@ -248,42 +248,6 @@ svn_wc_conflict_description_create_tree3
return conflict;
}
-
-svn_wc_conflict_description3_t *
-svn_wc__conflict_description3_dup(const svn_wc_conflict_description3_t
*conflict,
- apr_pool_t *pool)
-{
- svn_wc_conflict_description3_t *new_conflict;
-
- new_conflict = apr_pcalloc(pool, sizeof(*new_conflict));
-
- /* Shallow copy all members. */
- *new_conflict = *conflict;
-
- if (conflict->local_abspath)
- new_conflict->local_abspath = apr_pstrdup(pool, conflict->local_abspath);
- if (conflict->property_name)
- new_conflict->property_name = apr_pstrdup(pool, conflict->property_name);
- if (conflict->mime_type)
- new_conflict->mime_type = apr_pstrdup(pool, conflict->mime_type);
- if (conflict->base_abspath)
- new_conflict->base_abspath = apr_pstrdup(pool, conflict->base_abspath);
- if (conflict->their_abspath)
- new_conflict->their_abspath = apr_pstrdup(pool, conflict->their_abspath);
- if (conflict->my_abspath)
- new_conflict->my_abspath = apr_pstrdup(pool, conflict->my_abspath);
- if (conflict->merged_abspath)
- new_conflict->merged_abspath = apr_pstrdup(pool, conflict->merged_abspath);
- if (conflict->src_left_version)
- new_conflict->src_left_version =
- svn_wc_conflict_version_dup(conflict->src_left_version, pool);
- if (conflict->src_right_version)
- new_conflict->src_right_version =
- svn_wc_conflict_version_dup(conflict->src_right_version, pool);
-
- return new_conflict;
-}
-
svn_wc_conflict_version_t *
svn_wc_conflict_version_create2(const char *repos_url,
const char *repos_uuid,
@@ -373,91 +337,6 @@ svn_wc_conflict_version_dup(const svn_wc
return new_version;
}
-apr_array_header_t *
-svn_wc__cd3_array_to_cd2_array(const apr_array_header_t *conflicts,
- apr_pool_t *result_pool)
-{
- apr_array_header_t *new_conflicts;
- int i;
-
- new_conflicts = apr_array_make(result_pool, conflicts->nelts,
- sizeof (svn_wc_conflict_description2_t *));
-
- for (i = 0; i < conflicts->nelts; i++)
- {
- svn_wc_conflict_description3_t *cd;
- svn_wc_conflict_description2_t *cd2;
-
- cd = APR_ARRAY_IDX(conflicts, i, svn_wc_conflict_description3_t *);
- cd2 = svn_wc__cd3_to_cd2(cd, result_pool);
- APR_ARRAY_PUSH(new_conflicts, svn_wc_conflict_description2_t *) = cd2;
- }
-
- return new_conflicts;
-}
-
-svn_wc_conflict_description2_t *
-svn_wc__cd3_to_cd2(const svn_wc_conflict_description3_t *conflict,
- apr_pool_t *result_pool)
-{
- svn_wc_conflict_description2_t *new_conflict;
-
- if (conflict == NULL)
- return NULL;
-
- new_conflict = apr_pcalloc(result_pool, sizeof(*new_conflict));
-
- if (conflict->local_abspath)
- new_conflict->local_abspath = apr_pstrdup(result_pool,
- conflict->local_abspath);
- new_conflict->node_kind = conflict->local_node_kind;
- new_conflict->kind = conflict->kind;
- if (conflict->property_name)
- new_conflict->property_name = apr_pstrdup(result_pool,
- conflict->property_name);
- new_conflict->is_binary = conflict->is_binary;
- if (conflict->mime_type)
- new_conflict->mime_type = apr_pstrdup(result_pool, conflict->mime_type);
- new_conflict->action = conflict->incoming_change;
- new_conflict->reason = conflict->local_change;
- if (conflict->base_abspath)
- new_conflict->base_abspath = apr_pstrdup(result_pool,
- conflict->base_abspath);
-
- if (conflict->kind == svn_wc_conflict_kind_property)
- {
- /* For property conflicts, cd2 stored prop_reject_abspath in
- * their_abspath, and stored theirs_abspath in merged_file. */
- if (conflict->prop_reject_abspath)
- new_conflict->their_abspath = apr_pstrdup(result_pool,
-
conflict->prop_reject_abspath);
- if (conflict->their_abspath)
- new_conflict->merged_file = apr_pstrdup(result_pool,
- conflict->their_abspath);
- }
- else
- {
- if (conflict->their_abspath)
- new_conflict->their_abspath = apr_pstrdup(result_pool,
- conflict->their_abspath);
-
- if (conflict->merged_abspath)
- new_conflict->merged_file = apr_pstrdup(result_pool,
- conflict->merged_abspath);
- }
- if (conflict->my_abspath)
- new_conflict->my_abspath = apr_pstrdup(result_pool, conflict->my_abspath);
- new_conflict->operation = conflict->operation;
- if (conflict->src_left_version)
- new_conflict->src_left_version =
- svn_wc_conflict_version_dup(conflict->src_left_version, result_pool);
- if (conflict->src_right_version)
- new_conflict->src_right_version =
- svn_wc_conflict_version_dup(conflict->src_right_version, result_pool);
-
- return new_conflict;
-}
-
svn_wc_conflict_description_t *
svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool)
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Tue Aug 19 17:26:20 2014
@@ -676,7 +676,7 @@ svn_wc__write_check(svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool);
-/* Read into CONFLICTS svn_wc_conflict_description3_t* structs
+/* Read into CONFLICTS svn_wc_conflict_description2_t* structs
* for all conflicts that have LOCAL_ABSPATH as victim.
*
* Victim must be versioned or be part of a tree conflict.
Modified: subversion/trunk/subversion/svn/cl-conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl-conflicts.c?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl-conflicts.c (original)
+++ subversion/trunk/subversion/svn/cl-conflicts.c Tue Aug 19 17:26:20 2014
@@ -194,14 +194,14 @@ operation_str(svn_wc_operation_t operati
svn_error_t *
svn_cl__get_human_readable_prop_conflict_description(
const char **desc,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool)
{
const char *reason_str, *action_str;
/* We provide separately translatable strings for the values that we
* know about, and a fall-back in case any other values occur. */
- switch (conflict->local_change)
+ switch (conflict->reason)
{
case svn_wc_conflict_reason_edited:
reason_str = _("local edit");
@@ -218,10 +218,10 @@ svn_cl__get_human_readable_prop_conflict
default:
reason_str = apr_psprintf(pool, _("local %s"),
svn_token__to_word(map_conflict_reason_xml,
- conflict->local_change));
+ conflict->reason));
break;
}
- switch (conflict->incoming_change)
+ switch (conflict->action)
{
case svn_wc_conflict_action_edit:
action_str = _("incoming edit");
@@ -234,9 +234,8 @@ svn_cl__get_human_readable_prop_conflict
break;
default:
action_str = apr_psprintf(pool, _("incoming %s"),
- svn_token__to_word(
- map_conflict_action_xml,
- conflict->incoming_change));
+ svn_token__to_word(map_conflict_action_xml,
+ conflict->action));
break;
}
SVN_ERR_ASSERT(reason_str && action_str);
@@ -249,7 +248,7 @@ svn_cl__get_human_readable_prop_conflict
svn_error_t *
svn_cl__get_human_readable_tree_conflict_description(
const char **desc,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool)
{
const char *action, *reason, *operation;
@@ -257,15 +256,15 @@ svn_cl__get_human_readable_tree_conflict
/* Determine the node kind of the incoming change. */
incoming_kind = svn_node_unknown;
- if (conflict->incoming_change == svn_wc_conflict_action_edit ||
- conflict->incoming_change == svn_wc_conflict_action_delete)
+ if (conflict->action == svn_wc_conflict_action_edit ||
+ conflict->action == svn_wc_conflict_action_delete)
{
/* Change is acting on 'src_left' version of the node. */
if (conflict->src_left_version)
incoming_kind = conflict->src_left_version->node_kind;
}
- else if (conflict->incoming_change == svn_wc_conflict_action_add ||
- conflict->incoming_change == svn_wc_conflict_action_replace)
+ else if (conflict->action == svn_wc_conflict_action_add ||
+ conflict->action == svn_wc_conflict_action_replace)
{
/* Change is acting on 'src_right' version of the node.
*
@@ -275,9 +274,9 @@ svn_cl__get_human_readable_tree_conflict
incoming_kind = conflict->src_right_version->node_kind;
}
- reason = local_reason_str(conflict->local_node_kind, conflict->local_change,
+ reason = local_reason_str(conflict->node_kind, conflict->reason,
conflict->operation);
- action = incoming_action_str(incoming_kind, conflict->incoming_change);
+ action = incoming_action_str(incoming_kind, conflict->action);
operation = operation_str(conflict->operation);
SVN_ERR_ASSERT(operation);
@@ -292,12 +291,12 @@ svn_cl__get_human_readable_tree_conflict
It will not be pretty, but is closer to an internal error than
an ordinary user-facing string. */
*desc = apr_psprintf(pool, _("local: %s %s incoming: %s %s %s"),
- svn_node_kind_to_word(conflict->local_node_kind),
+ svn_node_kind_to_word(conflict->node_kind),
svn_token__to_word(map_conflict_reason_xml,
- conflict->local_change),
+ conflict->reason),
svn_node_kind_to_word(incoming_kind),
svn_token__to_word(map_conflict_action_xml,
- conflict->incoming_change),
+ conflict->action),
operation);
}
return SVN_NO_ERROR;
@@ -340,7 +339,7 @@ add_conflict_version_xml(svn_stringbuf_t
static svn_error_t *
append_tree_conflict_info_xml(svn_stringbuf_t *str,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool)
{
apr_hash_t *att_hash = apr_hash_make(pool);
@@ -350,15 +349,15 @@ append_tree_conflict_info_xml(svn_string
svn_dirent_basename(conflict->local_abspath, pool));
svn_hash_sets(att_hash, "kind",
- svn_cl__node_kind_str_xml(conflict->local_node_kind));
+ svn_cl__node_kind_str_xml(conflict->node_kind));
svn_hash_sets(att_hash, "operation",
svn_cl__operation_str_xml(conflict->operation, pool));
- tmp = svn_token__to_word(map_conflict_action_xml, conflict->incoming_change);
+ tmp = svn_token__to_word(map_conflict_action_xml, conflict->action);
svn_hash_sets(att_hash, "action", tmp);
- tmp = svn_token__to_word(map_conflict_reason_xml, conflict->local_change);
+ tmp = svn_token__to_word(map_conflict_reason_xml, conflict->reason);
svn_hash_sets(att_hash, "reason", tmp);
/* Open the tree-conflict tag. */
@@ -386,7 +385,7 @@ append_tree_conflict_info_xml(svn_string
svn_error_t *
svn_cl__append_conflict_info_xml(svn_stringbuf_t *str,
- const svn_wc_conflict_description3_t
*conflict,
+ const svn_wc_conflict_description2_t
*conflict,
apr_pool_t *scratch_pool)
{
apr_hash_t *att_hash;
@@ -447,7 +446,7 @@ svn_cl__append_conflict_info_xml(svn_str
case svn_wc_conflict_kind_property:
/* "<prop-file> xx </prop-file>" */
svn_cl__xml_tagged_cdata(&str, scratch_pool, "prop-file",
- conflict->prop_reject_abspath);
+ conflict->their_abspath);
break;
default:
Modified: subversion/trunk/subversion/svn/cl-conflicts.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl-conflicts.h?rev=1618906&r1=1618905&r2=1618906&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl-conflicts.h (original)
+++ subversion/trunk/subversion/svn/cl-conflicts.h Tue Aug 19 17:26:20 2014
@@ -48,7 +48,7 @@ extern "C" {
svn_error_t *
svn_cl__get_human_readable_prop_conflict_description(
const char **desc,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool);
/**
@@ -60,7 +60,7 @@ svn_cl__get_human_readable_prop_conflict
svn_error_t *
svn_cl__get_human_readable_tree_conflict_description(
const char **desc,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool);
/**
@@ -70,7 +70,7 @@ svn_cl__get_human_readable_tree_conflict
svn_error_t *
svn_cl__append_conflict_info_xml(
svn_stringbuf_t *str,
- const svn_wc_conflict_description3_t *conflict,
+ const svn_wc_conflict_description2_t *conflict,
apr_pool_t *pool);
#ifdef __cplusplus