p4 merge
Synopsis
Merge one set of files into another.
Syntax
p4 [g-opts
] merge [options
] fromFile
[revRange
] toFile
p4 [g-opts
] merge [options
] -b branch
[-r] [toFile
[revRange
] ...]
p4 [g-opts
] merge [options
] -b branch
-s fromFile
[revRange
] [toFile
...]
p4 [g-opts
] merge [options
] -S stream
[-P parent
] [-F] [-r]
[toFile
[revRange
] ...]
options : -c
change
-n -Ooptions
-m max
-q
Description
The p4 merge command is a simplified form of the p4 integrate command that merges a set of changes from source to target files. The command outputs the scheduled resolves. This command is intended for use with streams, but is also perfectly usable for traditional Perforce branches.
With streams, you use p4 merge to keep a child stream up to date with a more stable parent stream, to ensure that, when you promote changes back to the stable parent, you do not inadvertently overwrite any other changes that were checked into the parent. Files are opened in a pending changelist and scheduled for resolve as required. To update the parent stream, resolve and submit.
In most cases, you can use the p4 merge and p4 copy commands to propagate changes between streams (or branches). The default behavior of p4 integrate is to schedule files for resolve by selecting the closest common ancestor as the base; p4 merge selects (as the base) the revision with the most edits in common with the source and target.
Options
|
Specifies an existing pending changelist in which the files are to be opened. |
|
Preview the merge. |
|
Limits the number of files merged. This option is useful for scripts that integrate large number of files; it enables them to batch the integrations and minimize the locking-related impact to other users of the shared versioning service. |
|
Specifies a branch view to be used to determine source and target files. |
|
Reverses the mappings in the branch view, integrating from the
target files to the source files. Requires the
|
|
Treat |
|
Specifies the source stream. Files are merged to its parent
stream. To merge from parent to child, specify the
|
|
Merge to the specified parent stream. Overrides the parent defined in the source stream specification. |
|
Force merge operation; perform the operation when the target stream is not configured to accept a merge from the source. To determine a stream's expected flow of change, use p4 istat. |
|
The |
|
Quiet mode; suppresses normal output messages about the list of files being integrated, copied, or merged. Messages regarding errors or exceptional conditions are displayed. |
|
See the “Global Options” section. |
Usage Notes
Can File Arguments Use Revision Specifier? |
Can File Arguments Use Revision Range? |
Minimal Access Level Required |
---|---|---|
Yes |
Yes |
|
Examples
|
Incorporate the latest changes from main (parent) into Bruno's development stream (child). |