dserodio ([info]dserodio) wrote,
@ 2006-08-24 21:20:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current mood:Tired
Current music:DJ Tiesto - Smirnoff Experience
Entry tags:subversion eclipse tips

How to branch with Subclipse
Nice advice on the subclipse-users mailing list by Mark Phippard

Easy way:
  1. Team -> Create Branch/Tag Specify URL to store it, and be sure to select option to create from working copy. Since your project is still on trunk after this completes, you have to do a Revert to get the project back to a pristine condition.
  2. Use Team -> Switch when you want to go back to the branch code.

Better way:
  1. Do Team -> Update on your project so that your entire working copy is updated to a single, known revision.
  2. Do Team -> Create Branch/Tag and create a branch directly in the repository using that known revision.
  3. Do Team -> Switch to swap your working copy to the branch. Since it was already based on that revision, this will be quick and simple.
  4. Do Team -> Commit to commit your changes to the branch.
  5. Do Team -> Switch to swap back to trunk.

Why is this "better" when it is so many steps? It separates the creation of the branch from the commit of your changes. This makes it easier to create a patch with your changes, or to later merge them back to trunk. The "easy" method is fast and simple way to stash your changes but it will be harder to later reintegrate those changes to the trunk.



(Post a new comment)


[info]bpfurtado
2006-09-01 11:15 am UTC (link)
Nice tips! most of users I've worked don't even know that Branch exists. Good tips on that are always welcome :) As source code versioning tools are one of the most important in our field.

(Reply to this)


[info]rickwoods
2009-05-15 06:18 pm UTC (link)
Thanks! This entry was one of the first few hits on Google for "subclipse commit branch" :-)

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…