Philip Martin <philip.mar...@wandisco.com> writes:

> Noorul Islam K M <noo...@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

Reply via email to