How to resolve conflicts
To resolve a file conflict, you determine the contents of the files you
intend to submit by issuing the p4 resolve
command
and choosing the desired method of resolution for each file. After you
resolve conflicts, you submit the changelist containing the files.
If you open a file for edit, then sync a subsequently submitted revision from the depot, Helix Core Server requires you to resolve to prevent your own changes from being overwritten by the depot file.
By default, Helix Core Server uses its diff program to detect conflicts. You can configure a third-party diff program. For details, see Diff files.
To resolve conflicts and submit your changes, perform the following steps:
- Sync the files (for example
p4 sync //Acme/dev/jam/...
). Helix Core Server detects any conflicts and schedules the conflicting files for resolve. - Issue the
p4 resolve
command and resolve any conflicts. See Options for resolving conflicts for details about resolve options. - Test the resulting files (for example, compile code and verify that it runs).
- Submit the changelist containing the files.
If any of the three file revisions participating in the merge are
binary instead of text, a three-way merge is not possible. Instead,
p4 resolve
performs a two-way merge: the two
conflicting file versions are presented, and you can choose between
them or edit the one in your workspace before submitting the
changelist.