如何防止 TFS 删除通过排队构建签入的搁置集? [英] How to prevent TFS from deleting shelvesets that were checked in via a queued build?

查看:41
本文介绍了如何防止 TFS 删除通过排队构建签入的搁置集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

签入搁置集是 TFS 构建系统的一个很好的功能,但搁置集在构建完成后被删除.有没有办法改变这种行为,以便保留搁置集?

Checking in shelvesets is a nice feature of the build system in TFS, but the shelveset is deleted after the build finishes. Is there a way to change this behavior so that the shelveset is preserved?

我一直使用构建+签入搁置集功能来签入来自队友的代码,但有时我不希望原始搁置集被TFS删除.在某些情况下,这可能会导致问题,例如当搁置集与代码审查工作项相关联时.在这种情况下,Visual Studio 会隐藏代码审查中的所有注释,因为它找不到关联的搁置集.

I use the build+check in shelveset feature all the time to check in code from teammates, but sometimes I don't want the original shelveset to be deleted by TFS. In some situations, this can cause problems, like when the shelveset is associated with a code review work item. In that case, all comments from the code review are hidden by Visual Studio because it can't find the associated shelveset.

我在 Visual Studio 中排队构建时搜索了默认属性窗口,但似乎不存在任何选项来控制此行为.我是否必须自定义构建 xaml 来更改此设置,或者是否有已知的方法而不必进行此操作?

I searched on the default properties window when queuing the build in Visual Studio but there doesn't seem to exist any option to control this behavior. Will I have to customize the build xaml to change this, or is there a known way without having to get to that?

推荐答案

如果你的意思是 build+ check inshelfset 是 buildshelfset 并在 build 成功后签入更改如下:

If you mean build+ check in shelveset is building shelveset and check in the changes after build successful as below:

那么不可能.既然您已经签入了您的书架.这与构建无关.所以这个问题和如何签入搁置集和防止删除搁置集是一样的.搁置保存盒子上的所有更改,而无需实际签入.更改将保留在服务器上.所以其他团队成员可以看到源代码,也可以检查其他人的货架.

Then it's impossible. Since you have checked in your shelveset. This is not related to build. So this question is the same as how to check in shelveset and prevent deleting shelvesets. Shelve saving all of the changes on your box without actually checking in. The changes are persisted on the server. So other team members can see the source code and can also check in other's shelvest.

您也可以将 is 视为一种容器.

You can also treat is as a kind of container.

  • 您创建文件并将其提交到搁置集(容器 A).
  • 然后您转到构建代理并将该 Shelveset 放入本地工作区(容器 B)
  • 然后提交搁置集(从容器 A 到源代码管理)从容器 A 签入成功并且容器 A 是删除以反映门控货架已经完成了它的生活循环(如果失败,它将保持完整)

这篇关于如何防止 TFS 删除通过排队构建签入的搁置集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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