Question

I recently created a maintenance/bug-fix branch in our SVN repository, in order to make stable releases while we will introduce new features on the trunk. This branch is called "4.2.x"

Now, one developper of the team didn't switch his working copy to the 4.2.x branch and commited changes to the trunk. These changes should be in the 4.2.x branch along with other bug fixes and small changes, to be shipped to the customer in the next 4.2 release.

These changes are comprised in a bunch of consecutive revisions, say 500 to 510, and they are the latest commits made to the trunk.

What is the best and cleanest way to bring these changes back to 4.2.x branch, and out of the trunk, in a way that won't cause problems later when we want to merge the 4.2.x branch to the trunk ?

Was it helpful?

Solution

Merge revisions 500 to 510 from trunk to branch, and commit the branch.

Since these are bug fixes, they should normally also be done in the trunk, so I would leave the trunk as is. If you really want to remove them from the trunk, then undo these changes.

To avoid merging back those changes from the branch to the trunk, merge the commit from the branch to the trunk with the option "record only".

OTHER TIPS

You should be able to create a copy of the repository for those revisions in a separate project, then branch these. Once that's done, you can then revert the trunk back before these changes were made. And make a backup first.

Just revert changes from revisions 500-510 and you should be fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top