Reputation: 173
I'm using kdiff3 but as I've recently come across the issue where reorganizing my methods that have common functionality (all my gets together, all my posts together, validation, etc.) ends up confusing it to the point where I'm doing everything by hand with notepad. Free or pay for doesn't really matter.
Upvotes: 3
Views: 163
Reputation: 95354
Our Smart Differencer tools compare code based on code structure, not lines. They use real language parsers to pick up the structure, so they are independent of formatting, comments, different-format but identical literals, etc. Changes are reported in terms to conceptual edits (move, copy, delete, rename-identifier-in-block) on language elements (literals, variables, expressions, statements, blocks, functions, ...). Versions for many langauges available.
If you move a full method somewhere, it will tell you you moved the method, not that you deleted 27 lines here, and inserted 27 lines (which might or might not be the same) over there.
It doesn't quite understand that sometimes even the order of declarations isn't important. In our to-do list.
Nor is it presently integrated into a merge tool; just does diffs. Also in our to-do list.
Upvotes: 1
Reputation: 97282
No for now. I heard about starting of planning new diff, which operates by logical blocks, not strings, but it was at the level of rumors
In current state I can see only one choice as best approach (and it's Windows-only-solution): CompareIt! as diif-tools - it can detect (to some extent) and show "moved blocks" inside file and most carefully handle the situation of "removal of chunk" + "adding new chunk in old strings", where all other tried (KDiff, BC, Araxis Merge, P4merge, Diffuse Merge, SourceGear Diffmerge) differs show this block as "aggressive edits".
Upvotes: 0