VersionControlServer.CreateBranch Method (String, String, VersionSpec)

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)

Syntax

'Declaration
Public Function CreateBranch ( _
    sourcePath As String, _
    targetPath As String, _
    version As VersionSpec _
) As Integer
public int CreateBranch(
    string sourcePath,
    string targetPath,
    VersionSpec version
)
public:
int CreateBranch(
    String^ sourcePath, 
    String^ targetPath, 
    VersionSpec^ version
)
member CreateBranch : 
        sourcePath:string * 
        targetPath:string * 
        version:VersionSpec -> int
public function CreateBranch(
    sourcePath : String, 
    targetPath : String, 
    version : VersionSpec
) : 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.

Return Value

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

.NET Framework Security

See Also

Reference

VersionControlServer Class

CreateBranch Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace