Revious
Revious

Reputation: 8146

SVN: wrongs in conflict understanding?

Have a look at the following picture. There are two identical parts of code but SVN seems to compare them with wrong parts without realizing they are simply the same.

To better see the image you can open it in another tab.

Which extra data could help to better investigate this problem?

enter image description here

Upvotes: 0

Views: 36

Answers (1)

Buurman
Buurman

Reputation: 1984

SVN is not wrong here, you 'moved' that block of code up a couple of lines (the section,navigation,article lines). In terms of most current mergetools (diff/patch) that is effectively removing them on one place and adding them on another.

Every mergetool I've seen compares lines of 'text' based upon it's context (the lines surrounding it) and basically tries to find the smallest set of changes (adding and removing) which, when applied to file a, result in file b. In this case, while the context of these six lines stays relatively the same you moved the lines up (removing/adding) and overwrote another line on that place (line 1696 on the left).

See http://en.wikipedia.org/wiki/Diff for a description of a well-known example tool.

Upvotes: 1

Related Questions