2

I committed files to the trunk. After committing, I realized that those files should also be applied to older branches. Here is the steps I took:

My Copy (Using Trunk: Application Version 5)

svn commit -m "blah" : revision 123

Old Branch (Application Version 3)

svn merge -r 122:123 svnpath

The problem is that now I get a "local delete, incoming edit upon merge" tree conflict. The folder in question did not exist at all in the old branch. But I'm afraid if I resolve with the working branch that it will remove all the contents of that folder in the trunk. But, I don't want the local copy receiving all the files in that folder either.

I'm obviously misunderstanding something here. (I don't even know if I need to commit it, but I don't want the next commit to be stuck with those files.) How do I get the commited changes into the older branch? Most of the files modified should be the same.


Very late edit to clarify what the goal was before. (This is resolved, but I feel this needs more clarity.)

1) Changes made to trunk (version) 32.

2) Changes merged into branch (version) 26.

3) Wanted to resolve 26 merge conflicts and merge from 26 to 28 to 30 to 32.

4) Other changes down the road would be merged from 26 all the way to the trunk. That means the conflict can not remove folder files in the trunk.

teynon
  • 7,540
  • 10
  • 63
  • 106

2 Answers2

1

Assuming you have the standard trunk/, branches/ root directory setup in your repository:

cd branches/mybranch
svn merge -r 122:123 ../../trunk .
Paul McNett
  • 847
  • 6
  • 9
  • That's what I ran. But the problem is the conflicts. I have a folder that didn't exist in the branch before. Merging just one file in that folder caused a tree conflict. – teynon Aug 16 '12 at 16:24
  • Why don't you play around with it yourself and see what happens? Make a copy of your entire working directory and set it aside, and then test the merge and see what happens. A working directory merge will not auto-commit anything for you. – Paul McNett Aug 16 '12 at 16:32
  • But if that directory wasn't actually added in r123, you'll need to either first merge from the commit that added the directory, or manually add that directory to the branch first. – Paul McNett Aug 16 '12 at 16:34
  • I've been doing that this whole time. That's why I asked on here. – teynon Aug 16 '12 at 16:34
  • I don't believe that at the time I made my response that your description was as clear as it is now, but I'm willing to admit that sometimes I scan things too quickly and make unwarranted assumptions. Cheers! – Paul McNett Dec 13 '12 at 17:51
  • SO says if you edit your answer I can un-downvote your answer. – teynon Dec 16 '12 at 16:26
0

My solution here might not be optimal, but here is what I did:

svn revert -R .

Then, I readded (svn add) all the local files as well as the conflicting folder, which was no longer in conflict (I don't know why.)

I was then able to commit without conflict. I did have to modify the old files with the new code changes manually, however.

teynon
  • 7,540
  • 10
  • 63
  • 106