TFS 中的搁置是什么?
在 TFS 中搁置仅仅是一种软签入,以便其他团队成员可以看到源代码吗?
即搁置的代码不会被编译对吗?
Is shelving in TFS merely a soft checkin so other team members can see the source code?
i.e. the shelved code will not be compiled right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
在这些讨论中,许多讨论中都忽略了一点,那就是如何恢复到搁置更改的同一台计算机上。 也许对大多数人来说是显而易见的,但对我来说却并非如此。 我相信您执行了撤消挂起的更改 - 是这样吗?
我了解该过程如下:
因此,如果您想开始一些可能需要搁置的工作,请确保在开始之前签入,作为签入点是您在执行上面的“撤消挂起的更改”步骤时将返回的位置。
One point that is missed in a lot of these discussions is how you revert back on the SAME machine on which you shelved your changes. Perhaps obvious to most, but wasn't to me. I believe you perform an Undo Pending Changes - is that right?
I understand the process to be as follows:
So, if you want to start some work which you may need to Shelve, make sure you check-in before you start, as the check-in point is where you'll return to when doing the Undo Pending Changes step above.
我一直遇到这种情况,因此有关分支的补充信息:
如果您正在使用多个分支,则搁置集将与您在其中创建它们的特定分支相关联。 因此,如果您让某个变更集在架子上搁置太久,并且必须将其取消搁置到另一个分支,那么您必须通过 7 月份发布的电动工具来做到这一点。
I come across this all the time, so supplemental information regarding branches:
If you're working with multiple branches, shelvesets are tied to the specific branch in which you created them. So, if you let a changeset rust on the shelf for too long and have to unshelve to a different branch, then you have to do that with the July release of the power tools.
搁置就像您的更改已存储在源代码管理中,而不影响现有更改。 意味着如果您在源代码管理中签入文件,它将修改现有文件,但搁置就像将更改存储在源代码管理中但不修改实际更改。
Shelving is like your changes have been stored in the source control without affecting the existing changes. Means if you check in a file in source control it will modify the existing file but shelving is like storing your changes in source control but without modifying the actual changes.
@贾里德帕:
是的,您可以使用搁置集进行评论,但请记住,搁置集可能会被您自己/其他人覆盖,因此并不稳定。 因此,对于与监管相关的审查,您永远不应该使用搁置集作为基础,而应该使用签入(变更集)。
对于非正式审查是可以的,但对于正式(例如 FTA 相关)审查则不行!
@JaredPar:
Yes you can use Shelvesets for reviews but keep in mind that shelvesets can be overwritten by yourself/others and therefore are not long term stable. Therefore for regulatory relevant reviews you should never use a Shelveset as base but rather a checkin (Changeset).
For an informal review it is ok but not for a formal (E.g. FTA relevant) review!
如果您使用门控构建,则触发构建时,它会创建提交构建的工作区的搁置集。 如果构建失败,搁置集将被拒绝。 如果构建成功,则会创建变更集并将其提交到 TFS。 无论哪种情况,执行签入/构建的人员都必须协调工作区,这就像执行“获取最新”一样简单。
If you're using Gated builds, when a build is triggered, it creates a shelveset of your workspace that is submitted for build. If the build fails, the shelveset is rejected. If the build is successful, a changeset is created and committed to TFS. In either event, the person doing that check-in/build will have to reconcile the workspace, which is as simple as performing a Get Latest.
货架有很多用途。 主要有:
还有其他用途吗?
Shelving has many uses. The main ones are:
Any other uses?
搁置是一种无需签入即可保存盒子上所有更改的方法。更改将保留在服务器上。 稍后您或您的任何队友都可以将它们“取消搁置”回您的任何一台机器上。
它也非常适合审查目的。 在我的团队中,我们会搁置更改并发送一封电子邮件,其中包含更改说明和更改集名称。 然后团队中的人员可以查看变更集并提供反馈。
仅供参考:查看搁置集的最佳方法是使用以下命令
tfpt 是 Team Foundation Power Tools 的一部分
Shelving is a way of saving all of the changes on your box without checking in. The changes are persisted on the server. At any later time you or any of your team-mates can "unshelve" them back onto any one of your machines.
It's also great for review purposes. On my team for a check in we shelve up our changes and send out an email with the change description and name of the changeset. People on the team can then view the changeset and give feedback.
FYI: The best way to review a shelveset is with the following command
tfpt is a part of the Team Foundation Power Tools
这是正确的。 如果您创建一个架子,其他执行获取最新操作的人将看不到您的代码。
它将您的代码更改保存到服务器上,这可能比您的工作 PC 得到更好的备份。
如果您想在家工作,它使您可以在另一台计算机上进行更改。
其他人可以看到您的书架(尽管我认为这可能是可选的),以便他们可以在签入之前查看您的代码。
That's right. If you create a shelf, other people doing a get latest won't see your code.
It puts your code changes onto the server, which is probably better backed up than your work PC.
It enables you to pick up your changes on another machine, should you feel the urge to work from home.
Others can see your shelves (though I think this may be optional) so they can review your code prior to a check-in.