Subversion branching and tagging with Eclipse

Branching to complete a task outside the trunk in Eclipse

Creating the branch
  • Select the trunk working copy
  • Team/Branch/tag…
  • Copy to URL: Use the select button if the branch already exists, otherwise specify new directory in branches
  • Specify copy to be either HEAD or specific revision
  • Specify message for the branch, probably task name
  • When checking out a freshly created branch may have to right click a repository and select refresh before it appears

Checkout the branch to a fresh working copy
  • Can either checkout a fresh copy or switch your current working copy to the branch
  • Checkout fresh copy with New/Project…/SVN/Checkout Projects from SVN
  • Switch a current working copy using Team/Switch to another branch/revision…
Merging any changes from the trunk into your branch
  • Select the branch project directory
  • Update to HEAD
  • Team/Merge…
  • Select ‘Merge a range of revisions’
  • Merge from: /trunk
  • Revisions: All eligible revisions
  • Default conflict options (safest)
  • Any conflicts are flagged and should be dealt with manually
  • Commit

Command line version is a bit more tricky, the revisions to merge must be found manually

 

Branch task completed, merging branch back into the trunk
  • Select the trunk project directory
  • Update to HEAD
  • Team/Merge…
  • Select ‘Reintegrate a branch’
  • Here may get an error if the trunk hasn’t been updated. Update to HEAD
  • Merge from: <branch to merge>
  • Default conflict options (safest)
  • Any conflicts are flagged and should be dealt with manually
  • Commit

 

Tagging a release in Eclipse

All final releases are tagged with name <project><version>

All release candidates are tagged with name <project><version>_rc<release candidate integer version>

  • Select the trunk project directory
  • Team/Branch/tag…
  • Copy to URL: Use the select button if the tag already exists, otherwise specify new directory in tags
  • Specify copy to be either HEAD or specific revision
  • Specify message for the tag, probably version of release
  • When checking out a freshly created tag may have to right click a repository and select refresh