Hey Jerome

No worries, I understand. I'll try to provide some high-level information
on all this (bearing in mind I'm talking more generically, as I can't see
what you're seeing).

We're using a variation on the Myers Diff algorithm, which is one of the
longest-lived, most standard diff algorithms. Over the years there have
been tweaks to the algorithm to help in some cases with code, some of which
we support. There are also newer algorithms that we'd like to conditionally
use, but need to be careful about how and when we introduce that. My
expectation is the 4.0 timeframe.

Diff files themselves have no bearing on how Review Board (or most diff
viewers) actually render the diffs. Most will apply the patch and use its
own algorithm to generate the side-by-side diff view. This is how you're
able to see things like "replace" lines, since that isn't a concept in
unified diffs. There's no capability in Review Board to somehow fall back
on using the representation in the diff file, and it's not something we'll
be adding (though if you upload a diff file as an attachment to a review
request, you can review it as-is, with syntax highlighting and none of
Review Board's diff improvements).

It does sound like your particular diff might be hitting some edge case
that's producing a less-than-ideal diff. No matter what algorithm is used,
there will always be diffs like this. It sucks, but you can't prevent that.
There are a lot of things that we do that greatly reduces the noise in a
diff, compared to most diff viewers and the diff files themselves (for
instance, if you're changing the indentation of groups of lines, we are a
lot smarter about how we represent that, and you have a lot less noise to
look at).

I'm definitely curious to see an example of this diff, to see if we're
talking an edge case or if something else is going on.

Christian

-- 
Christian Hammond
President/CEO of Beanbag <https://www.beanbaginc.com/>
Makers of Review Board <https://www.reviewboard.org/>

On Mon, Apr 10, 2017 at 1:24 PM, <[email protected]> wrote:

> Sorry about the low details, I can't really post a screen shot, since the
> source code cannot be shared. I'm using 2.5.7
>
> I will try to replicate it with simple code and post KDiff3 and P4Merge
> along the Vidual diff of ReviewBoard. But mostly when I remove a big chunk
> of code and add some, the normal diff tools (KDiff3 and P4Merge see the
> whole blocks as removed and added) where the reviewboard tools may see a
> line with an nearly empty lines with parenthesis/accolade and try to match
> it with another lines, and making added/removed block split with modified
> line for those parenthesis/accolades, making the whole visual diff a
> rainbow of color at each few lines.
>
> The diff clearly mark those block lines as all added, not moved/edited or
> keeping a single line with accolade and then trying to continue. Look like
> the diff viewer have it's own set of rules to try to match the diff and
> mark the lines as moved/edited/added/removed.
>
> I was wondering if there was an options to stop that and just display the
> actual diff and stop the parsing of the match of what he consider edited
> and not added/removed.
>
> I will try to provide an example of this asap.
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to