Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: Synchronize branch with trunk in Eclipse?

I have an SVN branch and a trunk. The trunk changes regularly and the branch doesn't.

Every now and then (let's say once per week) I want to update the local working copy of the branch with the latest changes of the trunk.

Ideally I would want to do this the same way as I do it with the latest version of the branch: with Eclipse : Team->Synchronize, so I can review all changes before updating.

Is this also possible with a different repository (for example : trunk) ? If not, how do people review the changes before updating then??

I looked at Team->Merge, but this seems to update the changes directly to my working copy, without the possibility to review the changes first (the Preview-function is confusing, I think, and doesn't provide the nice side-by-side view of changes/conflicts that Synchronize has).

like image 372
Dylan Avatar asked Sep 22 '11 15:09

Dylan


1 Answers

The right way to do this is with Merge. Subclipse includes a merge client that makes this easy to do. You are right that it does not give you a true preview, but the way it works is better from a Subversion perspective. The Merge Results view UI is basically the same as the Synchronize view. It lets you easily examine every change that the merge made in your working copy and the Eclipse compare editor that it opens makes it very easy to take out any parts of the change that you do not want in your code before you commit.

The problem with trying to do this from the Synchronize view is that you are then doing the merge yourself using code editors and Subversion has no awareness of what is merged. If you let Subversion first do the merge, then it can update all of its metadata properly and it is perfectly fine for you to then fixup the code to be the way you want it before you commit the results of the merge.

like image 82
Mark Phippard Avatar answered Oct 03 '22 11:10

Mark Phippard