To create a new codeline (referred to as branching(noun) A set of related files that exist at a specific location in the Perforce depot as a result of being copied to that location, as opposed to being added to that location. A group of related files is often referred to as a codeline. (verb) To create a codeline by copying another codeline with the 'p4 integrate', 'p4 copy', or 'p4 populate' command.) or propagate a bug fix or new feature from one codeline to another, you integrate the required files to the target codeline. To integrate files, you open them for integration, specifying source and target, then submit the changelist containing the open files.
P4V performs three types of integration:
Branching, which creates a new codeline or branch.
For more information, see Creating Branches.
Copying, which is reserved for propagating a straightforward duplicate of the files in one codeline to another.
For more information about copying, see Merging Down and Copying Up between Streams.
If you are merging changes into an existing codeline, you are required to resolve the files to ensure that you do not overwrite other users' changes and to preserve the file’s revision history. Typical steps for propagating changes from one codeline to another are as follows:
Submit the changelist.
If there are conflicts, P4V notifies you and schedules the files for resolve.
When you open files for merge, you can specify the mapping of source to target using either a file specification or a branch mapping.
The workflow for propagating change between streams ("merge up, copy down") is simple and specific. For more information, see Merging Down and Copying Up between Streams.
In the P4 Command-line Client, the term integrate To 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.is used not only to encompass all three integration types (branch, merge, copy), but is also used synonymously with the P4V term merge1. To create new files from existing files, preserving their ancestry (branching). 2. To propagate changes from one set of files to another. 3. The process of combining the contents of two conflicting file revisions into a single file, typically using a merge tool like P4Merge..Within P4V, merge can refer both to merging files from one codeline to another and to merging conflicts between files (the function performed by P4Merge).
To open files for merging:
Select the source files and folders, then right-click and choose Merge/Integrate.
The Merge/Integrate dialog is displayed.
For Merge method, choose Specify source and target files.
The source files that you selected in step 1 are listed in the Source files/folders field.
To specify additional merge options, click the Options disclosure triangle.
The Options panel appears.
Specify integration options as follows:
Resolve and Submit Options: These options enable you to specify whether files are submitted manually or automatically, and to configure how conflicts are resolved.
Filter Options: Filtering enables you to choose a subset of the revisions that are queued for merging. For more information, see Searching and Filtering.
Advanced Options: These options enable you to refine the results of the merge as follows:
Check for opened files and warn prior to merging: Detect whether any of the selected files are open for other actions.
P4V uses different P4 commands to apply these integrate flags, depending on the integration method:
p4 merge
p4
integrate
For more information about these P4 commands and flags, see the P4 Command Reference.
To perform the merge, click Merge.
The specified files are opened for merge using any options you configured.
Click Set Defaults to open the Merge-Integrate preferences page, where you can set default behaviors for the Merge/Integrate dialog.