eclipsesvnsubclipse

Branching and merging in Subclipse


After following all the articles I could find and trying it myself in many different ways, I'm getting a bit desperate towards performing branching and merging in Subclipse.

All I get is tree conflicts (even for example projects), errors ("file already exists")...

I've used svn copy as well (which apparently is a better practice than setting a branch property) as the built-in branch support.

How to branch a directory to a second one, in the best way possible?

And how to merge changes from any of these directiories to the other one?


Solution

  • So I figured it out:

    Creating the branch

    Right-click the trunk folder, select Team > Branch/Tag. The Copy to URL: path must be an absolutely new, non-existing path; you can't either select an already existing path, or create a directory through the dialog and then choose that one.

    Then click finish unless you need something else.

    Switching to the branch

    Update to HEAD, right-click the project folder, select Team > Switch to another Branch. Click the Select... button. If the folder you just created doesn't appear, right-click the browser and refresh. Done.

    Merging from the trunk to the branch, or viceversa

    First, make sure the Collabnet Merge Client is installed. You'll find it in the same directory that one uses to fetch Subclipse 1.X. Otherwise chances are you'll get tree conflicts.

    Right-click either the branch or the trunk select Team > Merge. Choose Merge a range from revisions if the merge goes from the trunk to the branch. Otherwise select Reintegrate a branch.

    Click Next. Select the merge source and you're done.