subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@apache.org>
Subject Re: svn commit: r1808258 - /subversion/trunk/subversion/libsvn_client/conflicts.c
Date Tue, 19 Sep 2017 15:59:52 GMT
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

Mime
View raw message