Official Content

This operation is accessible from the Team Development History Dialog.

The Bring Changes operation will apply the changes in the selected commit to your local KB, automatically merging the changes with those made in your own version or your local copy, if any. In case there is a need to bring the changes from several commits, then one bring changes operation for each of the commits needs to be done. Alternatively, there is a possibility to Bring All Changes from another version, which brings every commit that has been done starting from a specific date or commit Number.

bringchangesoperationclick

After selecting the operation a new screen with the objects that were modified in the selected commit will appear in a grid. You can then select the objects you want to include in the operation. To proceed, click on the Merge Selected option, and it will be executed.

mergedialoguegxserver

Upon clicking the 'Merge Selected' button a merge between the local revision of the objects and the changes introduced by the selected commit will be done. This merge differs from the one that is done when updating from GXserver . The difference is that in the bring changes merge only the changes from the selected commit will be brought, and the merge will be done between these changes and the local revision. When updating an object from GXServer the entire object is brought from the server so changes from every commit will be brought, and those changes will be used when merging with the local revision of the object.

How the merge works:

KBTrunkimg

There is a KB with 3 versions, 'KB Customer', a frozen version 'Version 1', and a branch called 'Upgrades for Version 1'. Both 'KB Customer' and 'Upgrades for Version 1' are synchronized and have a procedure called 'AddPoints' that has the following code (in all 3 versions):

gxbringchangespublish
 

 
That User A and User B both work in the 'KB Customer' version and user C works in the 'Upgrades for Version 1' version. Now both User A and B do the following actions: 

Commit # 4: User A commits changes made to procedure 'AddPoints'.

gxsuseracommitimg

 

User B updates the object 'AddPoints' from the server, in order to get the changes made by User A. After that, User B works on the procedure, adding more code.

Commit # 5: User B commits his own changes made to 'AddPoints'.

gxsuserbcommitimg

 

Now, if User C chooses to bring changes from the fifth commit (Commit # 5), it will only bring the changes made by User B, and not the changes made by User A. In other words, the object 'AddPoints' that User C will receive, will be different from the one that is in the 'KB Customer' Knowledge Base in the server, since all the changes made by User A will be missing. This behaviour is intended and it is this way because Bring Changes only takes into account the changes from a single commit. The result of the bring changes operation for commit # 5 is shown below:

gxsusercresultimg

 

Note that user C only receives the 2 lines inserted by the fifth commit, and does not get the code added from the fourth commit.
 

Bring Changes contextual Menu

Several actions can be performed on any of the objects listed in the Bring Changes Window. To do any of these actions just right-click one of the objects displayed in the grid.

These actions are:

  1. Compare With current revision: This action compares the local revision of the object with its counterpart in the server after the selected commit was done.

    BringChangesCompareWithCurrentRevision

    It is important to understand that the changes shown in the right column are not necessarily introduced by the selected commit. Since the local version is being compared to the server version of the object, some of the differences being displayed might have been introduced by an older commit.
    In this specific example, line 4 of the procedure 'AddPoints'  was commited in commit Number 4, and line 5 and 6 from the same procedure were commited in commit Number 5. However, since the server revision of the object after commmit Number 5 differs in these 3 lines from the local revision, all 3 lines are highlighted.
     
  2. Revision Changes:  This action compares the server revision of the object before the commit and the resulting revision after the commit is done. In this case, both revisions of the object come from the server, and the differences shown are exactly the changes introduced by the selected commit for that specific object.

    RevisionChanges

     
  3. Preview Merge: It shows a preview of how the local revision of the object would be after the bring changes operation is performed, that is, after clicking 'Merge Selected'. On the left column it shows the current local revision of the object (before bring changes is applied), and on the right column, the result of merging said revision with the changes introduced by the selected commit.

PreviewMerge

Notice how the line:

&Customer.CustomerPoints = &Customer.CustomerPoints + 100

is not present in the merge preview (right column). This is expected since that line was not added in the selected commit, but on an older commit.

 

Consideration

When Lock Mode is enabled, and a Bring Changes action is performed, then a merge is done and the merged objects are marked as Force Edited.  As a result, in this particular scenario, the bring changes operation bypasses some of the constraints imposed by the Lock Mode. 

Notice that some commits could be marked as bold (available since Xev2 Upgrade #2).




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