Repository.CheckIn Method

Commits a set of pending changes. Checkin is part of a larger call sequence to commit files. The sequence is: 1. Call CheckPendingChanges and pass in the list of files and folders to check in. 2. For each file, call UploadFile. 3. Call Checkin and pass the list of files and folders (should match the list in #1). CheckPendingChanges is not necessary, but it allows the caller to be alerted of conflicts before wasting time uploading files.

serverItems must contain at least one item, no duplicates, and no wildcard characters.

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

Syntax

'Declaration
<WebMethodAttribute> _
Public Function CheckIn ( _
    workspaceName As String, _
    ownerName As String, _
    serverItems As String(), _
    info As Changeset, _
    checkinNotificationInfo As CheckinNotificationInfo, _
    checkinOptions As CheckinOptions, _
    <OutAttribute> ByRef failures As StreamingCollection(Of Failure), _
    deferCheckIn As Boolean, _
    checkInTicket As Integer _
) As CheckinResult
[WebMethodAttribute]
public CheckinResult CheckIn(
    string workspaceName,
    string ownerName,
    string[] serverItems,
    Changeset info,
    CheckinNotificationInfo checkinNotificationInfo,
    CheckinOptions checkinOptions,
    out StreamingCollection<Failure> failures,
    bool deferCheckIn,
    int checkInTicket
)
[WebMethodAttribute]
public:
CheckinResult^ CheckIn(
    String^ workspaceName, 
    String^ ownerName, 
    array<String^>^ serverItems, 
    Changeset^ info, 
    CheckinNotificationInfo^ checkinNotificationInfo, 
    CheckinOptions checkinOptions, 
    [OutAttribute] StreamingCollection<Failure^>^% failures, 
    bool deferCheckIn, 
    int checkInTicket
)
[<WebMethodAttribute>]
member CheckIn : 
        workspaceName:string * 
        ownerName:string * 
        serverItems:string[] * 
        info:Changeset * 
        checkinNotificationInfo:CheckinNotificationInfo * 
        checkinOptions:CheckinOptions * 
        failures:StreamingCollection<Failure> byref * 
        deferCheckIn:bool * 
        checkInTicket:int -> CheckinResult
public function CheckIn(
    workspaceName : String, 
    ownerName : String, 
    serverItems : String[], 
    info : Changeset, 
    checkinNotificationInfo : CheckinNotificationInfo, 
    checkinOptions : CheckinOptions, 
    failures : StreamingCollection<Failure>, 
    deferCheckIn : boolean, 
    checkInTicket : int
) : CheckinResult

Parameters

  • workspaceName
    Type: System.String

    Name of workspace that contains changes to submit.

  • serverItems
    Type: array<System.String[]

    List of items to checkin.

  • deferCheckIn
    Type: System.Boolean

    True if the checkin should be deferred and a checkinTicket should be assigned if not already provided. False to commit the checkin with this call.

  • checkInTicket
    Type: System.Int32

    Pass 0 if this is either a non-deferred checkin, or if this is the first call in a deferred checkin session. Otherwise, pass the checkInTicket that was returned from the previous call(s).

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Server.CheckinResult
This returns a checkin result with the changeset created and the undone changes.

Remarks

The Changes and Number properties of information are ignored. Owner and CreationDate should be left at their default values unless you are checking in on behalf of someone else, or checking in an imported change (conversion tool).

.NET Framework Security

See Also

Reference

Repository Class

Microsoft.TeamFoundation.VersionControl.Server Namespace