IMetabase.CheckInFiles

Syntax

CheckInFiles(Objects: IMetabaseObjectDescriptors, FileNames: Array, Var ResId: Integer): Boolean;

Parameters

Objects. The objects, which changes must be checked in. Changed objects can be set manually or obtained using the IMetabase.GetPendingChangesVCS method.

FileNames. Array of paths to changed object files. Paths to changed object files can be set manually or obtained using the IMetabaseObjectDescriptor.LocalCheckedOutFileNames property.

ResId. The variable, into which an error code is stored.

Description

The CheckInFiles method checks in changes in the specified objects.

Comments

This method can be used if objects are added to version control system.

When objects are added to version control system, files that store local object versions are created automatically. The set of files depends on object types.

For details see the Adding Objects to Version Control System section.

Method execution depends on the version control system in use:

If changes were successfully checked in, the method returns True, and error code is set to 0. If changes were not checked in, the method returns False, and the ResId parameter is set to code error.

Example

To execute the example, make sure that the repository is connected to the Git version control system and it contains changed objects.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Objects: IMetabaseObjectDescriptors;
    Object: IMetabaseObjectDescriptor;
    FileNames: Array 
Of String;
    i, ResId: Integer;
Begin
    MB := MetabaseClass.Active;
    
// Get changed objects and their files
    Objects := MB.GetPendingChangesVCS;
    
For i := 0 To Objects.Count - 1 Do
        Object := Objects.Item(i);
        FileNames := Object.LocalCheckedOutFileNames;
    
End For;
    
// Check in obtained changes
    MB.CheckInFiles(Objects, FileNames, ResId);
End Sub UserProc;

After executing the example all changed object files are checked in.

See also:

IMetabase