Monday 6 December 2010

Integration/Resolve Records

Each time an integration is performed, records are stored that guide the Perforce server in performing future integrations and can be examined by users to see what resolve option was used. This article explains the format that these articles are displayed in from the command line and how they relate to the integration operations that they represent.

Integration records are displayed in the output of p4 filelog as follows:

... ... ...

And in the output of p4 integrated:

-

The output of p4 resolved is identical to that of p4 integrated, except that is a local workspace file with no associated revision.

Each integration record associates a range of source revisions with a single target revision. The indicates how the resolve was performed, and therefore the relationship between the contents of the source revision range and the target.

The also includes a direction, either from or into, that indicates which of and is the source and which is the target. In p4 resolved output, the is always a from, indicating that <file1> (the local file) is the target and (the depot file) is the source. In filelog and integrated output, records are displayed for both the source and the target, with one of the records reversed. For example:

//depot/target#1 - branch from //depot/source#1//depot/source#1 - branch into //depot/target#1The possible "how" types are as follows:
copy from/copy into: Indicates that the target revision is identical to the ending source revision. A p4 resolve -at will always produce a "copy".merge from/merge into: Indicates that the target revision was the result of an automatic merge between the previous revision of the target and all of the revisions in the source revision range. A p4 resolve -am will produce a "merge" if there are no conflicts but the final result is not identical to either the source or target revisions.ignored/ignored by: Indicates that the target revision was not changed, and the source revisions were "ignored". A p4 resolve -ay will always produce an "ignore". The "ignored" source revisions are treated as if they were merged, and will be disregarded by future integrations.edit from/edit into: Indicates that the target revision was edited manually before submit, and might contain unique changes. Re-opening a resolved file for edit, or introducing new changes during resolve, will produce an "edit".
branch from/branch into: The same as a "copy", but produced as a result of creating a new branched file, rather than resolving and copying over a pre-existing file.
add from/add into: A "branch" that was edited manually before submit, by re-opening it with p4 add or p4 edit.delete from/delete into: Indicates that the target revision is deleted, as is the ending source revision. Integrating a deleted revision will always produce a "delete".move from/move into: The same as an "add", but created by the p4 move command rather than by p4 integrate and p4 add.
//depot/target... #3 change 1000 integrate on 2009/08/18 by bruno@bruno_ws (text) 'Merging.'... ... merge from //depot/source#3,#5... #2 change 997 edit on 2009/08/17 by bruno@bruno_ws (text) 'Editing.'... #1 change 995 branch on 2009/08/16 by bruno@bruno_ws (text) 'Branching.'... ... branch from //depot/source #1,#2In this filelog example, the target file was branched from revision #2 of the source file in changelist 995, and then edited in changelist 997. Revisions #3 thru #5 of the source file were then merged into the target without conflicts or editing in changelist 1000. //depot/target#2 - ignored //depot/source#2//depot/target#2 - copy from //depot/source#3In this integrated example, revision #2 of the target file was created by performing two integrates and resolves. The second resolve (from revision #3 of the source) was performed as a "copy", overriding the results of the earlier resolve (from #2 of the source). The first resolve is therefore displayed as an "ignore", since it does not have any net effect on the target file.
3 users have rated this article 4.7 out of 5

View the original article here

No comments:

Post a Comment