Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn merging trunk to branch: all paths are tree conflict

Tags:

svn

I can't seem to make a branch and then merge trunk changes into the branch:

svn copy file:///svn/project/trunk file:///svn/project/branches/feature-branch
svn co file:///svn/project/branches/feature-branch
cd feature-branch
#change a couple of files, no additions/deletions
svn commit
svn merge file:///svn/project/trunk

With this, every single path in the branch is listed as a tree conflict (svn status shows "local add, incoming add upon merge"). The merge does list that it's merging from r2 onward on trunk...so it looks like svn copy is not actually keeping the history of when the branch diverged from the trunk? This is the workflow listed in the subversion book for 1.5, is 1.6 a completely different workflow? (Using 1.6.11)

Edit: svn log -v shows:

A /branches/feature_branch (from /trunk:3091)

svn proplist is empty. (perhaps because I haven't resolved the tree conflicts?) Changes in the feature branch don't seem to be in the log, either, and r3091 isn't in svn log -v. The merge message is "Merging r2 through r3093 into '.'" so it looks like the problem is with remembering where the fork is. After deleting and recreating the branch several times, we've given up on using svn branches.

like image 307
jtniehof Avatar asked Feb 01 '26 02:02

jtniehof


1 Answers

I was having the same problem. After doing a lot of research, I found out that in SVN servers prior to 1.5, the branches won't have merge information stored in the servers. So, whenever you try to do a merge in your branch, it'll try to sync from revision 1 up to HEAD. Since you probably have new files in your branch that were not in trunk r1, you'll have those many tree conflicts. There are two solutions: using revisions range in merge command (svn merge -r 1234:HEAD http://trunk) or updating your svn server to a version grater than or equal 1.5, in which it keeps information about merges, so whenever you try to do a merge in your branch, it'll know which was the last revision synchronized and will do the merge only from that one.

like image 155
Felipe Sodre Silva Avatar answered Feb 03 '26 05:02

Felipe Sodre Silva