Page 1 of 1

How to merge from branch/tag to trunk an vice versa

Posted: Tue Oct 16, 2007 6:01 pm
by hossrm
Hello,

I wondered how it should be possible to make merge some (not all) changes from trunk to a branch/tag or from branch/tag to trunk.

In the repository-view I can go into an branch, say 'Compare' and then chosse the corresponding module in trunk.
But in following structure compare view I cannot copy my disired changes left to right or from trunk to the branch file.

If I am in the ressource view I can only compare to the revisions in either trunk or the branch, depending on what I checked out.

I tried a lot but I can't find any method to do this
Can anybody help?

Thankx,

Robert

Using Eclipse 3.3 (jee-europa), Linux, SVN team provider 1.1.7

AW:How to merge from branch/tag to trunk an vice versa

Posted: Fri Oct 19, 2007 9:03 am
by ldornbusch
Hi,
You cannot merge a branch into trunk directly in a single operation in your repository. This would commit conflicts into your repository which you surely not want.

    1. You have to check out your target(where you want to merge to: for example: merge changes from branch to trunk: check out trunk)
    2.Then use the svn merge command

The upcomming dialog is for beginners a little bit difficult to get at first sight: it consists of 3 parts

There is a "from" and a "to" section and a destination(which should be always your working copy from step 1)

For your background:
To see the changes you made in a branch it is not sufficient to look into the HEAD Revision of this branch. You need to compare the Revision at start and the head revision of the branch. This differences you want to apply to your workingcopy(which is pointing to your trunk in this example)

    3. So in "from"-Part you have to choose your branch and you should use the "Log"-Buttons to find the revisions you want to merge.

    4. After pressing "merge" this changes will be applied to your working copy and you may have to solve occuring conflicts.

    5. Please remember to include branch path and Revision numbers from step 3 in your log message so you have at least a manual "merge tracking"


If you are not familar with the concepts of merging at all I suggest to read the chapter from the svn book:
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.copychanges

Hope that helps a bit,
Greetings
Lutz