我上次“获取最新信息”是什么时候?来自 TFS?

发布于 2024-08-07 13:18:49 字数 168 浏览 8 评论 0原文

我的机器上有一些版本的代码。我想设置第二台具有相同版本代码的机器,这样我就可以根据该版本下拉一个搁置集。但是,我没有写下我上次在计算机上获取最新信息的日期/时间。

为了获得正确的版本,我需要知道我上次在我的机器上“获取最新版本”的确切时间。我确信一定有某种方法可以做到这一点,也许是在命令行上。有谁知道吗?

I have some version of code on my machine. I want to set up a second machine with the same version of code so I can pull down a shelveset based off this version. However, I didn't write down the day/time I last did get latest on my machine.

To get the right version, I need to know when exactly I last did 'get latest' on my machine. I'm sure there must be some way to do this, maybe on the command line. Does anyone know?

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

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

发布评论

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

评论(3

黑白记忆 2024-08-14 13:18:49

从相关工作区内部运行此命令:

tf history $/ -r -version:W -stopafter:1

这将告诉您已下载到工作区的最高变更集#。只要您最近的获取操作是完整的“获取最新”(没有路径范围,没有复杂的版本规范),这就是您需要的所有信息。只需在新工作区中运行tf get -version:1234(用 TFS 提供的变更集编号替换版本号)即可使它们同步。当然,您需要确保工作区映射具有可比性等...

如果上述假设不成立并且您的工作区处于更复杂的状态,则复制它的最简单方法是使用标签:

# run in old workspace
tf label MyWorkspaceVersion $/ -r -version:W

# run in new workspace
tf get -version:LMyWorkspaceVersion

Run this from inside the workspace in question:

tf history $/ -r -version:W -stopafter:1

This will tell you the highest changeset # that has been downloaded to your workspace. So long as your most recent Get operation was a full "Get Latest" (no path scope, no complex versionspec), that's all the info you need. Simply run tf get -version:1234 (replacing the version # with the changeset number TFS provides) in the new workspace to bring them in sync. Of course, you need to ensure the workspace mappings are comparable, etc...

If the assumption above don't hold and your workspace is in a more complicated state, the easiest way to replicate it is with labels:

# run in old workspace
tf label MyWorkspaceVersion $/ -r -version:W

# run in new workspace
tf get -version:LMyWorkspaceVersion
夏了南城 2024-08-14 13:18:49

当您下拉搁置集时,它会将您下拉的工作空间设置为与创建搁置集的原始工作空间相同的状态,包括回滚该时间点的文件版本,以便保持一致性。

您需要在 2 号机器上做的就是获取最新版本,然后拉下搁置组并对其进行处理。

如果您只想找出搁置所针对的变更集,请在取消搁置对话框中选择您感兴趣的搁置集并查看其详细信息,右键单击其中一个文件并选择属性。在出现的窗口中,您应该能够看到搁置集的修订号

希望有帮助

When you pull down a shelveset it will set the workspace you pull it down to to the same state of original workspace that created the shelveset, including rolling back versions of the files at that point in time so that you have consistency.

All you need to do on machine #2 is do a get latest, then pull down the shelveset and work on it.

If you just want to find out the changeset the shelve was against then at the unshelve dialog, select the shelveset you are interested in and look at it's details, right click one of the files and select properties. In the window that comes up you should be able to see the shelveset's revision number

Hope that helps

忆伤 2024-08-14 13:18:49

您可以将“好”树复制到新机器上。

You could just copy the 'good' tree onto the new machine.

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