Alex Rivera | Logout

Subversion - how to move some changesets from trunk to a branch?

Asked 2009-05-19T16:40:10.533
10

We have a large project with several sub-projects. We're approaching a release of our project, and the new features in one sub-project are not going to be completed before the release as was originally planned. What I'd like to do is move all the changes to that sub project related to the new features into a separate branch to continue work for the next release, but I'm not sure how to best accomplish this.

The situation is basically:

/proj/trunk/A/
/proj/trunk/B/
/proj/trunk/C/

We have revisions a..z checked in since the last release. Revisions d, f, g, and j..n contain work related to a new feature in C which isn't going to be completed in time. Revisions e, h, and q contain unrelated changes in C which need to be in this release. I'd like to create a /proj/branches/new-feature-for-C/ and move changes d, f, g, and j..n there, while keeping e, h, and q in trunk. There is no overlap between changes to be moved to the branch and changes to be kept on the trunk, and none of the changes to be moved to the branch depend on any changes in any other subproject since the last release.

svn
Edit
Report

1 Answer

0

There are many ways to set up repos, but the way I usually do it is this.

trunk - always tracks the latest code in development that will definitely get released
branches/R1 - when I do a release, I create a branch for it, and also a tag (see below R1.0). This branch always tracks the latest version of Release 1.x. If I need to go back, I use the tags, below.
branches/Import Tool - when I am working on a standalone feature that may not get released with latest code (e.g., main product is a calendar, import tool may not be ready in time).
tags/R1.0
tags/R1.1 - every time I release an update to a release, I create a tag, so that I can easily revert to that version e.g., if I need to reproduce a bug
tags/R1.2

When I find a bug in the latest code (trunk), I merge it back into the current release branch (e.g., branches/R1) if necessary.

You don't want to create too many branches, as it will cause more work in merging from the main trunk, so keep the number of branches as small as possible.

answered 2009-05-19T16:53:28.333

Your Answer