Reputation: 505
I am getting Tree conflict in SVN. It's weird!
I have standard Trunk, Branches, Tags structure, and follow multiple team model. Branch1, Branch2 are created form Trunk and active parallely
Steps followed:
1. Branch1 Work
: newfile.c
added and committed in Branch1
2. Merge
: From Branch1 -> Trunk (successful; file added in trunk)
3. Merge
: Down-merge from Trunk -> Branch2. (successful; file added in Branch2)
4. Branch2 Work
: Perform regular Branch2 work and commit.
5. Merge
: From Branch2 to Trunk => This step throws Tree-conflict for newfile.c
Branch2 Team is getting Tree conflict for newfile.c
which they have not touched at all.
Why is this happening. Any suggestions please, can this be avoided? This issue is bugging me a lot.
PS: I used TortoiseSVN client 1.6.0 and TortoiseSVN 1.6.16 - 32 Bit (both used separately)
merge error (above step-5):
>svn merge file:///E:/Treeconflict_test/svnRepo/Branches/Br2 Trunk
--- Merging r3 through r8 into 'Trunk':
C Trunk\src\ARTransactionFeeDto2.java
U Trunk\pom.xml
G Trunk
Summary of conflicts:
Tree conflicts: 1
>svn status Trunk
M Trunk
C Trunk\src\ARTransactionFeeDto2.java
> local obstruction, incoming add upon merge
M Trunk\pom.xml
PFB svn repo log (above step 1-4):
>svn log -v file:///E:/Treeconflict_test/svnRepo
------------------------------------------------------------------------
r8 | rohit | 2013-03-05 16:30:35 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
M /Branches/Br2/src/ARTransactionFeeDto2.java
br2 branch changes
------------------------------------------------------------------------
r7 | rohit | 2013-03-05 16:29:34 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
M /Branches/Br2
M /Branches/Br2/pom.xml
A /Branches/Br2/src/ARTransactionFeeDto2.java (from /Trunk/src/ARTransactionF
eeDto2.java:6)
dowm-merge from Trunk to branch-Br2
------------------------------------------------------------------------
r6 | rohit | 2013-03-05 16:26:56 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
M /Branches/Br2/pom.xml
br2 branch changes
------------------------------------------------------------------------
r5 | rohit | 2013-03-05 16:22:26 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
M /Trunk
M /Trunk/pom.xml
A /Trunk/src/ARTransactionFeeDto2.java (from /Branches/Br1/src/ARTransactionFeeDto2.java:4)
up-merge from branch-Br1 to Trunk
------------------------------------------------------------------------
r4 | rohit | 2013-03-05 16:20:48 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
M /Branches/Br1/pom.xml
A /Branches/Br1/src/ARTransactionFeeDto2.java
br1 changes
------------------------------------------------------------------------
r3 | rohit | 2013-03-05 16:19:07 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
A /Branches/Br2 (from /Trunk:2)
created branch br2
------------------------------------------------------------------------
r2 | rohit | 2013-03-05 16:18:57 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
A /Branches/Br1 (from /Trunk:1)
created branch Br1
------------------------------------------------------------------------
r1 | rohit | 2013-03-05 16:18:13 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
A /Branches
A /Tags
A /Trunk
A /Trunk/pom.xml
A /Trunk/src
A /Trunk/src/ARTransactionFeeDelegateResponse.java
A /Trunk/src/ARTransactionFeeDto.java
A /Trunk/src/ResponseARTransFeeDtlsDto.java
initial commit Trunk
------------------------------------------------------------------------
Upvotes: 1
Views: 2016
Reputation: 1697
I attempted to follow these steps (as closely as I could without the actual list of commands available) with SVN 1.7 and it seemed to work as expected for me.
I think that it may not be working for you because of the '--reintegrate' option that you need to use when merging a branch back into trunk. Are you sure that you used this option every time you merged from either branch back to trunk?
If you did use that option, then please disregard this answer.
Upvotes: 0
Reputation: 146350
The error message may look cryptic but basically explains the issue:
local obstruction, incoming add upon merge
You are porting r3 to r8 from BR2 into trunk. The problem is that in r7 you add ARTransactionFeeDto2.java
:
r7 | rohit | 2013-03-05 16:29:34 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
A /Branches/Br2/src/ARTransactionFeeDto2.java (from /Trunk/src/ARTransactionF
eeDto2.java:6)
... but such change cannot be ported to trunk because the file is already there:
r5 | rohit | 2013-03-05 16:22:26 +0530 (Tue, 05 Mar 2013) | 1 line
Changed paths:
A /Trunk/src/ARTransactionFeeDto2.java (from /Branches/Br1/src/ARTransactionFeeDto2.java:4)
Subversion offers very sophisticated ways to avoid it but I suggest you just use TortoiseSVN to do the merge and, when prompted about conflict in r7, you choose to keep local file (which is identical to incoming file anyway).
Upvotes: 1
Reputation: 97270
It's impossible in this workflow, even for 1.6. You have to show all commands and output
According to log, you are victim of "XFAIL conflict from merge of add over versioned file", mentioned in 2009-version of "Tree Conflict" design document. Most important part is
Fixed expectations in r35341
And I can't say, how this revision can be translated to TortoiseSVN build with bugfix. I'll test your workflow on my latest 1.6 (TortoiseSVN 1.6.16, Build 21511 - 32 Bit , 2011/06/01 19:00:35
).
My log for used TortoiseSVN 1.7.11, Build 23600 - 32 Bit
(all merges - GUI-based, local repository)
>svn log -v file:///Z:/Repo/
------------------------------------------------------------------------
r10 | Badger | 2013-03-05 17:32:32 +0600 (Вт, 05 мар 2013) | 2 lines
Changed paths:
M /trunk
M /trunk/Base.txt
M /trunk/C1.txt
M /trunk/C2.txt
Merge from branches/b2:
------------------------------------------------------------------------
r9 | Badger | 2013-03-05 17:27:42 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
M /branches/b2/Base.txt
M /branches/b2/C1.txt
M /branches/b2/C2.txt
Anfanglichen Deutsch Korperregion
------------------------------------------------------------------------
r8 | Badger | 2013-03-05 17:19:28 +0600 (Вт, 05 мар 2013) | 2 lines
Changed paths:
M /branches/b2
M /branches/b2/Base.txt
M /branches/b2/C1.txt
M /branches/b2/C2.txt
A /branches/b2/Reference.txt (from /trunk/Reference.txt:7)
Merge from trunk
------------------------------------------------------------------------
r7 | Badger | 2013-03-05 17:15:29 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
M /trunk
M /trunk/Base.txt
A /trunk/Reference.txt (from /branches/b1/Reference.txt:6)
Merge B1 branch changes
------------------------------------------------------------------------
r6 | Badger | 2013-03-05 17:12:26 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
M /branches/b1/Base.txt
A /branches/b1/Reference.txt
Structure reflected
------------------------------------------------------------------------
r5 | Badger | 2013-03-05 17:09:46 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
M /trunk/C1.txt
M /trunk/C2.txt
Edition 1
------------------------------------------------------------------------
r4 | Badger | 2013-03-05 17:06:38 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
A /branches/b2 (from /trunk:3)
Branching for task2
------------------------------------------------------------------------
r3 | Badger | 2013-03-05 17:05:49 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
A /branches/b1 (from /trunk:2)
Branching for task1
------------------------------------------------------------------------
r2 | Badger | 2013-03-05 17:03:21 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
A /trunk/Base.txt
A /trunk/C1.txt
A /trunk/C2.txt
Basic set
------------------------------------------------------------------------
r1 | Badger | 2013-03-05 16:59:36 +0600 (Вт, 05 мар 2013) | 1 line
Changed paths:
A /branches
A /tags
A /trunk
Imported folder structure
------------------------------------------------------------------------
Comments:
I tried to repeat your actions as accurately as possible
Add-on
Tested with 1.6.16, got described result, even if I have pre-merged edited in branch file into trunk before merge trees
Add-on 2
Goddam!!! It doesn't work in latest 1.7 also. It drive me nuts
Upvotes: 2