Cheok Yan Cheng
Cheok Yan Cheng

Reputation: 42700

Conflict at folder during merging from trunk to branch

recently, I try to merge changes from trunk to branch

C:\Projects\branch\XXX>svn merge -r 167:193 https://svn-server:8443/svn/XXX/trunk .
--- Merging r168 through r193 into '.':
   C Code
Summary of conflicts:
  Tree conflicts: 1

Branch This is branch

Trunk This is trunk

1) User performs first commit in branch to 166

2) User then performs another commit in trunk to 167

3) User performs subsequent commit to branch 168-172

4) User then continue to perform commit to trunk 193-173

I want to carry over the changes in (2) and (4), that's why I am using 167:193

However, it states conflict occur in Code. Note that, Code is a folder.

May I know how I can carry changes from trunk to branch? I really miss my Mercurial :(

Upvotes: 0

Views: 327

Answers (2)

Steve Goykovich
Steve Goykovich

Reputation: 757

I noticed a couple of additional actions in your screenshots. Is your Code folder created separately in both the branch and trunk? If the folder was created separately in each branch, then svn will give tree conflict errors because it will try to add it a second time while merging. There are other scenarios that can cause this, I'm just guessing.

Reading the "tree conflicts" section here helped me out a lot the first time I ran into conflicts.

Upvotes: 1

wengseng
wengseng

Reputation: 1328

Not sure this will help:

http://ariejan.net/2006/12/20/svn-merge-a-branch-with-your-trunk/

http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk

Probably you need to conduct merging branch to trunk twice:
i) merge 167 to 172 -> commit into branch as 194
ii) merge 193 to 194 -> commit into trank as 195

Upvotes: 1

Related Questions