VersionControlServer.QueryHistory Method (String, VersionSpec, Int32, RecursionType, String, VersionSpec, VersionSpec, Int32, Boolean, Boolean, Boolean)
Gets an enumerable collection of changesets that matches the specified items and versions.
Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
Syntax
'Declaration
Public Function QueryHistory ( _
path As String, _
version As VersionSpec, _
deletionId As Integer, _
recursion As RecursionType, _
user As String, _
versionFrom As VersionSpec, _
versionTo As VersionSpec, _
maxCount As Integer, _
includeChanges As Boolean, _
slotMode As Boolean, _
includeDownloadInfo As Boolean _
) As IEnumerable
'Usage
Dim instance As VersionControlServer
Dim path As String
Dim version As VersionSpec
Dim deletionId As Integer
Dim recursion As RecursionType
Dim user As String
Dim versionFrom As VersionSpec
Dim versionTo As VersionSpec
Dim maxCount As Integer
Dim includeChanges As Boolean
Dim slotMode As Boolean
Dim includeDownloadInfo As Boolean
Dim returnValue As IEnumerable
returnValue = instance.QueryHistory(path, _
version, deletionId, recursion, user, _
versionFrom, versionTo, maxCount, _
includeChanges, slotMode, includeDownloadInfo)
public IEnumerable QueryHistory(
string path,
VersionSpec version,
int deletionId,
RecursionType recursion,
string user,
VersionSpec versionFrom,
VersionSpec versionTo,
int maxCount,
bool includeChanges,
bool slotMode,
bool includeDownloadInfo
)
public:
IEnumerable^ QueryHistory(
String^ path,
VersionSpec^ version,
int deletionId,
RecursionType recursion,
String^ user,
VersionSpec^ versionFrom,
VersionSpec^ versionTo,
int maxCount,
bool includeChanges,
bool slotMode,
bool includeDownloadInfo
)
public function QueryHistory(
path : String,
version : VersionSpec,
deletionId : int,
recursion : RecursionType,
user : String,
versionFrom : VersionSpec,
versionTo : VersionSpec,
maxCount : int,
includeChanges : boolean,
slotMode : boolean,
includeDownloadInfo : boolean
) : IEnumerable
Parameters
path
Type: System.StringThe item for which you want to get the history. The string may represent a Team Foundation Server path ($/CmdLine/parse.cs) or a local path (C:\Code\CmdLine\parse.cs), in the latter case, the local path is mapped to a server path via a workspace. Wildcards are also supported.
version
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpecThe version of the specified item for which history should be queried.
deletionId
Type: System.Int32The deletion ID assigned for the item, if it is deleted. Use 0 for a non- deleted item. Note that this refers to the passed item, not to any lower-level items whose histories may be discovered in a recursive search.
- recursion
Type: Microsoft.TeamFoundation.VersionControl.Client.RecursionType
user
Type: System.StringThe user for whom history should be queried. Use null to search for any user.
versionFrom
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpecThe start of a version range for which history should be queried. Use null to start with the first changeset.
versionTo
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpecThe end of a version range for which history should be queried. Use null to end with the latest changeset.
maxCount
Type: System.Int32The maximum number of history entries that should be returned. Use Int32.MaxValue to get all changes.
includeChanges
Type: System.BooleanA flag that, if true, includes the individual item changes with the changesets; otherwise, only changeset metadata is included.
slotMode
Type: System.BooleanThe slotMode comes into play when there have been multiple items with the same Team Foundation Server path. For instance, you may have had a file called $/CmdLine/parser.cs and then deleted it and added a different file called $/CmdLine/parser.cs. If slotMode is true, the returned changesets may reflect both (all) of these items. If it is false, the returned changesets will reflect the single item that currently occupies the requested path, regardless of whether it previously occupied the requested path in its historical version.
includeDownloadInfo
Type: System.BooleanIf you set includeDownloadInfo to true, the enumerated Changesets will contain information required to download a file. The initial QueryHistory call will be slower, so should only be used if you want to download the file using the returned object.
Return Value
Type: System.Collections.IEnumerable
A collection of Changeset objects that matches the query, in reverse-chronological order.
Remarks
Only set includeDownloadInfo to true if you want to download the files by using the returned objects. The call will be faster and require less bandwidth when this parameter is set to false. The overload methods set includeDownloadInfo to false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.