4thSpace
4thSpace

Reputation: 44312

Merging tag into trunk with Subversion

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.

Upvotes: 2

Views: 11159

Answers (3)

prodigitalson
prodigitalson

Reputation: 60413

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.

Upvotes: 1

Michael Hackner
Michael Hackner

Reputation: 8645

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.

Upvotes: 1

retracile
retracile

Reputation: 12339

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.

Upvotes: 0

Related Questions