Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 41F19200CF7 for ; Tue, 19 Sep 2017 17:59:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 39C6C1609DD; Tue, 19 Sep 2017 15:59:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7F1721609DB for ; Tue, 19 Sep 2017 17:59:58 +0200 (CEST) Received: (qmail 98605 invoked by uid 500); 19 Sep 2017 15:59:57 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 98595 invoked by uid 99); 19 Sep 2017 15:59:57 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Sep 2017 15:59:57 +0000 Received: from zulu.local (unknown [77.234.149.122]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 4CCF81A0029 for ; Tue, 19 Sep 2017 15:59:55 +0000 (UTC) Subject: Re: svn commit: r1808258 - /subversion/trunk/subversion/libsvn_client/conflicts.c To: dev@subversion.apache.org References: <20170913171646.390263A0041@svn01-us-west.apache.org> <98911faf-b6e5-b599-a385-1bdfda2b0664@apache.org> From: =?UTF-8?Q?Branko_=c4=8cibej?= Organization: The Apache Software Foundation Message-ID: Date: Tue, 19 Sep 2017 17:59:52 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <98911faf-b6e5-b599-a385-1bdfda2b0664@apache.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-GB archived-at: Tue, 19 Sep 2017 15:59:59 -0000 On 19.09.2017 17:56, Branko Čibej wrote: > On 13.09.2017 19:16, stsp@apache.org wrote: >> Author: stsp >> Date: Wed Sep 13 17:16:43 2017 >> New Revision: 1808258 >> >> URL: http://svn.apache.org/viewvc?rev=1808258&view=rev >> Log: >> Follow-up to r1808177: >> >> The change in r1808177 had a bug where moves were actually only searched >> within one revision back in history. Detect moves even if are revisions >> between the "branch-point" and the revision being cherry-picked. >> >> * subversion/libsvn_client/conflicts.c >> (find_nearest_yca): New helper function. >> (conflict_tree_get_details_local_missing): Use find_nearest_yca() to >> find a lower bound for the revision range which must be searched for >> moves. >> >> 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=1808258&r1=1808257&r2=1808258&view=diff >> ============================================================================== >> --- subversion/trunk/subversion/libsvn_client/conflicts.c (original) >> +++ subversion/trunk/subversion/libsvn_client/conflicts.c Wed Sep 13 17:16:43 2017 >> @@ -482,6 +482,80 @@ find_yca(svn_client__pathrev_t **yca_loc >> return SVN_NO_ERROR; >> } >> >> +/* Like find_yca, expect that a YCA could also be found via a brute-force >> + * search of parents of REPOS_RELPATH1 and REPOS_RELPATH2, if no "direct" >> + * YCA exists. An implicit assumption is that some parent of REPOS_RELPATH1 >> + * is a branch of some parent of REPOS_RELPATH2. >> + * >> + * This function can guess a "good enough" YCA for 'missing nodes' which do >> + * not exist in the working copy, e.g. when a file edit is merged to a path >> + * which does not exist in the working copy. >> + */ >> +static svn_error_t * >> +find_nearest_yca(svn_client__pathrev_t **yca_locp, >> + const char *repos_relpath1, >> + svn_revnum_t peg_rev1, >> + const char *repos_relpath2, >> + svn_revnum_t peg_rev2, >> + const char *repos_root_url, >> + const char *repos_uuid, >> + svn_ra_session_t *ra_session, >> + svn_client_ctx_t *ctx, >> + apr_pool_t *result_pool, >> + apr_pool_t *scratch_pool) >> +{ >> + svn_client__pathrev_t *yca_loc; >> + svn_error_t *err; >> + apr_pool_t *iterpool; >> + const char *p1, *p2; >> + int c1, c2; >> + >> + *yca_locp = NULL; >> + >> + iterpool = svn_pool_create(scratch_pool); >> + >> + p1 = repos_relpath1; >> + c1 = svn_path_component_count(repos_relpath1); > ...subversion/libsvn_client/conflicts.c:524:8: warning: implicit conversion loses integer precision: > 'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] > c1 = svn_path_component_count(repos_relpath1); > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > >> + while (c1--) >> + { >> + svn_pool_clear(iterpool); >> + >> + p2 = repos_relpath2; >> + c2 = svn_path_component_count(repos_relpath2); > .../subversion/libsvn_client/conflicts.c:530:12: warning: implicit conversion loses integer precision: > 'apr_size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] > c2 = svn_path_component_count(repos_relpath2); > ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixed in r1808258. But ... what is a "nearest youngest common ancestor?" -- Brane