0

Suppose you have 2 methods in a file:

BASE
----
m1
m2

Now both developers modify the methods slightly. But one developer adds a new method at the top of the file

MINE    |  THIERS
--------+--------
m1'     |   m0
m2'     |   m1''
        |   m2''

I want to see a comparison of m1' vrs m1'' and m2' vrs m2''. The tools that I have been using (FileMerge & P4Merge) often seem to show m1' vrs m0 and m2' vrs m1''.

Without seeing like for like its very hard to tell what has been changed. Is there a tool or a strategy to make these kinds of merges less painful?

Robert
  • 37,670
  • 37
  • 171
  • 213
  • 2
    Git has a "patience diff" algorithm that spends more CPU time to attempt to produce a more useful result. The newer git variants have a "histogram" variant of this. Whether they will actually help, I don't know, but they are worth trying. See `-X patience`, `-X diff-algorithm=...` (when used with `git merge`). – torek May 21 '14 at 17:44

2 Answers2

1

In Araxis Merge, you can add synchronization links between the two or three files being compared. You add a synchronization link between similar parts of the two files - in your example, you'd perhaps create synchronization links between m1' and m1'', and m2' and m2''. Those parts of the files would then be compared against each other, instead of the situation you're currently experiencing - m1' being compared against m0, to which it has no relationship.

Chris Mantle
  • 6,595
  • 3
  • 34
  • 48
1

In KDiff3, you can add synchronization links between the two or three files being compared (probably very similar to Araxis Merge, although I have never tried it). I cannot recommend KDiff3 highly enough, it is an excellent free (GPL) tool that I use almost daily.

Community
  • 1
  • 1
hlovdal
  • 26,565
  • 10
  • 94
  • 165