Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Merging specific file revisions

By default, the `p4 merge` command merges all the revisions following the last-merged source revision into the target. To avoid having to manually delete unwanted revisions from the merge file while editing, you can specify a range of revisions to be merged. The base file is the revision with the most edits in common.

Example: Merging specific file revisions

Bruno has made two bug fixes to `//JamCode/dev/jam/scan.c` in the development stream, and Earl wants to merge the change into the release 1.0 branch. Although `scan.c` has gone through several revisions since the fixes were submitted, Earl knows that the bug fixes he wants were made to the 30th revision of `scan.c`. He types:

    $ p4 integrate -b jamgraph-1.0-dev2release depot/release/jam/1.0/scan.c#30,30

The target file (`//depot/release/jam/1.0/scan.c`) is given as an argument, but the file revisions are applied to the source. When Earl runs `p4 resolve`, only the 30th revision of Bruno’s file is scheduled for resolve. That is, Earl sees only the changes that Bruno made to `scan.c` at revision 30.

Your search for returned results