You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/04/18 12:29:52 UTC
svn commit: r1739732 - in /subversion/trunk/subversion: include/svn_client.h
libsvn_client/conflicts.c svn/conflict-callbacks.c
Author: stsp
Date: Mon Apr 18 10:29:52 2016
New Revision: 1739732
URL: http://svn.apache.org/viewvc?rev=1739732&view=rev
Log:
In the conflict resolver, put the incoming change description of tree conflicts
before the local change description, everywhere. This way, the ordering of
paramters, assignements, etc. correspond to the recommended display ordering.
Not strictly required, but nice to have and less confusing.
Note that this is a conflict resolver API change!
This API hasn't been released yet, of course.
* subversion/include/svn_client.h
(svn_client_conflict_tree_get_description): Put incoming change first.
* subversion/libsvn_client/conflicts.c
(tree_conflict_get_description_func_t,
conflict_tree_get_description_generic,
describe_incoming_reverse_addition_upon_merge,
conflict_tree_get_description_incoming_delete,
describe_incoming_reverse_deletion_upon_merge,
conflict_tree_get_description_incoming_add,
describe_incoming_edit_list_modified_revs,
conflict_tree_get_description_incoming_edit,
svn_client_conflict_tree_get_description): Put incoming change first.
* subversion/svn/conflict-callbacks.c
(handle_tree_conflict): Update caller.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/conflicts.c
subversion/trunk/subversion/svn/conflict-callbacks.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1739732&r1=1739731&r2=1739732&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Mon Apr 18 10:29:52 2016
@@ -4526,8 +4526,8 @@ svn_client_conflict_prop_get_description
*/
svn_error_t *
svn_client_conflict_tree_get_description(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/trunk/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1739732&r1=1739731&r2=1739732&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_client/conflicts.c Mon Apr 18 10:29:52 2016
@@ -51,8 +51,8 @@
/* Describe a tree conflict. */
typedef svn_error_t *(*tree_conflict_get_description_func_t)(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -1244,8 +1244,8 @@ svn_client_conflict_prop_get_description
/* Implements tree_conflict_get_description_func_t. */
static svn_error_t *
-conflict_tree_get_description_generic(const char **local_change_description,
- const char **incoming_change_description,
+conflict_tree_get_description_generic(const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -1289,24 +1289,24 @@ conflict_tree_get_description_generic(co
conflict_operation);
if (action && reason)
{
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
}
else
{
/* A catch-all message for very rare or nominally impossible cases.
It will not be pretty, but is closer to an internal error than
an ordinary user-facing string. */
- *local_change_description = apr_psprintf(result_pool,
- _("local %s %s"),
- svn_node_kind_to_word(conflict_node_kind),
- svn_token__to_word(map_conflict_reason,
- conflict_reason));
*incoming_change_description = apr_psprintf(result_pool,
_("incoming %s %s"),
svn_node_kind_to_word(incoming_kind),
svn_token__to_word(map_conflict_action,
conflict_action));
+ *local_change_description = apr_psprintf(result_pool,
+ _("local %s %s"),
+ svn_node_kind_to_word(conflict_node_kind),
+ svn_token__to_word(map_conflict_reason,
+ conflict_reason));
}
return SVN_NO_ERROR;
}
@@ -1891,8 +1891,8 @@ describe_incoming_reverse_addition_upon_
/* Implements tree_conflict_get_description_func_t. */
static svn_error_t *
conflict_tree_get_description_incoming_delete(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -1909,8 +1909,8 @@ conflict_tree_get_description_incoming_d
if (conflict->tree_conflict_details == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
local_change = svn_client_conflict_get_local_change(conflict);
@@ -1919,8 +1919,8 @@ conflict_tree_get_description_incoming_d
SVN_ERR(describe_local_change(&reason, conflict, scratch_pool, scratch_pool));
if (reason == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
&old_repos_relpath, &old_rev, NULL, conflict, scratch_pool,
@@ -1990,8 +1990,8 @@ conflict_tree_get_description_incoming_d
}
}
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
return SVN_NO_ERROR;
}
@@ -2712,8 +2712,8 @@ describe_incoming_reverse_deletion_upon_
/* Implements tree_conflict_get_description_func_t. */
static svn_error_t *
conflict_tree_get_description_incoming_add(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -2732,8 +2732,8 @@ conflict_tree_get_description_incoming_a
if (conflict->tree_conflict_details == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
local_change = svn_client_conflict_get_local_change(conflict);
@@ -2742,8 +2742,8 @@ conflict_tree_get_description_incoming_a
SVN_ERR(describe_local_change(&reason, conflict, scratch_pool, scratch_pool));
if (reason == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
@@ -2785,8 +2785,8 @@ conflict_tree_get_description_incoming_a
old_rev, new_rev, result_pool);
}
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
return SVN_NO_ERROR;
}
@@ -3133,8 +3133,8 @@ describe_incoming_edit_list_modified_rev
/* Implements tree_conflict_get_description_func_t. */
static svn_error_t *
conflict_tree_get_description_incoming_edit(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -3153,8 +3153,8 @@ conflict_tree_get_description_incoming_e
if (conflict->tree_conflict_details == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
@@ -3170,8 +3170,8 @@ conflict_tree_get_description_incoming_e
SVN_ERR(describe_local_change(&reason, conflict, scratch_pool, scratch_pool));
if (reason == NULL)
return svn_error_trace(conflict_tree_get_description_generic(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
edits = conflict->tree_conflict_details;
@@ -3209,8 +3209,8 @@ conflict_tree_get_description_incoming_e
"'^/%s:%ld'."),
new_repos_relpath, new_rev);
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
return SVN_NO_ERROR;
}
@@ -3260,8 +3260,8 @@ conflict_tree_get_description_incoming_e
"of\n'^/%s:%ld'."),
new_repos_relpath, old_rev);
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
return SVN_NO_ERROR;
}
@@ -3296,23 +3296,23 @@ conflict_tree_get_description_incoming_e
action = apr_psprintf(scratch_pool, "%s:\n%s", action,
describe_incoming_edit_list_modified_revs(
edits, scratch_pool));
- *local_change_description = apr_pstrdup(result_pool, reason);
*incoming_change_description = apr_pstrdup(result_pool, action);
+ *local_change_description = apr_pstrdup(result_pool, reason);
return SVN_NO_ERROR;
}
svn_error_t *
svn_client_conflict_tree_get_description(
- const char **local_change_description,
const char **incoming_change_description,
+ const char **local_change_description,
svn_client_conflict_t *conflict,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
return svn_error_trace(conflict->tree_conflict_get_description_func(
- local_change_description,
incoming_change_description,
+ local_change_description,
conflict, result_pool, scratch_pool));
}
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1739732&r1=1739731&r2=1739732&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Mon Apr 18 10:29:52 2016
@@ -1437,7 +1437,7 @@ handle_tree_conflict(svn_boolean_t *reso
SVN_ERR(svn_client_conflict_tree_get_details(conflict, scratch_pool));
SVN_ERR(svn_client_conflict_tree_get_description(
- &local_change_description, &incoming_change_description,
+ &incoming_change_description, &local_change_description,
conflict, scratch_pool, scratch_pool));
SVN_ERR(svn_cmdline_fprintf(
stderr, scratch_pool,