Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 for Eclipse Documentation | 2025.2

# Merging and promoting using the Merge Quest tool

The Perforce Merge Quest tool enables you to graph the structure of your P4 Server by defining a hierarchy that you can use to propagate change between codelines A set of files that evolve collectively. One codeline can be branched from another, such as a release codeline from a development codeline.. There are no restrictions on the number of connections a codeline can have or the types of codelines that can be connected. You control the display of codelines by manually arranging and connecting them on the canvas. After you define a hierarchy, you can export it as an XML file that other users can import and use.

To display the Merge Quest view, right-click the desired server connection in the P4 Connections view and choose Open Merge Quest.

## Creating the diagram

To define a branching hierarchy, first define the codelines:

1. Drag a codeline icon from the palette to the Merge Quest canvas. P4 for Eclipse displays the New Codeline dialog.
2. Enter a descriptive name for your codeline and click Finish. The canvas displays an icon for the codeline.

Then, define the relationships:

To define the relationship between two codelines, you define connections that specify how changes are propagated:

- "To" connections specify the files and folders that accept changes from the codeline (target).
- "From" connections specify the files and folders that contribute change to the codeline (source).

You can connect files using the following methods:

- Add Branch Spec Connector: Use a P4 Server branch specification. Browse to an existing one or create one by clicking .
- Add Depot Path Connector: Specify the depot path for the source or target files and folders. If a target path doesn't exist in the depot, it is created the first time you use the connection to integrate files to the target.

Alternately, you can click one of the codeline connectors in the palette (Branch Spec or Depot Path), then drag a line from one codeline icon to another.

To define the connections:

1. Right-click the desired codeline and choose the method for specifying the connection (branch spec or depot path).

P4 for Eclipse displays a dialog that enables you to specify the source or target using a path or branch specification.

2. Specify the source or target path.

You can specify a source or target that doesn't exist — Merge Quest will create it.

3. To restrict the flow of change to a single direction, click the corresponding arrow in the separator between the Source and Target lists. By default, change can be propagated in either direction.
4. To save your changes, click Finish.

## Merging and promoting

To propagate change from one codeline to another:

1. Right-click the source or target codeline and choose Integrate To... or Integrate From... (or right-click the connector between the source and target and choose the desired integration. Connectors look like this: ).

P4 for Eclipse displays the Integrate dialog.

2. Specify the desired options. For a list of the P4 integrate command options, see P4 integrate in the P4 CLI Reference.

P4 for Eclipse opens the source files for integration to the target in a pending changelist.

3. If necessary, resolve the files to select the revisions that you want integrates to the target codeline.
4. Submit the changelist containing the resolved files.

## Exporting and importing Merge Quest diagrams

You can export Merge Quest diagrams as XML files, which you can (manually) store on a file system, Web site or in a P4 Server depot. Other users can import your files to obtain your diagrams.

To export a diagram, click and specify the location where you want to store it.

To import a diagram, click and browse to the file or specify its location.

## Best practices for branching

For typical software development, Perforce recommends the mainline model. The mainline, where code is stabilized, resides above softer development codelines and below firmer release codelines. Code is expected to become increasingly stable as change flows from development to mainline to release.

Your search for returned results