0

伙计们,

我正在尝试取消搁置,然后使用 TF.exe 命令行实用程序下载单个文件。但我一直面临问题。

这是从 teamcity 界面完成的。有更好的方法吗?

搁置

if "%ShelvesetName%"=="" exit /b 0
"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspaces /server:%tfscollection% /owner:%uDeploy_Username%
"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" unshelve "%ShelvesetName%" /recursive /noprompt /login:%uDeploy_Username%,%tfspassword%

从 TFS 中的不同 Root url 获取单个文件

"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workspaces /server:%tfscollection% /owner:%uDeploy_Username%
"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" workfold /map "%TFS_BRANCH_SPECIAL%" "%wspath%"
"D:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\tf.exe" get /v:LnewLabel
4

1 回答 1

0

如果您想取消搁置到不同的位置/分支。您可以尝试使用tfs 电动工具

使用 TFPT 在 cmd 中定义您的路径。然后,从那里,您转到要取消搁置代码的目标文件夹或工作区。

1. c:\>path = %path%;C:\Program Files (x86)\Microsoft Team Foundation Server 201x Power Tools

2. cd c:\[some location]\"destination workspace"

3. tfpt unshelve /migrate /source:"$/ProjectName/Branch" /target:"$/ProjectName/Targetbranch" "My Shelveset Name"

如果要下载到不同的本地工作区,只需将其取消搁置到相应的服务器路径/分支,然后将分支从服务器下载到本地工作区。

更多细节可以参考这篇博客:Move Shelveset to a different Branch in TFS

于 2017-06-16T07:53:20.890 回答