This documentation is archived and is not being maintained.

VersionControlServer.GetMergeCandidates Method

Gets the merge candidates for merging between the requested items.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public MergeCandidate[] GetMergeCandidates(
	string sourcePath,
	string targetPath,
	RecursionType recursion


Type: System.String

The source of the potential merge may be specified as 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.

Type: System.String

The target of the potential merge may also be specified as a Team Foundation Server path or a local path. If local paths are used, and the two items belong to different workspaces, an exception occurs.

Type: Microsoft.TeamFoundation.VersionControl.Client.RecursionType

The recursion parameter controls what items you want to get if you pass in a folder. If recursion is set to RecursionType.None, you will get candidates for that folder itself. (This option is rarely used, as there are not many changes you can make on a folder itself.) If recursion is set to RecursionType.OneLevel, you will get candidate changes on all the items inside that folder. If recursion is set to RecursionType.Full, you will get all items in the full tree under that folder.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.MergeCandidate[]
Returns an array of MergeCandidate objects, each contains a Changeset ID that remains to be merged.

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 overloaded methods set includeDownloadInfo to false.