Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D153F18199 for ; Mon, 18 Apr 2016 10:29:55 +0000 (UTC) Received: (qmail 34695 invoked by uid 500); 18 Apr 2016 10:29:55 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 34659 invoked by uid 500); 18 Apr 2016 10:29:55 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 34649 invoked by uid 99); 18 Apr 2016 10:29:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 10:29:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 55B31C202D for ; Mon, 18 Apr 2016 10:29:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.804 X-Spam-Level: X-Spam-Status: No, score=0.804 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.996] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WYZ_7z5LbfLq for ; Mon, 18 Apr 2016 10:29:54 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2048A5FB40 for ; Mon, 18 Apr 2016 10:29:54 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3DED6E0097 for ; Mon, 18 Apr 2016 10:29:53 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id DE76F3A0193 for ; Mon, 18 Apr 2016 10:29:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1739732 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/conflicts.c svn/conflict-callbacks.c Date: Mon, 18 Apr 2016 10:29:52 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160418102952.DE76F3A0193@svn01-us-west.apache.org> 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,