Visual studio 2012 TF.exe工作区重新映射和切换

Visual studio 2012 TF.exe工作区重新映射和切换,visual-studio-2012,tfs,teamcity,tf-cli,Visual Studio 2012,Tfs,Teamcity,Tf Cli,各位 我正在尝试取消搁置,然后使用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:\

各位

我正在尝试取消搁置,然后使用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中的不同根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

如果要取消搁置到其他位置/分支。您可以尝试使用

使用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"
如果要下载到其他本地工作区,只需将其取消搁置到相应的服务器路径/分支,然后将分支从服务器下载到本地工作区


更多详细信息,您可以参考此博客:

如果您只想使用TF.exe命令取消剪切并下载单个文件?为什么需要重新映射和切换工作区?是否要取消搁置到其他位置?