Table of contents


Official Content

Merge Mode is a GeneXus Server Versioning Model.

In this mode, each GeneXus Developer creates a Knowledge Base from the same GeneXus Server instance, by performing a Create Knowledge Base from GeneXus Server operation, and works modifying their private copy.

When all the modifications are done, each private user copy is merged with the GeneXus Server one.

Usage example

Let's say UserA and UserB each create working copies of the same GeneXus Server Knowledge Base. They work concurrently and make changes to the same Object within their local copies.

UserB saves his changes to the repository before UserA. So, when UserA attempts to save the changes; the GeneXus Server instance informs that Object that the object in the GeneXus Server Knowledge Base has somehow changed since the last update operation.

So UserA must perform an update to get the new revision locally or Revert Object Operation the object.

========== Commit started ==========
Contacting GeneXus Server at 'http://<GeneXus Server Path>/<GeneXus Server Name>'... done!
Exporting Transaction 'Country'...
Exporting Attribute 'CountryName'...
Compressing output file...
Export File Created At: 'C:\Users\<User>\AppData\Local\Temp\tmp98E3.xpz'
GeneXus Server: Commit to version TravelAgency of KB 'TravelAgency' sent by Local\admin
GeneXus Server: Comments:Country modifications.
GeneXus Server: Processing file...
GeneXus Server: Checking Import References...... Finished
GeneXus Server: Reading import file objects...... Finished
GeneXus Server: Commit Attribute 'CountryName'... 
GeneXus Server: Successful
warning: GeneXus Server: Commit failed: At least Transaction 'Country' was 
modified in GeneXus Server since your last update. 
Please Update the Knowledge Base and retry.
error: GeneXus Server: Could not commit changes
Commit Failed

During the update operation, GeneXus attempt to perform a merge operation between the server-side object revision with the client side.

As a result, there are two possible scenarios:

1) UserB's changes don't overlap with UserA's. 

So both sets of changes are merged in the local Knowledge Base in a new revision:

========== Partial Update started ==========
Updating Attribute 'Country'... Successful
Updating Transaction 'Country'... Changes to Transaction 'Country' successfully merged 
(Transaction 'Country', View differences)
Successful
Updating table information...
Reloading Transaction 'Country'...Done
Partial Update Success

After the merge was successfully executed locally, a new Commit operation should be performed to update the GeneXus Server's object.

2) UserB's changes do overlap with UserA's changes.

This situation is called Conflict. A new revision with the server-side status will be created on the local Knowledge Base:

========== Partial Update started ==========
Updating Attribute 'CountryName'... 'CountryName' renamed to 'CountryInitialsName'
warning: Conflict in Attribute 'CountryName'. The object was updated with the server revision. 
Compare with the previous revision and solve the conflict manually (Attribute 'CountryName', View differences)
Successful
Partial Update Success

The user must solve the conflict manually. This involves checking both sets of changes and manually reapply the changes generating a new revision on the local Knowledge Base. Once the user has manually resolved the overlapping changes, a new Commit operation must be executed to update the GeneXus Server's object.

See Also

Lock Mode
GeneXus Server - Conflicts and conflict resolution


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant