由于缺少映射,TFS 2015门控检入失败 [英] TFS 2015 Gated check-in failed due to missing mapping

查看:98
本文介绍了由于缺少映射,TFS 2015门控检入失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的代码位于一个TFS项目中,我们还有多个其他项目包含数据:

Our code sits in one TFS project, and we have multiple other projects that contain data:

$/
- $/Code
- $/Data1
- $/Data2

我们定义了门控的签入构建,以在每次签入$ / Code时运行。我们不关心每个项目的数据,因为我们只想构建共享的$ / Code项目。

We have defined a gated check-in build to run on each check-in to $/Code. We don't care about each individual project's data for that matter, since we only want to build the shared $/Code project.

问题是当用户检查时-在代码更改和数据更改(即同时更改$ / Code和$ / Data1)中,构建失败,因为我们的构建定义中没有$ / Data1的映射:对于$ / Data1 /没有合适的映射file.txt。

The problem is that when a user checks-in a code change together with data change, i.e. alters both $/Code and $/Data1, the build fails because we don't have mapping for $/Data1 in our build definition: "No appropriate mapping exists for $/Data1/file.txt".

理论上可以通过映射每个$ / DataN来解决,但这是要映射的 lot 内容,我想一个更简单的解决方案。我可以以某种方式告诉TFS忽略架子集中的未映射文件吗?类似于

This can theoretically be solved by mapping each $/DataN, but it's a lot of content to map and I want a simpler solution. Can I somehow tell TFS to just ignore unmapped files in the shelveset? Something like this maybe?

推荐答案

您可能已经聚集了,这在不可能时刻。您可以指示开发人员将 $ /代码与任何 $ / DataN 分别签入。您甚至可以设置签入策略,以警告开发人员该问题。

As you've probably gathered, this is not possible at the moment. You could instruct your developers to check in $/Code separately from any $/DataN. You could even setup a Checkin Policy which will warn the developers of the issue.

如果您真的只对代码构建感兴趣,那么我会选择这样的代码一个解决方案。

If you're really only interested in the code building, then I'd opt for such a solution.

关于其工作原理的解释...构建代理将分配给您用户的架子集搁置起来,再次以其自己的名称存放到确保正在构建的数据与在构建结束时检入的数据完全相同。如果当前工作空间中没有所有数据,则将失败。最后,以其名称进行了货架集中的构建检查。

As to why it works as it does... The build agent unshelves the shelfset that is assigned to your user, shelves it again under it's own name to make sure the data being built is exactly the data being checked in at the end of the build. This would fail if not all data was present in the current workspace. At the end the build checks in the shelveset that's made under its name.

由于这些细节,我不希望很快会添加此功能。如果构建无法验证将要检入的代码确实是刚刚构建的代码,则有可能造成严重的不一致。审核员会很合适:)。

Because of these details, I do not expect this feature to be added any time soon, there is a chance of creating nasty inconsistencies if the build is unable to validate that the code it is about to check in is really the code that it just built. Auditors would have a fit :).

这篇关于由于缺少映射,TFS 2015门控检入失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆