Merging and promoting using the Merge Quest tool
The Perforce Merge Quest tool enables you to graph the structure of your Helix Core 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, allowing each set of files to evolve separately.. 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:
- Drag a codeline icon from the palette to the Merge Quest canvas. P4Eclipse displays the New Codeline dialog.
- 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 Helix 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:
- Right-click the desired codeline and choose the method for specifying the connection (branch spec or depot path).
- Specify the source or target path.
- 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.
- To save your changes, click Finish.
P4Eclipse displays a dialog that enables you to specify the source or target using a path or branch specification.
You can specify a source or target that doesn't exist — Merge Quest will create it.
Merging and promoting
To propagate change from one codeline to another:
- 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:
).
- Specify the desired options. For a list of the P4 integrate command options, see P4 integrate in the Helix Core Command-Line (P4) Reference.
- If necessary, resolve the files to select the revisions that you want integrates to the target codeline.
- Submit the changelist containing the resolved files.
P4Eclipse displays the Integrate dialog.
P4Eclipse opens the source files for integration to the target in a pending changelist.
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 Helix 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.