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

Re: [PATCH] - Fix issue 3690 - "svn log" with ignore property changes

From: Noorul Islam K M <noorul_at_collab.net>
Date: Wed, 20 Jul 2011 17:19:49 +0530

Philip Martin <philip.martin_at_wandisco.com> writes:

> Noorul Islam K M <noorul_at_collab.net> writes:
>
>> +static svn_error_t *
>> +props_only_receiver(void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)
>> +{
>> + props_only_receiver_baton_t *rb = baton;
>> +
>> + if (log_entry->changed_paths2)
>> + {
>> + apr_array_header_t *sorted_paths;
>> + int i;
>> + svn_boolean_t text_modified = FALSE;
>> +
>> + /* Get an array of sorted hash keys. */
>> + sorted_paths = svn_sort__hash(log_entry->changed_paths2,
>> + svn_sort_compare_items_as_paths, pool);
>
> Why sort?
>

I just used an existing function. If this is going to be performance hit
then I can modify this part.

>> +
>> + for (i = 0; i < sorted_paths->nelts; i++)
>> + {
>> + svn_sort__item_t *item = &(APR_ARRAY_IDX(sorted_paths, i,
>> + svn_sort__item_t));
>> + svn_log_changed_path2_t *log_item
>> + = apr_hash_get(log_entry->changed_paths2, item->key, item->klen);
>> +
>> + if (log_item->text_modified == svn_tristate_true)
>> + {
>> + text_modified = TRUE;
>> + break;
>> + }
>> +
>> + }
>> +
>> + if ((text_modified && rb->props_only)
>> + || (! text_modified && rb->ignore_props_only))
>> + return SVN_NO_ERROR;
>> + }
>> +
>> + if (! rb->discover_changed_paths)
>> + log_entry->changed_paths2 = NULL;
>
> Set changed_paths as well?
>

This is necessary because, if the user is not passing the verbose option
then they are not requesting this particular detail.

But I have to pass discover_changed_paths as TRUE for these new options
because changed_paths2 information is required to filter.

Thanks and Regards
Noorul
Received on 2011-07-20 13:52:12 CEST

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