为什么从 TFS 中的命令行获取命令会删除并行项目? [英] Why command get from a command line in TFS removes parallel projects?

查看:23
本文介绍了为什么从 TFS 中的命令行获取命令会删除并行项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 2 个项目 A 和 B.它们应该保留在并行目录中.我创建了 2 个标签,一个用于项目 A,另一个用于项目 B.

I have 2 projects A and B. They should remain in parallel directories. I created 2 labels, one for project A, the other one for project B.

我对项目 A 使用 tf get by label,然后对另一个项目 B 使用 tf get by label.出于某种原因,tf get by label A 删除了另一个项目 B,反之亦然.

I use tf get by label for project A and then tf get by label for another project B. For some reason tf get by label A deletes another project B and vise versa.

从 Visual Studio 客户端按标签签出看起来不错 - 我可以得到两个项目

Checking out by Label from the Visual Studio Client looks fine – I can get both projects

推荐答案

如果标签 A 只包含项目 A,而标签 B 只包含项目 B,那么当你要求 TFS 对 $/,然后它将确保您的工作区符合您的要求,直到并包括删除本地存在的不属于标签 A 的项目.

If label A contains only project A, and label B contains only project B, then when you ask TFS to do a get of $/, then it will ensure that your workspace matches what you requested, up to and including deleting items that exist locally that aren't part of label A.

如果您在 Visual Studio 中看到差异,那可能是因为您选择了 project A 并在标签 A 和 project B 上执行 get 并执行进入标签 B.这意味着 project A 位于标签 A 给定的变更集,project B 位于项目 B 给定的变更集.

If you're seeing differences in Visual Studio, that's probably because you're selecting project A and performing a get on the label A and project B and performing a get on label B. This would mean that project A is at the changeset given by label A and project B is at the changeset given by project B.

另一方面,当您对标签规范执行 $/ 的获取时,您将获得标签规范.

On the other hand, when you perform a get of $/ at a label spec, then you will get only the label spec.

如果你想匹配 Visual Studio 的行为,你可以对 project Aproject B 做一个 get:

If you want to match the behavior of Visual Studio, you can do a get of project A and project B:

tf get $/ProjectA /version:LA
tf get $/ProjectB /version:LB

这篇关于为什么从 TFS 中的命令行获取命令会删除并行项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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