[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] wc-ng - Remove use of entry_t from calculate_target_mergeinfo

From: Matthew Bentham <mjb67_at_artvps.com>
Date: Tue, 02 Mar 2010 10:50:24 +0000

On 02/03/2010 10:39, Philip Martin wrote:
> Matthew Bentham<mjb67_at_artvps.com> writes:
>
>> +svn_wc__node_is_status_copied(svn_boolean_t *is_copied,
>> + svn_wc_context_t *wc_ctx,
>> + const char *local_abspath,
>> + apr_pool_t *scratch_pool)
>> +{
>> + svn_wc__db_status_t status;
>> + svn_boolean_t added;
>> +
>> + SVN_ERR(svn_wc__node_is_status_added(&added, wc_ctx, local_abspath,
>> + scratch_pool));
>> + if (!added)
>> + {
>> + *is_copied = FALSE;
>> + return SVN_NO_ERROR;
>> + }
>> +
>> + SVN_ERR(svn_wc__db_scan_addition(&status,
>> + NULL, NULL, NULL, NULL,
>> + NULL, NULL, NULL, NULL,
>> + wc_ctx->db, local_abspath,
>> + scratch_pool, scratch_pool));
>> + *is_copied = (status == svn_wc__db_status_copied);
>
> What about svn_wc__db_status_moved_here? That's a copy where the
> source happened to be deleted as well. What should _is_status_copied
> return? How should calculate_target_mergeinfo handle _moved_here?
> Like copied or like added?
>
>> +
>> + return SVN_NO_ERROR;
>
> Perhaps calculate_target_mergeinfo should simply call _scan_addition
> to get the added/copied/moved status?

It could do, but _scan_addition is private to libsvn_wc right now, like
_read_info (and indeed _status_copied and the other status
enumerations). I understood the plan to be that for now we add small
routines that call __db routines internally?

Matthew
Received on 2010-03-02 11:50:59 CET

This is an archived mail posted to the Subversion Dev mailing list.