views:

72

answers:

3

I have this folder structure:

\myproject\branches\v1.2

\myproject\trunk

I need to merge v1.2 back into trunk. v1.2 has revisions 104 and 105. Trunk goes from 57-65 and 106. The 106 revision is deleting a folder that doesn't exist in the v1.2 folder.

My setup is file based. I've tried this in trunk:

MacBook:trunk myuser$ svn merge -r104:105 "file:///Developer/Main%20Repository/myproject/branches/v1.2"

I had three conflicts and resolved them. However, I do not see that any files have been updated in the trunk. Do I need to do something else/different to complete the merge down?

-- EDIT --

I really want to merge the entire tag\v1.2 branch into trunk. So I ran:

svn merge "file:///Developer/Main%20Repository/myproject/branches/v1.2"

and resolved a few more conflicts. Is there a way for me to determine if the two branches are now the same? I can see by doing some file comparisons that there are still definitely differences between the two branches, meaning the merge didn't work.

A: 

Before you will see changes in trunk, you need to svn commit.

The svn merge operation changes your working copy. You've resolved conflicts, good, (I assume you have also run svn resolved for them), now all that is left is committing your work to the repository with svn commit.

retracile
I did the commit before attempting to merge. When I run the above command line, it quickly returns to the prompt, as if nothing has occurred. Checking trunk, I can see no merge has occurred.
4thSpace
"I did the commit before attempting to merge" -- this doesn't make sense... you merge, then commit. Can you give more detail in your question? I'm at a loss as to what you have actually done so far.
retracile
I attempted to merge v1.2 into trunk, resolved conflicts but then didn't commit. Then tried to merge again v1.2 into trunk. No go. So I committed trunk changes then merge v1.2 and that worked. I did an edit to the question to reflect where I'm at now.
4thSpace
+1  A: 

Are you sure r104 was where you created the 1.2 branch? you can verify with:

svn log --stop-on-copy file:///path/to/branch

then you need to use that revision range.

EDIT

Ok so this is how it normally goes... Assuming you want all changes in your branch and the branch was created in r104.

cd path/to/trunk/checkout
svn merge -r 104:HEAD file:///path/to/branch

This merges the changes made in your branch to the local copy of the trunk. you now need to resolve all conflicts if any. At this point if you do:

svn stat

you should see only files and dirs marked M A or X (if you have externals). Now in order for the merge to be in the trunk in the repository you need to do:

svn commit -m "my commit comment"

The problem youre having is that you the first few steps properly but then didnt commit the merged changes and instead tried to merge again. so now youve probably got craziness in trunk. Youll probably need to do a reversion to the last good copy, then merge again and commit.

prodigitalson
Yes - it shows r104 in that branch.
4thSpace
I'll tried it next round because in regards to time, I deleted the trunk contents, copied v1.2 into trunk and committed. Big hammer but geez! Better luck next time.
4thSpace
+1  A: 

What you've told Subversion is to merge the change made in the branch between revisions 104 and 105; you've skipped the change made in r104.

Try

svn merge -c 104,105 file:///Developer/Main%20Repository/myproject/branches/v1.2

and ensure that you have a working copy of trunk.

Michael Hackner