Understanding the Conflict Resolution Mode

If you update a document that has already been modified since last extraction or consolidation, a conflict can occur.

Consolidation Conflicts

You can resolve conflicts that arise when consolidating a repository document by specifying a merge mode in the second parameter of the following method: ConsolidateDocument(ByVal FileName As String, ByVal MergeMode As Long = 2, ByRef Actions As String = NULL, ByRef Conflicts As String = NULL) As BaseObject.

This parameter (ByVal MergeMode As Long = 2)can contain the following values:

Value

Description

1

Replaces the document in the repository with the local document without preserving any repository changes

2 (default value)

Tries to automatically select the default merge actions by taking into account the modification dates of objects and cancels the consolidation if a conflict has been found (objects modified both locally and in the repository)

3

Selects the default merge actions but always favors local changes in case of conflict instead of canceling the consolidation

4

Selects the default merge actions and favors the repository changes in case of conflict

Merge actions performed during consolidation and conflicts that may have occurred can be retrieved in the strings specified in the third and fourth parameters: ByRef Actions As String = NULL and ByRef Conflicts As String = NULL.

Extraction Conflicts

You can resolve conflicts that arise when extracting a repository document by specifying a merge mode in the second parameter of the following method: ExtractToFile(ByVal FileName As String, ByVal MergeMode As Long = 2, ByVal OpenMode As Boolean = -1, ByRef Actions As String = NULL, ByRef Conflicts As String = NULL) As BaseObject.

This parameter (ByVal MergeMode As Long = 2)can contain the following values:

Value

Description

0

Extracts the document without merge, thus erases the existing local document if any, and sets the extracted file as read-only

1

Extracts the document without merge, thus erases the existing local document if any

2 (default value)

Tries to automatically select the default merge actions by taking into account the modification dates of objects and cancels the extraction if a conflict has been found (objects modified both locally and the repository)

3

Selects the default merge actions but always favors local changes in case of conflict instead of canceling the extraction

4

Selects default merge actions and favors the repository changes in case of conflict

Merge actions performed during extraction and conflicts that may have occurred can be retrieved in the strings specified in the fourth and fifth parameters: ByRef Actions As String = NULL and ByRef Conflicts As String = NULL. The third parameter (ByVal OpenMode As Boolean = -1) allows you to keep open the extracted model.