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 2A3B5184AF for ; Wed, 18 Nov 2015 14:05:24 +0000 (UTC) Received: (qmail 38005 invoked by uid 500); 18 Nov 2015 14:05:24 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 37968 invoked by uid 500); 18 Nov 2015 14:05:24 -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 37957 invoked by uid 99); 18 Nov 2015 14:05:24 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 14:05:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8ECE6C07D8 for ; Wed, 18 Nov 2015 14:05:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.79 X-Spam-Level: * X-Spam-Status: No, score=1.79 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 2wTizdaYLjaE for ; Wed, 18 Nov 2015 14:05:21 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 9EA5F215CF for ; Wed, 18 Nov 2015 14:05:20 +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 9AACEE049C for ; Wed, 18 Nov 2015 14:05:18 +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 97A333A0367 for ; Wed, 18 Nov 2015 14:05:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1714996 - in /subversion/trunk/tools/dev/svnmover: merge3.c svnmover.h Date: Wed, 18 Nov 2015 14:05:18 -0000 To: commits@subversion.apache.org From: julianfoad@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151118140518.97A333A0367@svn01-us-west.apache.org> Author: julianfoad Date: Wed Nov 18 14:05:18 2015 New Revision: 1714996 URL: http://svn.apache.org/viewvc?rev=1714996&view=rev Log: In 'svnmover', tweak the display of conflicts towards being slightly more user-friendly. * tools/dev/svnmover/svnmover.h (conflict_storage_t): Rename 'single-element' conflict to 'element-merge' conflict, which it already was called in some places. Update all users. * tools/dev/svnmover/merge3.c (element_merge3_conflict_str, name_clash_conflict_str, cycle_conflict_str, orphan_conflict_str, svnmover_display_conflicts): Tweak the display of conflicts. (conflict_kind_t): Rename 'single-element' conflict to 'element-merge' conflict, which it already was called in some places. Update all users. Modified: subversion/trunk/tools/dev/svnmover/merge3.c subversion/trunk/tools/dev/svnmover/svnmover.h Modified: subversion/trunk/tools/dev/svnmover/merge3.c URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/svnmover/merge3.c?rev=1714996&r1=1714995&r2=1714996&view=diff ============================================================================== --- subversion/trunk/tools/dev/svnmover/merge3.c (original) +++ subversion/trunk/tools/dev/svnmover/merge3.c Wed Nov 18 14:05:18 2015 @@ -152,8 +152,7 @@ element_merge3_conflict_str(element_merg apr_pool_t *result_pool) { return apr_psprintf(result_pool, - "single-element conflict: e%d: yca=%s, side1=%s, side2=%s", - eid, + "element-merge conflict: yca=%s, side1=%s, side2=%s", brief_eid_and_name_or_nil(c->yca, result_pool), brief_eid_and_name_or_nil(c->side1, result_pool), brief_eid_and_name_or_nil(c->side2, result_pool)); @@ -187,18 +186,14 @@ name_clash_conflict_str(name_clash_confl apr_pool_t *result_pool) { apr_hash_index_t *hi2; - const char *s; - - s = apr_psprintf(result_pool, - "name-clash conflict: peid %d, name '%s', %d elements", - c->parent_eid, c->name, apr_hash_count(c->elements)); + const char *s = "name-clash conflict: elements"; for (hi2 = apr_hash_first(result_pool, c->elements); hi2; hi2 = apr_hash_next(hi2)) { int eid = svn_eid__hash_this_key(hi2); - apr_psprintf(result_pool, "%s\n element %d", s, eid); + s = apr_psprintf(result_pool, "%s e%d", s, eid); } return s; } @@ -225,7 +220,7 @@ cycle_conflict_str(cycle_conflict_t *c, int eid, apr_pool_t *result_pool) { - const char *s = "elements"; + const char *s = "cycle conflict: elements"; apr_hash_index_t *hi2; for (hi2 = apr_hash_first(result_pool, c->elements); @@ -236,8 +231,6 @@ cycle_conflict_str(cycle_conflict_t *c, s = apr_psprintf(result_pool, "%s e%d", s, eid2); } - s = apr_psprintf(result_pool, "cycle conflict: e%d: %s", - eid, s); return s; } @@ -264,9 +257,8 @@ orphan_conflict_str(orphan_conflict_t *c apr_pool_t *result_pool) { return apr_psprintf(result_pool, - "orphan conflict: e%d: %d/%s: parent e%d does not exist", - eid, c->element->parent_eid, c->element->name, - c->element->parent_eid); + "orphan conflict: name '%s': parent e%d does not exist", + c->element->name, c->element->parent_eid); } /* */ @@ -287,23 +279,26 @@ svnmover_display_conflicts(conflict_stor svnmover_notify(_("Conflicts:")); for (hi = apr_hash_first(scratch_pool, - conflict_storage->single_element_conflicts); + conflict_storage->element_merge_conflicts); hi; hi = apr_hash_next(hi)) { int eid = svn_eid__hash_this_key(hi); element_merge3_conflict_t *c = apr_hash_this_val(hi); + const char *id_string = apr_psprintf(scratch_pool, "e%d", eid); - svnmover_notify(" %s", + svnmover_notify(" %s: %s", + id_string, element_merge3_conflict_str(c, eid, scratch_pool)); } for (hi = apr_hash_first(scratch_pool, conflict_storage->name_clash_conflicts); hi; hi = apr_hash_next(hi)) { - /*const char *key = apr_hash_this_key(hi);*/ + const char *id_string = apr_hash_this_key(hi); name_clash_conflict_t *c = apr_hash_this_val(hi); - svnmover_notify(" %s", + svnmover_notify(" %s: %s", + id_string, name_clash_conflict_str(c, scratch_pool)); } for (hi = apr_hash_first(scratch_pool, @@ -312,8 +307,10 @@ svnmover_display_conflicts(conflict_stor { int eid = svn_eid__hash_this_key(hi); cycle_conflict_t *c = apr_hash_this_val(hi); + const char *id_string = apr_psprintf(scratch_pool, "e%d", eid); - svnmover_notify(" %s", + svnmover_notify(" %s: %s", + id_string, cycle_conflict_str(c, eid, scratch_pool)); } for (hi = apr_hash_first(scratch_pool, @@ -322,24 +319,26 @@ svnmover_display_conflicts(conflict_stor { int eid = svn_eid__hash_this_key(hi); orphan_conflict_t *c = apr_hash_this_val(hi); + const char *id_string = apr_psprintf(scratch_pool, "e%d", eid); - svnmover_notify(" %s", + svnmover_notify(" %s: %s", + id_string, orphan_conflict_str(c, eid, scratch_pool)); } svnmover_notify(_("Summary of conflicts:\n" - " %d single-element conflicts\n" + " %d element-merge conflicts\n" " %d name-clash conflicts\n" " %d cycle conflicts\n" " %d orphan conflicts\n"), - apr_hash_count(conflict_storage->single_element_conflicts), + apr_hash_count(conflict_storage->element_merge_conflicts), apr_hash_count(conflict_storage->name_clash_conflicts), apr_hash_count(conflict_storage->cycle_conflicts), apr_hash_count(conflict_storage->orphan_conflicts)); return SVN_NO_ERROR; } -enum conflict_kind_t { conflict_kind_single_element, +enum conflict_kind_t { conflict_kind_element_merge, conflict_kind_clash, conflict_kind_cycle, conflict_kind_orphan }; @@ -382,11 +381,11 @@ find_conflict(conflict_object_t **confli { int which_eid = atoi(id_string + 1); - if (svn_eid__hash_get(conflicts->single_element_conflicts, which_eid)) + if (svn_eid__hash_get(conflicts->element_merge_conflicts, which_eid)) { *conflict_p - = conflict_object_create(conflict_kind_single_element, - conflicts->single_element_conflicts, + = conflict_object_create(conflict_kind_element_merge, + conflicts->element_merge_conflicts, &which_eid, result_pool); } if (svn_eid__hash_get(conflicts->cycle_conflicts, which_eid)) @@ -449,7 +448,7 @@ svn_boolean_t svnmover_any_conflicts(const conflict_storage_t *conflicts) { return conflicts - && (apr_hash_count(conflicts->single_element_conflicts) + && (apr_hash_count(conflicts->element_merge_conflicts) || apr_hash_count(conflicts->name_clash_conflicts) || apr_hash_count(conflicts->cycle_conflicts) || apr_hash_count(conflicts->orphan_conflicts)); @@ -1054,7 +1053,7 @@ branch_merge_subtree_r(svn_branch__txn_t info (including the relevant incoming changes) for each kind of conflict. If there are no conflicts, flatten the merge result into a tree. */ - conflict_storage->single_element_conflicts = e_conflicts; + conflict_storage->element_merge_conflicts = e_conflicts; SVN_ERR(detect_clashes(&conflict_storage->name_clash_conflicts, tgt->branch, result_pool, scratch_pool)); Modified: subversion/trunk/tools/dev/svnmover/svnmover.h URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/svnmover/svnmover.h?rev=1714996&r1=1714995&r2=1714996&view=diff ============================================================================== --- subversion/trunk/tools/dev/svnmover/svnmover.h (original) +++ subversion/trunk/tools/dev/svnmover/svnmover.h Wed Nov 18 14:05:18 2015 @@ -130,7 +130,7 @@ struct conflict_storage_t { /* Single-element conflicts */ /* (eid -> element_merge3_conflict_t) */ - apr_hash_t *single_element_conflicts; + apr_hash_t *element_merge_conflicts; /* Name-clash conflicts */ /* ("%{parent_eid}d/%{name}s" -> name_clash_conflict_t) */