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

Re: Wunused-but-set-parameter warning in svn_wc_get_diff_editor6

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 22 Aug 2014 13:56:09 +0100

>>> The 'ignore_ancestry' flag should probably be passed to
>>> svn_wc__get_diff_editor(..., ignore-ancestry=ignore_ancestry, ...) instead
>>> of passing (..., ignore_ancestry=use_git_diff_format, ...). But then where
>>> should 'use_git_diff_format' be used?

Bert wrote:
>> The git_diff flag, triggers a lot of things... some of which require
>> noticing ancestry.
>>
>> Instead of properly defining what this flag did, we just passed it around
>> everywhere.
>>
>> With the new callback apis and filters, most of this was no longer
>> necessary.

Philip Martin wrote:
> If the current code is correct then we should remove the redundant
> assignment to ignore_ancestry and make it an unused parameter.

But it doesn't look like the current code is correct.

> The filter reverse the results, but there is one thing it can't do.
>
> In some cases we have replacements...
> Reported as a delete, followed by an add.
>
> Just using the reverse filter would make this an add followed by a delete,
> as it can't just reorder the callbacks.
>
> That is why the driver still knows which reporting order it should use.
>
> But it no longer contains an if in all places to report two ways... as it
> used to do with the old implementation. The filter performs the translation
> for all drivers.

The svn_wc__get_diff_editor() doc string says "
 * Normally, the difference from repository->working_copy is shown.
 * If @a reverse_order is TRUE, then show working_copy->repository diffs.
".

That's not true, it only swaps the order of 'add' and 'delete', so I've corrected that doc string in r1619788.

- Julian
Received on 2014-08-22 14:56:44 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.