From: Michal Matyl <Michal.Matyl_at_zf.com>
Date: Thu, 11 Feb 2016 10:19:02 +0000
Recently I have encountered highly unexpected SVN behavior that resulted in code duplication after merging a branch into trunk. I'm not sure whether this behavior comes from a bug or my wrong understanding of merge process. After some time of investigation I come to a conclusion that this is most likely a bug, so I'd like to ask you to verify it. I have prepared and attached a repo that consists of minimal reproducible example. I will refer to the example to describe my expectation vs actual SVN behavior.
The example is about a simple branch merging with default settings and a classic conflict situation, no fancy features or complex trunk-to-branch back merging, so I belive simple prose description of the problem is enough.
First developer creates branch-01 and inserts few lines into existing file. Another developer creates branch-02 and makes exactly the same changes as first developer, i.e. inserts the same lines with the same content. The only difference in the second's developer branch is whitespace change (space/tab doesn't matter) in a line preceding inserted lines.
branch-01 is merged into trunk and then branch-02 is merged into trunk. At this point I expect a conflict to occur, possibly with whitespace change to be merged w/o conflict. However SVN doesn't recognize the conflict and BOTH developers' changes are properly merged into trunk resulting with duplicated content.
If you remove whitespace change in branch-02, the conflict is properly detected. Several different cases tested and defined the problem as "a whitespace change in the line preceding conflicted block"
This situation happened on 64bit Win7 using TortoiseSVN with internal diff/merge tools setting - TortoiseUDiff and TortoiseMerge. Version infromation is as follows:
WC is trunk rev.5, then after selecting "Merge" following options are selected: "Merge a range of revisions" -> branch-02 is selected with "all revisions" -> default settings for "Merge options", i.e. "Compare whitespaces".
To exclude Tortoise impact on this behavior I repeated the process with svn command line under Cygwin:
with default merge settings the result is same as for Tortoise: no conflict and content duplication
with "ignore--all-space" the conflict is detected as expected
SVN version information:
The repo attached was created using mentioned Tortoise, so it's SVN 1.8. Let me know if you need more information.
This is an archived mail posted to the Subversion Users mailing list.