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)

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
)

Parameters

path
Type: System.String

The 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.VersionSpec

The version of the specified item for which history should be queried.

deletionId
Type: System.Int32

The 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.String

The user for whom history should be queried. Use null to search for any user.

versionFrom
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpec

The 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.VersionSpec

The end of a version range for which history should be queried. Use null to end with the latest changeset.

maxCount
Type: System.Int32

The maximum number of history entries that should be returned. Use Int32.MaxValue to get all changes.

includeChanges
Type: System.Boolean

A flag that, if true, includes the individual item changes with the changesets; otherwise, only changeset metadata is included.

slotMode
Type: System.Boolean

The 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.Boolean

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

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.

Community Additions

ADD
Show: