![]() |
![]() |
Automerge works because it uses information about successful and failed integration builds for a source and a target branch. This information is accumulated and provided by Parabuild.
For an automated merge to work, both the source and the target branches should be covered by integration builds. Make sure that the integration builds are configured and running cleanly before starting to configure automatic merges. Please refer to Parabuild documentation for information about configuring integration builds.
To enable automated merges go to "Administration" -> "System Settings" -> "General System Settings" and check box "Show merge statuses" under "Appearance" section:

Once showing merge status is enabled, Parabuild's top navigation bar will be showing menu item "Merges":

To add an automated merge click on menu item "Merges", then click on link "Add New Merge". Select a project and click on button "Continue":

A merge edit form will appear. Fill all required fields on the form and click button "Save":

A meaning of each field on the form is described below.
Field "Automerge name" should contain a name of the automated merge. Example: "Acme 2.0 to mainline".
Field "Description" should contain a detailed description of the automatic merge. If there is no the detailed description available, use the one from the field "Automerge name". Example: "Acme 2.0 to mainline".
Field "Marker" should contain a text marker that Parabuild will use to identify a change that is a subject to automated merge. This marker may appear in a message associated with a submitted change. Parabuild will run a merge if the marker is present.
This field may contain a special value, "MERGEALL", to enable automatic merging of all changes from the source branch to the target branch. This feature maybe especially useful in conjunction with merge mode "Nag". Parabuild will send a periodical notification about requesting to merge change manually. The notification is sent to owners of all changes covered by such merge configuration.
Check this box to preserve the marker in the merge submission message. The marker will be removed from the message if the box is not checked.
Drop down box "Integration mode" allows selecting a mode Parabuild should use to merge changes. Modes "Merge" and "Nag" are available.
If mode "Merge" is selected, Parabuild will merge changes and submit the result to a version control system (VCS).
If mode "Nag" is selected, Parabuild will not merge changes but rather send a notification message to the owner of the change saying that a manual merge should be performed.
Drop down box "Conflict Resolution mode" allows selecting a mode Parabuild should use to resolve merge conflicts. Modes "Accept yours" and "Nag" are available.
If mode "Accept yours" is selected, Parabuild will replace a file with a conflict with an original file from the target branch.
If mode "Nag" is selected, Parabuild will interrupt the merge operation and send a message to the owner of the change that there are conflicts and a manual merge is required.
Drop down box "Branch view source" allows selecting a source of information about a branch configuration. If mode "Brach spec" is selected, Parabuild will use a named Perforce branch spec.
Checking box "Reverse branch view" requests Parabuild to use a reverse branch view during the merge operation (p4 integrate -r). The reverse branch view is useful when using a direct branch spec to configure an automated merge from the branch to the mainline or from the branch to the originating branch.
Check box "Indirect merges" allows activating Perforce ability to find a common ancestor for files that were not branched using a direct branch operation. Usually this box should be checked.
Drop down box "Merge verification source" should contain a name of an integration build that covers a source part of the branch. Parabuild uses this build as a source of information about changes that produced successful builds in the source branch. It is critical that a VCS configuration for this build closely resembles the source branch.
Drop down box "Merge verification target " should contain a name of an integration build that covers a target part of the branch. Parabuild uses this build configuration to verify results of the merge before submitting the result of the merge to VCS. It is critical that a VCS configuration for this build closely resembles the target branch.