使用 Powershell 从 TFS 获取最新版本的文件夹 [英] Get Latest Version of Folder from TFS, using Powershell
问题描述
我正在尝试使用 Powershell 从 TFS获取最新版本"特定文件夹.
I am trying to "Get Latest Version" of a particular folder from TFS, using Powershell.
我已经安装了 TFS Snappin,并且一直在 PowerShell 中使用 TFS Power Tools cmdlet(例如 Get-TfsChildItem 和 Select-TfsItem 等)[我如何设置 TFS PowerShell 管理单元 ],并阅读了他们的文档(我觉得这些文档不够解释!).
I have installed the TFS Snappin, and have been using TFS Power Tools cmdlets in PowerShell (such as Get-TfsChildItem and Select-TfsItem etc) [How do I set up TFS PowerShell Snapin ], and have gone through their documentation (which I didn't find explanatory enough!).
对于要使用的确切 cmdlet 感到困惑,当我尝试从 TFS 获取整个文件夹结构的最新版本时,该结构映射到我的本地驱动器(而不仅仅是变更集或 ChildItem).
Confused, on the exact cmdlet to use, when I am trying to get the latest version of an entire Folder structure from TFS, that is mapped to my local drive (and not just a changeset or ChildItem).
示例:Tfs 路径 - $/APD-RepairSolutions/Main/Database
Example : Tfs Path - $/APD-RepairSolutions/Main/Database
映射路径 - D:TFSAPD-RepairSolutions/Main/Database.
Mapped path - D:TFSAPD-RepairSolutions/Main/Database.
我想要一个代码,它可以迭代地获取整个文件夹数据库的最新版本,(具有多个表、存储过程等)
I want a code, that would iteratively get the latest version of the entire folder Database,( that has number of tables,stored procedures etc.)
我正在使用..
PS D:TfsAPD-RepairSolutionsMainDatabase> $server=Get-TfsServer -Name http://tfs:8080/tfs
PS D:TfsAPD-RepairSolutionsMainDatabase> Get-TfsChangeset -Recurse -Server $Server
对我的情况没有帮助 - 因为它只返回当前目录中的最新变更集.
Not helping my case - as it is only returning the latest changeset in the current directory.
推荐答案
要获取最新的 (tf get
),请使用 Update-TfsWorkspace
.
To get latest (tf get
) use Update-TfsWorkspace
.
Get-TfsChangeset
相当于 tf changeset
.
这篇关于使用 Powershell 从 TFS 获取最新版本的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!