如何在 TFS 中恢复/撤消未更改的文件? [英] How to revert / undo unchanged files in TFS?

查看:37
本文介绍了如何在 TFS 中恢复/撤消未更改的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一个有用的命令可以在 TFS 中撤消未更改的文件.

I would like to know if there is a usefull command for undoing unchanged files in TFS.

我尝试过tfpt uu"命令.但它只会撤消/恢复服务器上和我的本地工作区中未更改的文件.例如.在服务器上更改但未在工作区中触及的所有文件都保留为签出状态.我想要的是恢复/撤消我工作区中所有未更改的文件.tfpt uu 命令似乎对这个场景没用.

I have tried with the "tfpt uu" command. But it only undoes/reverts the files that was unchanged on the server and in my local workspace. Eg. all the files that was changed on the server but wasn't touched in the workspace is left as checked out. What I want is to revert/undo all the files that was unchanged in my workspace. The tfpt uu-command seems to be useless for the scenario.

如何在 TFS 中恢复/撤消未更改的文件,其中未更改文件的定义是工作区中未更改的文件.

How can i revert/undo unchanged files in TFS, where the definiton of an unchanged file is a file that was not changed in the workspace.

示例:

我有两个工作区 ws1 和 ws2.Ws2 用于模拟其他用户在 TFS 中进行源更改,而 ws1 代表我自己的工作区.我们有 3 个文件 A、B 和 C.

I have two workspaces ws1 and ws2. Ws2 is for simulating an other user making source changes in TFS and ws1 represents my own workspace. We have 3 files A, B and C.

  1. 检出 ws1 上的所有文件.(A、B、C 已签出)
  2. 在 ws2 中更改文件 A.
  3. 在 ws2 中签入文件 A.
  4. 更改 ws1 中的文件 B.
  5. 在 ws1 上执行 tfpt uu.

唯一恢复/撤销的文件是 C.文件 A 和 B 仍在 ws1 中签出

The only file reverted/undone is C. The files A and B are still checked out in ws1

我希望 A 和 C 都恢复/撤消,因为它们在 ws1 中没有改变.

I would expect that both A and C where reverted/undone, since they have not been changed in ws1.

推荐答案

tfpt uu 上指定 /noget 选项,我想你会得到你的行为之后.

Specify the /noget option on tfpt uu, and I think you will get the behavior you are after.

这篇关于如何在 TFS 中恢复/撤消未更改的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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