Merge Changes for specific Work Item

In TFS 2010 we have a development branch where all development is done for one product. I want to merge some of these changes to a release candidate branch, so it can be tested and rolled out. Therefore I would like to merge all changesets that are linked to specific work items we want to put into the release candidate.

I can track all changesets for a specific work item but I cannot easily merge them into the RC-branch. I can neither drag more than one changeset in the hierarchy tracking view nor pre-select the changesets in the Merge Wizard. By default it always wants to merge all changesets UP to the dragged one, which is definately not what I want. Since it could be dozens of changesets I don't want to select them all manually.

Is there any way to do this in the "right" way?


What you are talking about is a "cherry-pick" merge. Overall, cherry-pick merges are not a best practice, so if you are thinking this is going to happen lots, you should probably revisit your branching strategy (eg branch on feature, versus branch on release). Then you can simply merge entire branches instead of doing cherry-pick.

You are going to find that TFS does not support this type of merge very well. When you merge on changeset, it will merge all files up to and including that changeset. You may be able to get away with labeling the files in the specific changesets and merging based on label, but I'm doubtful that will work.

We have a situation in my organization where we needed to support this type of functionality. Ultimately, we wrote a utility that allows us to pick and choose files from multiple changesets and merge them to a branch. The code to do this is relatively straightforward.

链接地址: http://www.djcxy.com/p/31810.html

上一篇: 在Team Foundation Server 2010中删除分支映射

下一篇: 合并特定工作项目的更改