Resolve integrations and updates to repo workspace files.
p4 resolve [options] [file ...]
p4 resolve works only on files that have been scheduled to be resolved.
The commands that can schedule resolves are:
Files must be resolved before they can be submitted. Resolving involves two sets of files, a source and a target. The target is a set of depot files that maps to opened files in the client workspace.
The file argument specifies the target. If the file argument is omitted, all unresolved files are resolved.
Resolving can modify workspace files. The resolve process is a classic three-way merge. The participating files are referred to as follows:
Filenames, filetypes, and text file content can be resolved by accepting yours
, theirs
, or merged
.
Branching, deletion, and binary file content can be resolved by accepting either yours
or theirs
.
When resolving integrated changes, p4 resolve
distinguishes among four results:
The distinction is recorded when resolved files are submitted, and will be used by future commands to determine whether integration is needed.
In all cases, accepting yours
leaves the target file in its current state.
The result of accepting theirs
is as follows:
For each unresolved change, the user is prompted to accept a result.
Content and non-content changes are resolved separately.
For content, p4 resolve
places the merged result into a temporary file in the client workspace. If there are any conflicts, the merged file contains conflict markers that must be removed by the user.
p4 resolve is not supported for files with propagating attributes from an edge server in a distributed environment.
p4 resolve displays:
Accept | |
at
|
Keep only changes to their file |
ay
|
Keep only changes to your file |
* am
|
Keep merged file |
* ae
|
Keep merged and edited file |
* a
|
Keep autoselected file |
Diff | |
* dt
|
See their changes alone |
* dy
|
See your changes alone |
* dm
|
See merged changes |
d
|
Diff your file against merged file |
Edit | |
et
|
Edit their file (read only) |
ey
|
Edit your file (read/write) |
* e
|
Edit merged file (read/write) |
Misc | |
* m
|
Run $P4MERGE base theirs yours merged |
s
|
Keep only changes to your file |
h
|
Print this help message |
^C
|
Quit the resolve operation |
The merge (m)
option enables you to invoke your own merge program if one is configured using the P4MERGE environment variable. Four files are passed to the program:
The -a
flag puts p4 resolve
into automatic mode. The user is not prompted, and files that can't be resolved are skipped:
-a
|
Automatic mode: the user is not prompted, and files that can't be resolved are skipped. |
-as
|
Safe resolve skips any files that need merging. Causes the workspace file to be replaced with their file |
-am
|
Resolve by merging skips any files with conflicts Causes the workspace file to be replaced with the result |
-af
|
Causes the workspace file to be replaced with the result of merging |
-at
|
Force acceptance of |
-ay
|
Resolves all files by accepting |
-n |
Previews the operation without altering files |