Recently I was asked a question:
“If you discourage changeset-based (or cherry-picking) merging, then why does TFS support it? To me it feels like TFS is not fully supporting it because the merge engine isn't robust enough yet to support it, yet they know the feature is important. To me it seems like an essential part of development for large projects. How would you handle this scenario?”
My response follows:
I do not say, that the *tool*, TFS does not fully support changeset-based merging (cherry picking). There are many challenges one needs to understand before making cherry picking a standard merge approach.
Let's use the following scenario:
And so on.
Do you decide in advance that File01 and File02 are part of the same feature and should either be released together or not-released until both are ready? Are the changes to File01 and File02 both attached to the same Work Item? How do you ensure that all of the changesets involving both File01 and File02 are correctly merged (the problem of not merging enough).
How do you ensure that every time a change is checked in (and a new changeset is created) that it is properly associated to the correct work item?
What happens, after you do this first cherry picking merge, if subsequent bug fixes or enhancements are made to file01 and / or file02?
What happens if you discover while testing file01 and file02 that there is a bug in file03 that needs to be resolved before you can release file01 and file02?
I could continue, but I think the point I am making is that when you do cherry picking merges as a part of your regular develop/test/stabilize/release process you have to be much more careful and rely on your developers being much more careful all along the way. The risk is that it is far easier to introduce bugs into the target branch when you rely on cherry picking rather than merging the latest version of a branch that has been stabilized. I am not saying the tools (TFS) cannot or do not support it. But to be clear, no tool will be capable of making sure you cherry pick the changes you want, and only the changes you want, and all of the changes you need to ensure the target branch has just the right changes (not too much and not too little).
The caution against cherry picking is more because of the challenges to the process than with the tools.
Thoughts?