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

ISAWHAppObject::CheckInProject

Description

Checks in a project.

Syntax

long CheckInProject(
        BSTR
ProjectToCheckin,
        BSTR LocalDirectory,
        VARIANT_BOOL Recursive,
        VARIANT_BOOL KeepCheckout,
        VARIANT_BOOL RemoveLocalCopy,

        VARIANT_BOOL ForceCheckin,
        Enum_CompareFileBy CompareFileBy,
        Enum_EOL EOL,
        VARIANT_BOOL UserReadOnly,
        Enum_SetLocalFileTime SetLocalFileTime,
        Enum_CheckinUnchangedFileHandling CheckinUnchangedFileHandling,
       
BSTR Comment,
        ISAWHDiffMergeParam* MergeParam,
        VARIANT_BOOL* Cancelled,
        BSTR* ResultDescription,
        ISAWHOperationResultSet* OperationResultSet
);

Parameters

ProjectToCheckin
[in] Specifies the full name of the project to be checked in.

LocalDirectory
[in] Specifies the local path from which the project is checked in.

Recursive
[in] Specifies whether the project will be checked in recursively.

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

RemoveLocalCopy
[in] Removes the local copies of files in the project after the Check In operation.

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

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.

SetLocalFileTime
[in] Specifies how to set the date/time of 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 CheckinProject_Click()

	Dim Cancelled As Boolean
	Dim ResultDescription As String

	Dim ProjectToCheckin As String
	Dim LocalDirectory As String
	Dim Comment As String
	Dim OperationResultSet As New SAWHOperationResultSet
	Dim MergeParam As New SAWHDiffMergeParam

	ProjectToCheckin = "$/ProjectName"
	LocalDirectory = "D:\ProjectToCheckin"
	Comment = "Check in project"

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

	If ResultValue <> 0 Then
		MsgBox "Failed to check in the project."
	End If

End Sub