Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

VersionControlServer.CreateBranch Method (String, String, VersionSpec, String, String, CheckinNote, PolicyOverrideInfo, Mapping[])

Creates a branch on the server and checks it in without downloading the branch to the client.

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

public function CreateBranch(
	sourcePath : String, 
	targetPath : String, 
	version : VersionSpec, 
	owner : String, 
	comment : String, 
	checkinNote : CheckinNote, 
	policyOverride : PolicyOverrideInfo, 
	mappings : Mapping[]
) : int

Parameters

sourcePath
Type: System.String

Source path of the branch - must be a server path.

targetPath
Type: System.String

Target path of the branch - must be a server path.

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

Changeset or DateTime version spec with which to create the branch.

owner
Type: System.String

Owner of the Changeset. If null, defaults to the authenticated user.

comment
Type: System.String

Comment on the Changeset. Can be null.

checkinNote
Type: Microsoft.TeamFoundation.VersionControl.Client.CheckinNote

CheckinNote. Can be null.

policyOverride
Type: Microsoft.TeamFoundation.VersionControl.Client.PolicyOverrideInfo

PolicyOverrideInfo. Can be null.

mappings
Type: Microsoft.TeamFoundation.VersionControl.Client.Mapping[]

An array of mappings under the target path to include or exclude from the branch.

Return Value

Type: System.Int32
Changeset identifier for the check in of the branch.

Show:
© 2015 Microsoft