我一直在寻找与git reset
相当的TF.exe命令行等效命令。 我发现了TFPT scorch
,但是这是用于构建服务器(jenkins)上使用的,并且我似乎无法安装Power Tools(以标准方式)或使其工作(非标准方式,复制)。
是否存在以下方法:
- 在构建服务器上安装tfpt.exe的方法(不需要也不能安装Visual Studio)?
- 使用一系列TF.exe命令来模拟此命令?
我一直在寻找与git reset
相当的TF.exe命令行等效命令。 我发现了TFPT scorch
,但是这是用于构建服务器(jenkins)上使用的,并且我似乎无法安装Power Tools(以标准方式)或使其工作(非标准方式,复制)。
是否存在以下方法:
您没有说明使用的TFS版本。不过,有一个等价的命令:tf reconcile /clean
。
根据tf
文档:
Microsoft (R) TF - Team Foundation Version Control Tool, Version 12.0.30501.0
Copyright (c) Microsoft Corporation. All rights reserved.
Compares the current state of the workspace on disk with the server's view,
either to clean the workspace or to promote unpended local changes.
tf reconcile /clean [/diff] [/noprompt] [/preview] [/recursive] [/ignore]
[/unmapped] [/exclude:itemspec1,itemspec2,...] [itemspec]
tf reconcile /promote [/adds] [/deletes] [/diff] [/noprompt] [/preview]
[/recursive] [/noignore] [/exclude:itemspec1,itemspec2,...]
[itemspec]
运行:
tf reconcile /clean /diff /noprompt /recursive *.*
等价于:
tfpt scorch *.* /noprompt /recursive /deletes /diff
有趣的事实是,这个命令在当前的tf.exe文档中并不存在。
另外,正如@Jonathan所提到的,现在也有一个tf scorch
命令,它与tf reconcile
非常相似。如果有区别,我找不到支持它的文档。很可能与2013年添加的允许真正“离线”开发的本地与服务器工作区有关。
我在构建代理安装脚本中自动安装TFPT:
msiexec /qb /i "tfpt.msi" ADDLOCAL=CLI /l*v tfpt-log.log
TFSPowerToolDir
环境变量很容易找到它。更新:这需要Visual Studio - 我安装了其中的一个子集,只有vs_teamExplorer.exe
和vstf_testagent.exe
。tf.exe
现在也有/scorch
选项。它在VS2013中不存在,但在VS2013 SP4中存在。Workspace.QueryItems
在工作区版本中收集服务器上的项目列表。
tf
命令行客户端没有简单的方法来执行烧录等价操作。 - Edward Thomsonscorch
包含为tf
命令。 - Edward Thomson