使用Powershell从TFS获取文件夹的最新版本 [英] Get Latest Version of Folder from TFS, using Powershell

查看:170
本文介绍了使用Powershell从TFS获取文件夹的最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Powershell从TFS中"获取最新版本".

我已经安装了TFS Snappin,并在PowerShell中使用了TFS Power Tools cmdlet(例如Get-TfsChildItem和Select-TfsItem等)[解决方案

要获取最新(tf get),请使用Update-TfsWorkspace.

Get-TfsChangeset等同于tf changeset.

I am trying to "Get Latest Version" of a particular folder from TFS, using 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!).

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).

Example : Tfs Path - $/APD-RepairSolutions/Main/Database

Mapped path - D:\TFS\APD-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.)

I am using ..

PS D:\Tfs\APD-RepairSolutions\Main\Database> $server=Get-TfsServer -Name http://tfs:8080/tfs

PS D:\Tfs\APD-RepairSolutions\Main\Database> Get-TfsChangeset -Recurse -Server $Server

Not helping my case - as it is only returning the latest changeset in the current directory.

解决方案

To get latest (tf get) use Update-TfsWorkspace.

Get-TfsChangeset is the equivalent of tf changeset.

这篇关于使用Powershell从TFS获取文件夹的最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆