When you and other developers work in the same module, it is common to have to merge your work the other developers' work. The OutSystems Platform can automatically merge and publish the work for you, but you can also choose to compare and merge it yourself before publishing.
The image above illustrates a situation for comparing and merging work before publishing:
- The other developer opens version 4 of the module in his development environment. He starts developing;
- You open version 4 of the module in your development environment. You start developing;
- The other developer publishes his changes;
- You publish your changes:
- The OutSystems Platform determines that there changes to be merged based on the version from where both started developing (V4);
- The Modified Version Detected window is displayed and you choose Compare and Merge;
- The Compare and Merge window is displayed for you to compare and check the changes to be merged;
- You merge and publish.
As an example, imagine a Contacts application with two developers working on it: Matt Jones and John Baker.
The application contains the following:
- Entities for contacts and companies;
- A screen to list contacts and another with contact details.
Each developer has to do the following:
- Matt's job is to work on the usability of contact screens;
- John has to add a screen to list companies and another with company details.
Each one opens the module locally in development environment and starts working:
- Matt publishes his changes first.
- When John publishes his changes the Modified Version Detected window is displayed to him. It informs John that Matt Jones has already published a changed version of the module he started working on.
- John clicks on Compare and the Compare and Merge window is displayed.
On the left hand side John has his changes and on the right hand side changes made and published by Matt Jones.
The changes highlighted in light blue mean that they are changes without conflicts and are automatically selected for merging.
Now, John can validate that:
- The list and detail screens for the Company he has just added are there, and are correctly selected for merging;
- The list screens for the Contact was changed by Matt Jones, and is correctly selected for merging;
- The menu has also changed, with a new option for the company.
To better understand what happened to the menu, John double-clicks on the Menu web block to look into it.
He realizes the Menu web block has changed because there is a new "Companies" option. He remembers it was added when he scaffolded the screen to list companies.
Using the button he advances to the next differences.
In the link he validates that the Destination property points to the screen to list companies.
- John clicks on the button to go back to the main view and presses the Merge and Publish button. The newly merged version is published to the environment.
About Working in Teams | Merge and Publish | Resolve Conflicts | Elements Checkable for Merge