tags:

views:

29

answers:

1

Having an issue, here is the problem.

Created a branch from the trunk, made changes to the branch on local dev box, committed changes and now I want to merge my changes in the branch to the trunk.

I run the command: 46 is the version where I created the branch, 49 is the branch version now

sudo svn merge -r 46:HEAD http://path/to/branch/repo/verion/that/is/checkout

After running this command I look in the web GUI to see if my changes have been made to the trunk, but I don't see them. Then I thought maybe I should run the commit command.

sudo svn commit -m "Merging branch into trunk"

Still after checking the trunk I don't see my changes.

Can someone please tell me what I'm doing wrong?

Thanks

+1  A: 

You should make sure your working copy is at trunk by switching to trunk:

cd /path/to/workingcopy
svn switch http://server/svn/repo/path/to/trunk

Before merging, make sure you're up to date (run svn update, and there are no dirty files.

Then you can merge from the branch to the trunk working copy:

svn merge -r 46:HEAD http://server/svn/repo/path/to/branches/MyBranch

This will probably change files, and allow you to commit the merge

Sander Rijken
I think that's what I was missing, so I need to be in a local (updated) copy of trunk and then merge. Will try and post back. Thanks
Phill Pafford
In the general case, the target of a merge is a working copy file or directory. If you omit the target, the default is the directory you're in when you invoke `svn merge`.
shambulator