伙计们,
我正在尝试取消搁置,然后使用 TF.exe 命令行实用程序下载单个文件。但我一直面临问题。
这是从团队城市界面完成的。有更好的方法吗?
要取消搁置
if "%ShelvesetName%"=="" exit /b 0
"D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEtf.exe" workspaces /server:%tfscollection% /owner:%uDeploy_Username%
"D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEtf.exe" unshelve "%ShelvesetName%" /recursive /noprompt /login:%uDeploy_Username%,%tfspassword%
从 TFS 中的其他根 URL 获取单个文件
"D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEtf.exe" workspaces /server:%tfscollection% /owner:%uDeploy_Username%
"D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEtf.exe" workfold /map "%TFS_BRANCH_SPECIAL%" "%wspath%"
"D:Program Files (x86)Microsoft Visual Studio 12.0Common7IDEtf.exe" get /v:LnewLabel
如果要取消搁置到其他位置/分支。您可以尝试使用 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"
如果要下载到其他本地工作区,只需将其取消搁置到相应的服务器路径/分支,然后将分支从服务器下载到本地工作区。
可以参考此博客的更多详细信息:将搁置集移动到 TFS 中的其他分支