Question

I have a long-lived feature development branch, let's call it dev-foo. The problem is that when I try to merge it into release-1, I get all kinds of horrible tree-conflicts and source conflicts that don't make any sense. I've re-integrated them into a new trunk-based branch, along with other features that want to be integrated together. Every merge that I attempt to do to or from this integration branch is similarly horribly conflicted. What can I do?

Was it helpful?

Solution

I strongly suspect that one of the merges from trunk in your development branch was accidentally broken by you somewhere in the process of resolving conflicts and committing it. This means that the merge history of your development branch is "poisoned" and merging it will only prolong the pain and suffering for you and everyone else.

Take heart, all is not lost!

Here is the method that I used to "reconstruct" broken development branches for the purposes of re-integration without bringing in the previous broken merges from trunk:

  1. Start a new branch from the same point that the development branch was started.
  2. Merge all dev-branch revisions into the reconstruction branch - up to, but not including, the next merge from its parent branch (trunk).
  3. Merge from the dev-branch-parent (trunk) into the reconstruction branch the same revisions that were merged in at the next step in the original dev-branch history. Don't get it wrong this time.
  4. Compare (between SVN URLs) the dev-branch at this point with your reconstruction branch so far. Justify or fix any differences before you move on.
  5. Repeat steps 2-4 until you've reconstructed the entire development-branch, but without the merging problems.
  6. Merge the reintegration target branch into the reconstructed development branch.
  7. Resolve any development conflicts and test the build.
  8. Re-integrate merge the reconstructed development branch into the target branch.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top