Schedule the propagation of changes from one file to another
options: -c changelist# -f -n -r -v
When you've made changes to a file that need to be propagated to another file, start the process with p4 integrate. The simplest form of this command is p4 integrate fromFile toFile; this lets the Perforce server know that changes in fromFile need to be propagated to toFile, and has the following effects:
The process is complete when you p4 submit toFile to the depot.
Multiple files can be specified by using wildcards in fromFile and toFile. If so, any wildcards used in fromFile must be matched with identical wildcards in toFile. Perforce compares the fromFile pattern to the toFile pattern, creates a list of fromFile/toFile pairs, and performs an integration on each pair.
The syntax p4 integrate fromFiles toFiles requires you to remember the relationship between fromFiles and toFiles each time changes need to be propagated from fromFiles to toFiles. Alternatively, use p4 branch to store the mappings between fromFiles and toFiles in a branch view; then use p4 integrate -b branchview whenever you need to propagate changes between fromFiles and toFiles.
-b branchname | Integrate the files using the fromFile/toFile mappings included in the branch view of branchname. |
-b branchname toFiles... | Integrate the files using the source/target mappings included in the branch view of branchname, but include only those target files that match the patterns specified by toFiles. |
-f | Force the integration on all revisions of fromFile and toFile, even if some revisions have been integrated in the past. Best used with a revision range. |
-n | Display the integrations this command would perform without actually performing them. |
-r | Reverse the usual order of propagation: propagate changes from toFiles to fromFiles. |
-v | Without this flag, p4 integrate will copy newly-branched toFiles into the client workspace from fromFiles. When the -v (for virtual) flag is used, toFiles are not immediately copied to the client workspace. Instead, you can fetch them with p4 sync when you need them. This flag allows you to branch large codelines without having to copy the entire codeline to the client workspace. |
-b branchname -s fromFile[revRange] [toFile...] |
In its simplest form, p4 -b branchname -s fromFile allows you to integrate files using the source/target mappings included in the branch view of branchname, but include only those source files that match the patterns specified by fromFile. In its more complicated form, when both fromFile and toFile are specified, integration will be performed bidirectionally: first, integration is performed from fromFile to toFile; then integration is performed from toFile to fromFile. This variation of p4 integrate was written to provide some needed functionality to P4Win, the Perforce GUI; it is unlikely that you'll need to use this more complex form. |
-c changelist# | Open the toFiles for branch, integrate, or delete in the specified pending changelist. If this option is not provided, the files will be opened in the default changelist. |
g_opts | See global options section. |
Can File Arg Use Revision Specifier? |
Can File Arg Use Revision Range? |
Minimal Access Level Required |
---|---|---|
Yes | Yes | open |
To create or edit a branch specification | p4 branch |
To view a list of existing branch specifications | p4 branches |
To view a list of integrations that have already been performed and submitted | p4 integrated |
To propagate changes from one file to another once scheduled with p4 integrate | p4 resolve |