IMetabase.AbandonMerge

Syntax

AbandonMerge;

Description

The AbandonMerge method suspends solution of occurred conflicts to check in other object changes.

Comments

This method can be used if objects are added to version control system and conflicts during object changes check-in arose.

NOTE. The method is available only for the Git version control system in use.

To check in changes in the specified objects, use the IMetabase.CheckInFiles method.

To resolve the conflict occurred on checking in object changes, use the IMetabase.ResolveConflict method.

Example

To execute the example, make sure that the repository is connected to the Git version control system and it contains the changed object with the OBJECT_VCS identifier, and conflicts during other objects change arise after version synchronization. Check-in of the changed object with the OBJECT_VCS identifier is not available if there are conflicts. The local repository of version control system contains files of the changed object at C:\GIT\GitRepo\OBJECT_VCS\.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Objects: IMetabaseObjectDescriptors;
    FileNames: Array 
Of String;
    ObjKeys: Array 
Of Integer;
    ResId: Integer;
Begin
    MB := MetabaseClass.Active;
    
// Suspend solution of conflicts if they arise
    MB.AbandonMerge;
    
// Set changed object
    ObjKeys := New Integer[1];
    ObjKeys[
0] := Mb.GetObjectKeyById("OBJECT_VCS");
    Objects := MB.GetItems(ObjKeys);
    
// Set changed object file
    FileNames := New String[1];
    FileNames[
0] := "C:\GIT\GitRepo\OBJECT_VCS\OBJECT_VCS.text";
    
// Check in object changes
    MB.CheckInFiles(Objects, FileNames, ResId);
End Sub UserProc;

After executing the example, occurred conflicts are suspended and the changed object with the OBJECT_VCS identifier can be checked in. The object and its changes in the OBJECT_VCS.text file in the local repository of the version control system are checked in but all conflicts must be resolved to merge all object changes.

See also:

IMetabase