TFS 2015 构建将额外的工作项和变更集与自身相关联

TFS 2015 build associates additional work items and changesets with itself

我已经解决了这个问题 - - 但不认同解决方案。

在我的例子中,构建工作正常,正在编译解决方案并生成输出。但是,在构建结束后,在摘要页面上,关联的更改具有来自团队项目下所有文件夹的变更集,并且类似地,关联的工作项也属于这些变更集。

在映射下,我选择了解决方案所在的确切文件夹。

$/team-project/ParentFolder_Ten/myProject 设置为 $(build.sourcesDirectory)\Source $/team-project/CommonReferenceFolder 设置为 $(build.sourcesDirectory)\Reference

CommonReferenceFolder 跨不同的源路径使用,因此保存在一个公共位置而不是在 $/team-project/ParentFolder_Ten/

通过批量更改启用持续集成。

包含= $/teamproject/ParentFolder_Ten/myProject

我们看到的问题是: - 在仪表板页面上,我们看到带有已完成和已排队构建的所有构建定义,源分支列设置为 $/teamproject 而不是 $/teamproject/ParentFolder_Ten/myProject。可能是因为这是两个映射的公共路径。也许正因为如此,它关联了链接到 $/team-project 下所有文件夹的所有变更集,而不必只是 $/teamproject/ParentFolder_Ten/myProject,这是所需要的。

因此,尽管仅当对 $/teamproject/ParentFolder_Ten/myProject 进行更改时才会对构建进行排队,但摘要页面列出了在 $/teamproject/SomeOtherFolder 中进行的更改集和相关工作项。这种扭曲了与构建相关的信息,因为我们只对 $/teamproject/ParentFolder_Ten/myProject 而不是 $/teamproject

的变更集感兴趣

我希望我能把问题陈述解释清楚。对正确方向的任何帮助表示赞赏。如果我需要更清楚的说明,请告知。

根据您的描述,这似乎是一个已知问题:Build summary shows incorrect Source Version.当映射是从其他分支添加时,源分支似乎指的是集合级别团队项目。

When I create a new build definition I have one mapped server path under the repository section. When I run builds for this definition the “Associated changes” are only showing the changes under this server path.

After I add an another mapping under the repository section I see all the changes in this repository.

When I analyze the changes in the history of the definition I see that the “defaultBranch” is changed to the root server path of the repository.

I have tried the same in VSTS and the “defaultBranch” is not changed.

您也可以在这个 MSDN 线程中查看相关讨论:Builds associated with incorrect changesets from other projects

从本期Byran的回复来看,应该会在TFS2015 update3或者即将推出的QU3

中完善

In update3 it was improved to take mappings into consideration instead of just finding the common root. But note that technically TfsVC is collection scoped and mapping can span projects. So should be improved in the upcoming QU3

Bryan [MSFT]