Get-TfsItemHistory 版本参数 [英] Get-TfsItemHistory Version parameter

查看:24
本文介绍了Get-TfsItemHistory 版本参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一种方法来从某个日期从 TFS 中找到一组不同的更改文件.从谷歌搜索我发现这篇文章

I wanted a way to find a distinct set of changed files from TFS from a certain date. From googling I found this article

http://blog.hackedbrain.com/2009/04/01/getting-a-distinct-list-of-changed-files-from-tfs-using-powershell/

在那篇文章中,作者使用了 get-tfsitemhistory cmdlet,带有像这样的 -Version 参数

In that article the author uses the get-tfsitemhistory cmdlet, with the -Version parameter like this

Get-TfsItemHistory "$/Foo/v1.1" -Version "D3/1/09~D3/31/09" -Recurse

从查看 get-help get-tfsitehistory -full 中,没有示例,我得到以下关于 -Version 的信息

From looking at get-help get-tfsitemhistory -full, there are no examples, and I get the following about -Version

-Version <String>
Specifies the version of the items for which to display revision history. By default, Team Foundation uses the
workspace version.

You cannot combine this option with the -slotmode option

Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

我想知道的是

  1. 我究竟如何才能知道如何正确使用 -Version 参数?它是一个字符串,从文章中可以看出您指定了一个日期范围,尽管帮助中没有说.是否有一个 msdn 参考站点,其中清楚地列出了这些内容?通过谷歌搜索,我找不到这样的网站.
  2. 一般而言,Powershell 高级用户如何了解如何使用这些 cmdlet?

推荐答案

通过进一步的谷歌搜索,我能够找到这个论坛主题

From googling further I was able to find this forum thread

http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/f796a935-9760-4590-9335-9213be764f2f

从中我能够找到 tfs powertools powershell 帮助文档,特别是从文件 PowerShellCmdlets.mht

From that I was able to find the tfs powertools powershell help documentation, specifically from the file PowerShellCmdlets.mht

其中有一个关于版本的部分更具描述性.里面还放了几个例子,很有用.

In it there's a section about Version which is a lot more descriptive. It also held several examples, very useful.

-Version <String>
Optional. Specifies the version of the items that you want to retrieve. You can specify     a version by:

·         Date/time (D2008-01-21T16:00)

·         Changeset version (C1256)

·         Label (Lmylabel)

·         Latest version (T)

·         Workspace version (Wworkspacename;owner)

If you do not specify a version, Team Foundation Server retrieves the most recent server version of the specified itemspec into your workspace. 

这篇关于Get-TfsItemHistory 版本参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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