P4Eclipse User Guide (2018.5)

Branching and merging

Using P4Eclipse, you can branch Eclipse projects - for example, for release or experimental development - and merge changes between branches to obtain changes made by other users or to incorporate your changes into collaboratively-developed projects.

Branching

Branch a project:

  1. Right-click the project in the P4 Connections view and choose Integrate.
  2. In the Target field, specify a location for the branched project, using the Helix Server depot syntax. For an overview of depot syntax, see Specifying filenames on the command line in the Helix Core Server User Guide.
  3. If required, specify integration options. For a list of integration commands, see Branch and integration reporting in the Helix Core Server User Guide.
  4. Click Integrate. P4Eclipse creates a changelist containing the files to be branched, marked for add.
  5. In the P4 Pending Changelists view, right-click the changelists containing the branched files and choose Submit...
  6. The Helix Server Change Specification is displayed.

  7. Enter a description and click Submit.
  8. Helix Server branches the files to the specified target location.

Branch specifications

To simplify integration, you can save a set of branch-to-branch mappings as a named branch specification.

Display branch specifications for the current server:

  1. Select Window > Show View > Other....
  2. Browse to Perforce > P4 Branches.
  3. In this view, you can create or edit branch specifications and integrate changes.

Create a branch specification:

  1. To display the branch specifications for the current server, choose Window > Show View > Other....
  2. Browse to Perforce > P4 Branches.
  3. Click Add Branch button image and, in the Branch dialog, specify the details.
  4. In the View field, specify the source/target mapping using Helix Server depot syntax.
  5. Depot syntax supports the following wildcards:

    • * matches all characters except slashes (use for a path component)
    • ... matches all characters including slashes (use to specify a directory and all its subdirectories)

To integrateTo compare two sets of files (for example, two codeline branches) and determine which changes in one set apply to the other, determine if the changes have already been propagated, and propagate any outstanding changes from one set to another. changes using a branch specification, right-click the specification and choose Integrate...

For a list of integration commands and an overview of depot syntax, see Branch and integration reporting and Specifying filenames on the command line in the Helix Core Server User Guide.

Merging

As with branching, to merge changes, select the source project, choose Integrate..., and specify a target path. The difference is that, when you merge, the target files already exist and you are required to resolve them before Helix Server permits you to submit.