We’ve recently introduced the concept of feature branches (using SVN) where I work and I stumbled upon a situation where I’m not sure how to handle it.
Here is a graphic of my situation:

Here’s what the graphic says: I created a branch (feature_phase_1) from the trunk and worked on that branch until I was satisfied with my work. Then, since we must have our code reviewed before it gets back into the trunk, and since I needed that code from the feature_phase_1 to continue working, I created a new branch (feature_phase_2) from the first branch (feature_phase_1). I worked on that branch until the code review was completed on the first branch, committed my changes to feature_phase_2, switched to feature_phase_1, made the requested changes, committed to the branch, then reintegrate-merged to the trunk.
Then I got a headache.
Since it is suggested to not keep on working on a branch that has been reintegrated, I thought I would make a patch with the diff between my two branches and apply it to a new branch (from the trunk, after having reintegrated my feature_phase_1 branch), and delete current feature_phase_2. But it gave me more conflicts and than I expected.
I read somewhere that creating a branch from a branch is also not suggested. I can see why now, since I didn’t know how to handle what was in there. I managed to apply patches and edit conflicts, but it was messy and stuff slipped though the process.
What’s the suggested approach for this kind of situation, that would minimize the risk of conflicts and manual handling of the merge process? Here is what I see:
- Create a feature_phase_2 from the trunk instead of from the branch, merge changes from feature_phase_1 into feature_phase_2, then keep on merging from the trunk as things go on (I would expect conflicts after reintegrating feature_phase_1).

- Keep on working of feature_phase_2 and merge from the trunk once feature_phase_1 is reintegrated, then reintegrate feature_phase_2 to the trunk (a bit like what’s described here). This technique seems to me a bit unclean though, as you have to branch from a branch, then reintegrate two levels.
- ??
Thanks
For your pic. 1 (original workflow) better (I suppose) choice can be:
Merge feature_phase_1 into feature_phase_2 instead of merging trunk to phase_2 (phase_1-239 will be parent of phase_2-241 instead of trunk-240) and after it merge phase_2 to trunk