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:
- Right-click the project in the P4 Connections view and choose Integrate.
- 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 Command-Line (P4) Guide.
- If required, specify integration options. For a list of integration commands, see Branch and integration reporting in the Helix Core Command-Line (P4) Guide.
- Click Integrate. P4Eclipse creates a changelist containing the files to be branched, marked for add.
- In the P4 Pending Changelists view, right-click the changelists containing the branched files and choose Submit...
- Enter a description and click Submit.
The Helix Server Change Specification is displayed.
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:
- Select Window > Show View > Other....
- Browse to Perforce > P4 Branches.
In this view, you can create or edit branch specifications and integrate changes.
Create a branch specification:
- To display the branch specifications for the current server, choose Window > Show View > Other....
- Browse to Perforce > P4 Branches.
- Click
and, in the Branch dialog, specify the details.
- In the View field, specify the source/target mapping using Helix Server depot syntax.
- * matches all characters except slashes (use for a path component)
- ... matches all characters including slashes (use to specify a directory and all its subdirectories)
Depot syntax supports the following wildcards:
To integrate To compare two sets of files and determine which changes to propagate.A typical use case is to integrate between a development branch and a release branch. 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 Command-Line (P4) 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.