0

I'm trying to merge a trunk into a branch in SVN. I keep getting tree conflicts. I'm fairly sure the following is the simplest possible case of merging a trunk to a branch, but the problem remains:

$ svn ls svn://server
branches/
trunk/
$ svn ls svn://server/trunk
file1.tldr
file2.tldr
$ svn copy svn://server/trunk svn://server/branches/test_branch -m ""
Committed revision 4334.
$ cd /tmp
$ mkdir test
$ cd test
$ svn checkout svn://server/branches/test_branch
A    test_branch/file1.tldr
A    test_branch/file2.tldr
Checked out revision 4334.
$ cd test_branch
$ ls
file1.tldr  file2.tldr
$ svn merge svn://server/trunk 
--- Merging r4316 through r4334 into '.':
   C file1.tldr
   C file2.tldr
Summary of conflicts:
  Tree conflicts: 2
$ svn status
      C file1.tldr
      >   local add, incoming add upon merge
      C file2.tldr
      >   local add, incoming add upon merge

I haven't made any changes to anything at this point -- neither the files in trunk nor test_branch have been modified since test_branch was created (as a copy of trunk). So how can there be tree conflicts? Am I missing a step? I'm using SVN 1.6.

Thanks in advance. I am an SVN newbie.

user2635263
  • 278
  • 2
  • 7
  • All I can think of, is that you're merging in the "wrong" direction. I.e. you are merging from trunk to your branch, normally you merge from a branch back to trunk, unless they are merging a specific revision in a "cherry pick" merge. But I'd still expect what you did to work. SVN 1.6 is pretty darn old. Are you able to try a more recent version? I know there were a ton of merge improvements in both 1.7 and 1.8. – Ben Apr 24 '14 at 02:05
  • Unfortunately I don't have permissions on this system to do an upgrade myself. But I'll try to make that happen -- thanks for the suggestion – user2635263 Apr 25 '14 at 08:27

1 Answers1

0

how can there be tree conflicts?

I see biggest problem before tree confict: in range, suggested for merge r4316 through r4334: branch must get from trunk only changes, happened from branch-point, not earlier. For earlier revisions in game you got (expected) result, even it seems strange: for Subversion both files was added in branch and trunk after branchpoint

Edit

I'll see at trunk log for r4316 changes. I would not be surprised, if it was creating (deleted later) of branch test_branch

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • I see what you mean. Do you have any idea why its starting from revision 4316, when the copy occurred at 4334? Is there any way I can make this set up even simpler? – user2635263 Apr 24 '14 at 22:36
  • @user2635263 You created branch as copy of trunk (i.e. branch has **all** content **and properties** of trunk). In clean case mergeinfo of trunk must be empty (TBT! I may be wrong), in your case it have *something* (`svn pg`) and it was copied into branch. As result - branch on merge was considered as "merged at least once before" and wrong branchpoint calculated. *May* also be related with reusing branchname (can't recall mergeinfo format, have re-read) – Lazy Badger Apr 25 '14 at 08:48