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 CC2F910326 for ; Wed, 5 Jun 2013 04:00:58 +0000 (UTC) Received: (qmail 62856 invoked by uid 500); 5 Jun 2013 04:00:58 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 62827 invoked by uid 500); 5 Jun 2013 04:00:58 -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 62820 invoked by uid 99); 5 Jun 2013 04:00:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 04:00:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jun 2013 04:00:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9E99B2388CDA; Wed, 5 Jun 2013 04:00:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1489699 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_client/merge.c Date: Wed, 05 Jun 2013 04:00:37 -0000 To: commits@subversion.apache.org From: svn-role@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130605040037.9E99B2388CDA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: svn-role Date: Wed Jun 5 04:00:36 2013 New Revision: 1489699 URL: http://svn.apache.org/r1489699 Log: Merge r1489203 from trunk: * r1489203 Fix a crash when the automatic merge API is called with unrelated source and target branches, other than by 'svn' which does an ancestry check before calling it. Also affected svn_client_get_merging_summary(). Justification: It's a crash. The fix is a straightforward check. Notes: Tested as in the email: by temporarily removing the check at merge-cmd.c:109 and trying a mismatched automatic merge. Votes: +1: julianfoad, ivan, pburba Modified: subversion/branches/1.8.x/ (props changed) subversion/branches/1.8.x/STATUS subversion/branches/1.8.x/subversion/libsvn_client/merge.c Propchange: subversion/branches/1.8.x/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1489203 Modified: subversion/branches/1.8.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1489699&r1=1489698&r2=1489699&view=diff ============================================================================== --- subversion/branches/1.8.x/STATUS (original) +++ subversion/branches/1.8.x/STATUS Wed Jun 5 04:00:36 2013 @@ -57,18 +57,6 @@ Approved for 1.8.1 or if soak is restart Approved changes: ================= - * r1489203 - Fix a crash when the automatic merge API is called with unrelated source - and target branches, other than by 'svn' which does an ancestry check - before calling it. Also affected svn_client_get_merging_summary(). - Justification: - It's a crash. The fix is a straightforward check. - Notes: - Tested as in the email: by temporarily removing the check at - merge-cmd.c:109 and trying a mismatched automatic merge. - Votes: - +1: julianfoad, ivan, pburba - # 1.8.0-rc2 is being voted on currently and as such 1.8.0 is in the soak phase. # Changes that are not intended for 1.8.0 should not be placed here and changes # that would restart the soak should not be added unless they are resolving Modified: subversion/branches/1.8.x/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/merge.c?rev=1489699&r1=1489698&r2=1489699&view=diff ============================================================================== --- subversion/branches/1.8.x/subversion/libsvn_client/merge.c (original) +++ subversion/branches/1.8.x/subversion/libsvn_client/merge.c Wed Jun 5 04:00:36 2013 @@ -12301,6 +12301,12 @@ find_automatic_merge(svn_client__pathrev SVN_ERR(svn_client__get_youngest_common_ancestor( &s_t->yca, s_t->source, &s_t->target->loc, s_t->source_ra_session, ctx, result_pool, result_pool)); + if (! s_t->yca) + return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL, + _("'%s@%ld' must be ancestrally related to " + "'%s@%ld'"), + s_t->source->url, s_t->source->rev, + s_t->target->loc.url, s_t->target->loc.rev); /* Find the latest revision of A synced to B and the latest * revision of B synced to A.