Resolve command-line options
The p4 resolve
options described below enable you to
resolve directly instead of interactively. When you specify one of these
options in the p4 resolve
command, files are resolved
as described in the following table:
Option | Description |
---|---|
|
Accept the auto-selected file. |
|
Accept yours. |
|
Accept theirs. Use this option with caution, because the file revision in your client workspace is overwritten with the head revision from the depot, and you cannot recover your changes. |
|
Accept the recommended file revision according to the following logic:
|
|
Accept the recommended file revision, even if conflicts remain. If this option is used, edit the resulting file in the workspace to remove any difference markers. |
|
Accept the recommended file revision according to the following logic:
|
Example Automatically accepting particular revisions of conflicting files
Bruno has been editing the documentation files in /doc
and knows that some of them require resolving. He types p4
sync doc/*.guide
, and all of these files that conflict
with files in the depot are scheduled for resolve.
He then types p4 resolve -am
and the merge files
for all scheduled resolves are generated, and those merge files that
contain no line set conflicts are written to his client workspace.
He’ll still need to manually resolve any conflicting files, but the
amount of work he needs to do is substantially reduced.