Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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, _
    owner As String, _
    comment As String, _
    checkinNote As CheckinNote, _
    policyOverride As PolicyOverrideInfo, _
    mappings As Mapping() _
) As Integer
public int CreateBranch(
    string sourcePath,
    string targetPath,
    VersionSpec version,
    string owner,
    string comment,
    CheckinNote checkinNote,
    PolicyOverrideInfo policyOverride,
    Mapping[] mappings
)
public:
int CreateBranch(
    String^ sourcePath, 
    String^ targetPath, 
    VersionSpec^ version, 
    String^ owner, 
    String^ comment, 
    CheckinNote^ checkinNote, 
    PolicyOverrideInfo^ policyOverride, 
    array<Mapping^>^ mappings
)
member CreateBranch : 
        sourcePath:string * 
        targetPath:string * 
        version:VersionSpec * 
        owner:string * 
        comment:string * 
        checkinNote:CheckinNote * 
        policyOverride:PolicyOverrideInfo * 
        mappings:Mapping[] -> int
public function CreateBranch(
    sourcePath : String, 
    targetPath : String, 
    version : VersionSpec, 
    owner : String, 
    comment : String, 
    checkinNote : CheckinNote, 
    policyOverride : PolicyOverrideInfo, 
    mappings : Mapping[]
) : int
Parameters
sourcePath
Type: System.StringSource path of the branch - must be a server path.
targetPath
Type: System.StringTarget path of the branch - must be a server path.
version
Type: Microsoft.TeamFoundation.VersionControl.Client.VersionSpecChangeset or DateTime version spec with which to create the branch.
owner
Type: System.StringOwner of the Changeset. If null, defaults to the authenticated user.
comment
Type: System.StringComment on the Changeset. Can be null.
checkinNote
Type: Microsoft.TeamFoundation.VersionControl.Client.CheckinNoteCheckinNote. Can be null.
policyOverride
Type: Microsoft.TeamFoundation.VersionControl.Client.PolicyOverrideInfoPolicyOverrideInfo. Can be null.
mappings
Type: array<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.
.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.