SVN Merge

|
| By Webner

I use subeclipse plugin (in eclipse) to communicate with SVN. This discussion is applicable to SVN Merge in general but I have used subclipse references. Go through it even if you do not use eclipse/subclipse. It should be useful to you.
I found it confusing to use SVN merge initially. But once I got it, it was easy to use.

Here are steps to follow for merging code from one branch into another:

First the scenario :

1. You have to merge 2 branches A & B.
2. When B was created, A was at revision 100.
3. Now you want to get all changes from A into B, starting from revision 100 and up to current revision (head revision) of A.

Steps :

1. Within eclipse, Right click on your local folder for B, Team->Merge, select A corresponding to FROM textbox.
2. Select Revision radio button, enter 100 (that means you want to start from 100).
3. Corresponding to TO, “User From” URL” must be checked.
4. Select Head Revision Radio button.
5. Do a dry run first, to see list of all changes you will get.
6. Now you can do actual merge, go through steps 1-4 and click Merge.

Resolve conflicts manually.

Here’s the command subclipse prints in case of dry run (for those who are not using eclipse environment):

merge –dry-run -r100:HEAD svn+ssh://test.com/home/SVN/dummyrepo/branches/A /home/localuser/workspace/B

Free Online Courses with Certificate.
Free Online Courses With Personalized Certificate.
Study online, from the comfort of your home.
Study online, from the comfort of your home.

Leave a Reply

Your email address will not be published. Required fields are marked *