TFS 中的取消上架:这是什么意思?

发布于 08-22 15:02 字数 164 浏览 12 评论 0原文

这是我得到的部分:当您搁置在 TFS 中时,它会生成更改的服务器副本,这样它们就不会丢失,但不会将它们签入您正在处理的源代码主干/分支中。

问:什么情况下会使用“取消搁置”功能?这是否意味着它将从 TFS 服务器中删除搁置集?你能从书架上获取吗?或者它真的只是搁置集和“真实”源代码之间的差异描述?

Here's the part I get: When you shelve in TFS, it makes a server copy of the changes so they are not lost, but does not check them into the source code trunk/branch you are working on.

Question: Under what circumstances would you use the "unshelve" feature? Does it mean it will remove the shelveset from the TFS server? Can you do a get from a shelveset? Or is it really just a diff description between the shelveset and the "real" source code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

忆梦2024-08-29 15:02:44

取消搁置是将搁置组恢复到机器上的方法,以便您可以继续处理它。它不会更改服务器上的搁置集(为此,您需要再次搁置事物并使用相同的搁置集名称)。

我如何使用它的一个例子是在我处理机器时在机器之间移动更改。我会将其搁置在台式机上,然后将其取消搁置在笔记本电脑上,然后继续在笔记本电脑上工作。

您还可以使用它与某人共享更改(出于代码审查或其他原因)。您搁置更改,然后其他人可以取消搁置更改以查看您所做的操作。

取消搁置实际上不会更改搁置集或服务器上的任何其他内容。这只是一个 get 操作。

Unshelving is how you restore the shelveset to your machine so you can keep working on it. It doesn't change the shelveset on the server (to do that you need to shelve things again and use the same shelveset name).

One example for how I use it is to move changes between machines while I'm working on them. I'll shelve it on my desktop machine, then unshelve it on the laptop and then continue working on the laptop.

You can also use it to share changes with someone (for code reviews or other reasons). You shelve your changes, then the other person can go and unshelve it to see what you've done.

Unshelving doesn't actually change the shelveset or anything else on the server. It's just a get operation.

一指流沙2024-08-29 15:02:44

爱马仕是当之无愧的。阅读他的回答。

一个重要的警告:如果您在创建搁置集后执行了“获取”操作,则取消搁置将仅回滚搁置集中包含的文件的本地版本。因此,您很可能会遇到不一致的工作空间。

一个好的做法是在取消搁置后始终重新运行 Get。这可以确保您不会在虚拟构建错误上浪费时间,这些错误实际上只是处于半新/半旧状态的副作用。它还要求您主动解决搁置集内容和最新服务器修订版之间的任何冲突,而不是仅在签入时发现它们。

Herms is spot on. Read his answer.

One important caveat: if you've done a Get since the shelveset was created, Unshelve will only rollback the local version of files contained in the shelveset. Thus, it's quite likely you'll have an inconsistent workspace.

A good practice is to always re-run Get after you Unshelve. This ensures you don't waste time on phantom build errors that are actually just side effects of being in a half-new/half-old state. It will also require you to resolve any conflicts between the shelveset contents and the latest server revisions proactively, instead of only discovering them @ Checkin time.

舂唻埖巳落2024-08-29 15:02:44

我使用搁置来备份正在进行的代码,以防万一我的硬盘崩溃或其他什么情况。我什至不必担心代码构建,更不用担心工作,因为我的团队中的任何其他开发人员都不会看到该工作(除非他们去寻找它)。

取消搁置会将更改挂回到您的工作区中。从服务器中删除搁置集是删除。

按照理查德·伯格的说法,电动工具版本的取消搁置实际上包括获取和解析。

I use shelve to back up code-in-progress, just on the off chance my hard drive crashes or whatnot. I don't even have to worry about the code building, never mind working, since the work won't be seen by any other developers on my team (unless they go looking for it).

Unshelve pends the changes back in your workspace. Removing the shelveset from the server is a Delete.

Following on to what Richard Berg said, the power tools' version of unshelve actually includes a get and resolve.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文