From commits-return-46547-apmail-subversion-commits-archive=subversion.apache.org@subversion.apache.org Sat Feb 4 18:47:14 2017 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 D7EE719988 for ; Sat, 4 Feb 2017 18:47:14 +0000 (UTC) Received: (qmail 81586 invoked by uid 500); 4 Feb 2017 18:47:14 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 81527 invoked by uid 500); 4 Feb 2017 18:47:14 -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 81508 invoked by uid 99); 4 Feb 2017 18:47:14 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2017 18:47:14 +0000 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 CA8AA3A0F99 for ; Sat, 4 Feb 2017 18:47:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1781696 - /subversion/trunk/subversion/libsvn_client/conflicts.c Date: Sat, 04 Feb 2017 18:47:13 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170204184713.CA8AA3A0F99@svn01-us-west.apache.org> Author: stsp Date: Sat Feb 4 18:47:13 2017 New Revision: 1781696 URL: http://svn.apache.org/viewvc?rev=1781696&view=rev Log: If the user selects a repository-side move target for a conflict, make conflict descriptions show this move target instead of always showing the first possible move. * subversion/libsvn_client/conflicts.c (describe_incoming_deletion_upon_update, (describe_incoming_deletion_upon_switch, (describe_incoming_deletion_upon_merge): Use the current user-specified repository-side move target in conflict descriptions, if available. Modified: subversion/trunk/subversion/libsvn_client/conflicts.c Modified: subversion/trunk/subversion/libsvn_client/conflicts.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/conflicts.c?rev=1781696&r1=1781695&r2=1781696&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/conflicts.c (original) +++ subversion/trunk/subversion/libsvn_client/conflicts.c Sat Feb 4 18:47:13 2017 @@ -2678,13 +2678,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " - "'^/%s'."), description, - move->moved_to_repos_relpath); + "'^/%s'."), description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2705,13 +2709,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2729,13 +2737,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2758,13 +2770,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " - "'^/%s'."), description, - move->moved_to_repos_relpath); + "'^/%s'."), description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2784,13 +2800,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2808,13 +2828,17 @@ describe_incoming_deletion_upon_update( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -2831,14 +2855,18 @@ describe_incoming_deletion_upon_update( { const char *description; struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Directory updated from r%ld to r%ld was " "moved to '^/%s' by %s in r%ld."), - old_rev, new_rev, - move->moved_to_repos_relpath, + old_rev, new_rev, moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -2859,13 +2887,18 @@ describe_incoming_deletion_upon_update( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("File updated from r%ld to r%ld was moved " "to '^/%s' by %s in r%ld."), old_rev, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -2884,13 +2917,18 @@ describe_incoming_deletion_upon_update( { const char *description; struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Item updated from r%ld to r%ld was moved " "to '^/%s' by %s in r%ld."), old_rev, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3012,13 +3050,18 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved " "to '^/%s'."), description, - move->moved_to_repos_relpath); + moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3041,13 +3084,17 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3068,13 +3115,17 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3099,13 +3150,17 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " - "'^/%s'."), description, - move->moved_to_repos_relpath); + "'^/%s'."), description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3127,13 +3182,17 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3154,13 +3213,17 @@ describe_incoming_deletion_upon_switch( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3177,16 +3240,20 @@ describe_incoming_deletion_upon_switch( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, - new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + new_repos_relpath, new_rev, moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3209,8 +3276,13 @@ describe_incoming_deletion_upon_switch( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("File switched from\n" @@ -3218,7 +3290,7 @@ describe_incoming_deletion_upon_switch( "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3240,8 +3312,13 @@ describe_incoming_deletion_upon_switch( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Item switched from\n" @@ -3249,7 +3326,7 @@ describe_incoming_deletion_upon_switch( "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3399,13 +3476,18 @@ describe_incoming_deletion_upon_merge( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, - move->moved_to_repos_relpath); + moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3428,13 +3510,17 @@ describe_incoming_deletion_upon_merge( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3467,13 +3553,17 @@ describe_incoming_deletion_upon_merge( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " - "'^/%s'."), description, - move->moved_to_repos_relpath); + "'^/%s'."), description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3495,13 +3585,17 @@ describe_incoming_deletion_upon_merge( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3522,13 +3616,17 @@ describe_incoming_deletion_upon_merge( if (details->moves) { struct repos_move_info *move; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), - description, - move->moved_to_repos_relpath); + description, moved_to_repos_relpath); return append_moved_to_chain_description(description, move->next, result_pool, @@ -3545,8 +3643,13 @@ describe_incoming_deletion_upon_merge( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Directory merged from\n" @@ -3554,7 +3657,7 @@ describe_incoming_deletion_upon_merge( "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3577,8 +3680,13 @@ describe_incoming_deletion_upon_merge( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("File merged from\n" @@ -3586,7 +3694,7 @@ describe_incoming_deletion_upon_merge( "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, @@ -3608,8 +3716,13 @@ describe_incoming_deletion_upon_merge( { struct repos_move_info *move; const char *description; + const char *moved_to_repos_relpath; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); + if (details->move_target_repos_relpath) + moved_to_repos_relpath = details->move_target_repos_relpath; + else + moved_to_repos_relpath = move->moved_to_repos_relpath; description = apr_psprintf(result_pool, _("Item merged from\n" @@ -3617,7 +3730,7 @@ describe_incoming_deletion_upon_merge( "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, - move->moved_to_repos_relpath, + moved_to_repos_relpath, details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next,