货架的目的是什么? [英] What is the purpose of a shelveset?

查看:38
本文介绍了货架的目的是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 TFS 一段时间了,但作为一个单独的开发人员,我还没有真正充分利用它的功能.我现在的任务是与几个海外同事一起工作,我们将使用 TFS 的共享版本.他们的过程之一是搁置,但我不确定如何使用它.我决定玩一个游戏,但我不确定在创建一个搁置集后该做什么.我的流程如下:-

I've been using TFS for a while now but as a lone developer I haven't really used its features to its full extent. I've now been tasked with working with a couple of colleagues overseas and we will be using a shared version of TFS. One of their processes is shelving, however im not sure on the how to use this. I decided to have a play, but i'm unsure what to do after creating a shelve set. My process was as follows:-

我从 TFS 打开了一个已完全签入的现有项目,并对其中一个文件进行了简单的更改.然后我创建了一个架子集.然后我关闭了该项目并从源代码管理中重新打开它.我注意到我所做的更改没有应用,这是正确的,但是文件仍然被签出给我.在这一点上,我的困惑开始了.如果我创建了一个搁置集,我是否应该执行撤消挂起的更改,以便将原始文件签回到 TFS,以便我的同事可以使用它们或从它们创建构建.

I opened an existing project from TFS that was fully checked in and made a simple change to one of the files. I then created a shelve set. I then closed the project and reopened it from source control. I noticed the change i had made was not applied which was correct however the file was still checked out to me. Its at this point my confusion starts. If I create a shelve set am I supposed to do an undo pending changes so that the original files are checked back into TFS so my colleagues can use them or create a build from them.

我对这个过程有点困惑.

Im a bit confused on the process.

推荐答案

从流程角度(在敏捷商店中),主要用途是确保您的代码使用现有代码进行构建,而不会破坏集成分支上的构建你团队的其他成员.上述项目将帮助您完成此任务.

From a process perspective (in an agile shop) the primary use is to ensure your code builds with the existing code without breaking the build on your integration branch for the rest of your team. The items noted above will help you accomplish this task.

简而言之:如果构建不正确,永远不要检查任何东西.搁置您的代码以确保它在签入之前可以正常工作并且不会破坏构建.如果您确实为您的团队破坏了构建,那么您的夜间构建(如果有的话)将无法工作,因此您的测试人员将无法获得新的构建要使用的代码库.

In short: never check anything in if it does not build correctly. Shelf your code to ensure it works and does not break the build before checking it in. If you do break the build for your team, your nightly builds (if you have them) won't work, so your testers will not have the new code base to work with.

注意:您的代码一开始可能有问题,但没关系,只是不要破坏构建.如果您的代码不够成熟,无法进行测试(破坏某些内容或整个应用程序),请确保您的代码在应用程序中处于非活动状态.有很多技巧可以通过简单地注释代码来执行此操作,以便您可以将其签入以添加某种异常以防止代码运行,除非您在调试期间设置变量.我相信您还可以做数百万件其他事情.

Note: your code might be buggy at first but that's ok, just don't break the build. If your code is not mature enough to be tested (breaks something or perhaps the entire app), ensure your code is inactive in the application. There are lots of tricks for doing this from simply commenting the code out so you can check it in to adding an exception of some kind to prevent the code from running unless you set a variable during your debug. I am sure there are million other things you can do as well.

这篇关于货架的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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