online source control
back to content
sign up free version control plan

ISAWHAppObject::CheckInFiles

Description

Checks in multiple files.

Syntax

long CheckInFiles(
        ISAWHCheckinFileSet*
CheckinFileSet,
        VARIANT_BOOL KeepCheckout,
        VARIANT_BOOL RemoveLocalCopy,
        Enum_CompareFileBy CompareFileBy,
        Enum_EOL EOL,
        VARIANT_BOOL UserReadOnly,
       
VARIANT_BOOL ForceCheckin,
        Enum_SetLocalFileTime SetLocalFileTime,
        Enum_CheckinUnchangedFileHandling CheckinUnchangedFileHandling,
       
BSTR Comment,
        ISAWHDiffMergeParam* MergeParam,
        VARIANT_BOOL* Cancelled,
        BSTR* ResultDescription,
        ISAWHOperationResultSet* OperationResultSet
);

Parameters

CheckinFileSet
[in] Specifies the name set of the files to be checked in.

KeepCheckout
[in] Specifies whether to keep files checked out after the Check In operation.

RemoveLocalCopy
[in] Specifies whether to remove the file copies after the Check In operation.

CompareFileBy
[in] Specifies how to determine if the local copy is up-to-date, by checksum or by date/time.

EOL
[in] Specifies which end-of-line terminator is to be used for files.

UseReadOnly
[in] Specifies whether to use read-only flag on the unchecked-out local files.

ForceCheckin
[in] Specifies whether to check in the unchanged file and updates its version number.

SetLocalFileTime
[in] Specifies the type of time to be assigned to the local file.

CheckinUnchangedFileHandling
[in] Specifies how to handle the unchanged file, checking in or undoing checkout.

Comment
[in] Specifies the comments for the Check In operation.

MergeParam
[in] Specifies the parameters used for merge.

Cancelled
[out] If the method fails, returns whether the operation is cancelled.

ResultDescription
[out] Returns the description of the result. If the operation succeeds, returns 'Completed'. If the operation fails, returns the error information.

OperationResultSet
[out] Returns the result information set of the operation.

Return Value

If the method succeeds, returns 0. If the method fails, returns other error codes.

See Also

Sample

VB Sample:

Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject

Set sdkObject = New SAWHSDKLib.SAWHAppObject

Private Sub CheckinFiles_Click()

	Dim Cancelled As Boolean
	Dim ResultDescription As String

	Dim CheckinFileSet As New SAWHCheckinFileSet
	Dim CheckinFile As New SAWHCheckinFile
	Dim Comment As String
	Dim OperationResultSet As New SAWHOperationResultSet
	Dim MergeParam As New SAWHDiffMergeParam

	CheckinFile.FileToCheckin = "$/FileName.txt"
	CheckinFile.LocalFileName = "D:\LocalFileName.txt"
	CheckinFileSet.Add CheckinFile
	Comment = "Check in files"

	Dim ResultValue As Long
	ResultValue = sdkObject.CheckInFiles(CheckinFileSet, False, False, Enum_CompareFileByChecksum, Enum_EOLNative, False, False, Enum_SetLocalFileTimeCurrent, Enum_AskCheckinUnchangedFile, Comment, MergeParam, Cancelled, ResultDescription, OperationResultSet)

	If ResultValue <> 0 Then
		MsgBox "Failed to check in the file(s)."
	End If

End Sub