subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Matyl <Michal.Ma...@zf.com>
Subject [No Subject]
Date Thu, 11 Feb 2016 10:19:02 GMT
Hello,

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.
One need to merge branch-02 into trunk's WC rev.5.

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:
TortoiseSVN 1.8.11, Build 26392 - 64 Bit , 2015/03/19 18:50:20
Subversion 1.8.13, -release
apr 1.5.1
apr-util 1.5.4
serf 1.3.8
OpenSSL 1.0.2a 19 Mar 2015
zlib 1.2.8

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".
When I change "Merge options" to "Ignore all whitespaces" then conflict is properly detected
(and that's what I expect for "Compare whitespaces" too).

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
svn merge http://remote_test_repo/branches/branch-02 test_wc/

with "ignore--all-space" the conflict is detected as expected
svn merge -x --ignore-all-space http://remote_test_repo/branches/branch-02 test_wc/

SVN version information:
$ svn --version
svn, version 1.9.3 (r1718519)
   compiled Dec 15 2015, 09:46:48 on i686-pc-cygwin

The repo attached was created using mentioned Tortoise, so it's SVN 1.8. Let me know if you
need more information.
I haven't found any SVN's JIRA ticket related to such behavior, hopefully it's not reported
all over again. Thanks for attention.

Kind Regards
MichaƂ Matyl

Mime
View raw message