Question

We're using a branch by feature strategy and we're implementing gated check-ins. Following the branch by feature model a feature branch should be forward integrated from the main branch before the feature is reverse integrated back into the main branch.

My question is ... is there a way in TFS 2010 to detect if a branch has NOT been forward integrated before being reverse integrated to the main branch. I am attempting to minimize the number of merge conflicts that are encountered when merging back to the main branch so I'd like to see if there's a way to prevent merging if the branch has not been forward integrated from main.

I'm looking for a solution to the forward integration issue or advice as to if my logic is sound with what I am attempting to do. I appreciate any advice.

Was it helpful?

Solution

Making sure you've Forward Integrated is always prudent before merging to a main branch. You should rather handle any merge conflicts in your branch before Reverse Integrating. So in that respect your logic is sound.

Figuring out if a branch has been Forward Integrated can be done by looking if any merge candidates exist from main. This can be done using the API method VersionControlServer.GetMergeCandidates() or using the command line tf.exe:

tf merge /candidate /recursive $/TeamProject/Main $/TeamProject/FeatureBranch
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top