Download Perforce 97.3 Graphical User Interface User`s Manual
Transcript
Chapter 6 : PERFORCE Basics: Resolving File Conflicts )LOH5HYLVLRQV8VHGDQG*HQHUDWHGZKHQ5HVROYLQJ The resolve process begins with three revisions of the same file, generates a new version that merges elements of all three revisions, allows the user to edit the new file, and writes the new file (or any of the original three revisions) to the client. The file revisions used in the resolve process are these: yours The newly-edited revision of the file in the client workspace. This file is overwritten by result once the resolve process is complete. theirs The revision in the depot that the client revision conflicts with. Usually, this is the head revision, but resolves can be scheduled with any revision between the head revision and base. base The file revision in the depot that yours was edited from. Note that base and theirs are different revisions; if they were the same, there would be no reason to perform a resolve. merged File variation generated by PERFORCE from theirs, yours, and base. result The file resulting from the resolve process. result is written to the client workspace, overwriting yours, and must subsequently be submitted by the user. The instructions given by the user during the resolve process determine exactly what is contained in this file. The user can simply accept theirs, yours, or merge as the result, or can edit theirs, yours, and merge, generating a more reliable result. The remainder of this chapter will use the terms theirs, yours, base, merged, and result to refer to the corresponding file revisions. The definitions given above are somewhat different when resolve is used to integrate branched files. Discussion of resolving branched files begins on page 50. 7\SHVRI&RQIOLFWV%HWZHHQ)LOH5HYLVLRQV The diff program that underlies the PERFORCE resolve mechanism determines differences between file revisions on a line-by-line basis. Once these differences are found, they are grouped into chunks: for example, three new lines that are adjacent to each other are grouped into a single chunk. Yours and theirs are both generated by a series of edits to base; for each set of lines in yours, theirs, and base, the resolve routine asks the following questions: • Is this line set the same in yours, theirs, and base? • Is this line set the same in theirs and base, but different in yours? • Is this line set the same in yours and base, but different in theirs? • Is this line set the same in yours and theirs, but different in base? • Is this line set different in all three files? PERFORCE 97.3 Graphical User Interface User’s Beta Manual 44