Started repro.sh v1.0.3 at Sun Apr 3 22:01:55 EDT 2016. ReproDir=/tmp/repro ============================================================================== Scenario 1: Lost Rename Preliminary info: Show versions of p4/p4d on the PATH: Executing command: p4 -V Perforce - The Fast Software Configuration Management System. Copyright 1995-2016 Perforce Software. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) See 'p4 help legal' for full OpenSSL license information Version of OpenSSL Libraries: OpenSSL 1.0.1s 1 Mar 2016 Rev. P4/DARWIN90X86_64/2015.2/1366233 (2016/03/17). Executing command: p4d -V Perforce - The Fast Software Configuration Management System. Copyright 1995-2016 Perforce Software. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) See 'p4 help legal' for full OpenSSL license information Version of OpenSSL Libraries: OpenSSL 1.0.1s 1 Mar 2016 This product includes software developed by the OpenLDAP Foundation (http://www.openldap.org/) This product includes software developed by Computing Services at Carnegie Mellon University: Cyrus SASL (http://www.cmu.edu/computing/) See 'p4 help legal' for full Cyrus SASL and OpenLDAP license information Version of OpenLDAP Libraries: 2.4.40 Version of Cyrus SASL Libraries: 2.1.26 Rev. P4D/DARWIN90X86_64/2015.2/1366233 (2016/03/17). License: none Preliminary setup: Spin up a local repo. Executing command: p4 init Matching server configuration from 'p4poke.perforce.com:1667': case-sensitive (-C0), non-unicode (-n) Server ttyler-dvcs-1459735315 saved. Executing command: p4 status One.h - reconcile to add //stream/main/One.h#1 Two.h - reconcile to add //stream/main/Two.h#1 Reconcile and submit. //stream/main/One.h#1 - opened for add //stream/main/Two.h#1 - opened for add Submitting change 1. Locking 2 files ... add //stream/main/One.h#1 add //stream/main/Two.h#1 Change 1 submitted. == Release r1 == Stream //stream/r1 saved. Executing command: p4 populate -f -r -S //stream/r1 2 files branched (change 2). Rename Two.h directly in main. //stream/main/Two.h#1 - opened for edit //stream/main/TheNumberTwo.h#1 - moved from //stream/main/Two.h#1 Submitting change 3. Locking 2 files ... move/add //stream/main/TheNumberTwo.h#1 move/delete //stream/main/Two.h#2 Change 3 submitted. == Release r2 == Stream //stream/r2 saved. Executing command: p4 populate -f -r -S //stream/r2 3 files branched (change 4). Reparent flow of change to: r1 --> r2 --> main. This is follow the best practice North of Main merge flow. That means the flow of change for release streams (North of Main, as opposed to development branches that live South of Main), should be managed such that changes flow from older branches to newer ones, to newer, and finally to main. The basic idea is that merge should Laura Wingerd's Google Talk from 2006 reinforces this. Listen to the section from 24:40 – 27:15: http://www.youtube.com/watch?v=AJ-CpGsCpM0 Laura recommends the oldest-to-newest merging model and does a nice job explaining the rationale for it. Stream //stream/r1 saved. Executing command: p4 stream -o //stream/r1 Stream: //stream/r1 Update: 2016/04/03 22:01:56 Access: 2016/04/03 22:01:56 Owner: ttyler Name: r1 Parent: //stream/r2 Type: release Description: Created by ttyler. Options: allsubmit unlocked toparent nofromparent mergedown Paths: share ... == Bug Fix in r1 == Make changes in r1. r1 Updating One.h and Two.h in r1. Executing command: p4 edit One.h Two.h //stream/r1/One.h#1 - opened for edit //stream/r1/Two.h#1 - opened for edit Submitting ... Submitting change 5. Locking 2 files ... edit //stream/r1/One.h#2 edit //stream/r1/Two.h#2 Change 5 submitted. Scenario 1: Merging r1->r2 direct. == Merging r1 to r2 == Executing command: p4 switch r2 Executing command: p4 switch r2 Merging ... Executing command: p4 merge -S r1 //stream/r2/One.h#1 - integrate from //stream/r1/One.h#2 ... must resolve content from //stream/r1/One.h#2 //stream/r2/Two.h#1 - sync/delete from //stream/r1/Two.h#2 ... must resolve branch from //stream/r1/Two.h#2 Resolving with -am ... Executing command: p4 resolve -am /tmp/repro/One.h - merging //stream/r1/One.h#2 Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting //ttyler-dvcs-1459735315/One.h - copy from //stream/r1/One.h /tmp/repro/Two.h - resolving branch from //stream/r1/Two.h#2 //ttyler-dvcs-1459735315/Two.h - resolve skipped. Uh oh, it lost track of renames, and created an extra file, and not getting the content to the correct target file. The desired behaviour when doing 'p4 resolve -am' would be that content from //stream/r1/Two.h#2 would be propagated to //stream/r2/TheNumberTwo.h. Started repro.sh v1.0.3 at Sun Apr 3 22:01:56 EDT 2016. ReproDir=/tmp/repro ============================================================================== Scenario 2: Found Rename w/TOFU SNAFU Preliminary info: Show versions of p4/p4d on the PATH: Executing command: p4 -V Perforce - The Fast Software Configuration Management System. Copyright 1995-2016 Perforce Software. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) See 'p4 help legal' for full OpenSSL license information Version of OpenSSL Libraries: OpenSSL 1.0.1s 1 Mar 2016 Rev. P4/DARWIN90X86_64/2015.2/1366233 (2016/03/17). Executing command: p4d -V Perforce - The Fast Software Configuration Management System. Copyright 1995-2016 Perforce Software. All rights reserved. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) See 'p4 help legal' for full OpenSSL license information Version of OpenSSL Libraries: OpenSSL 1.0.1s 1 Mar 2016 This product includes software developed by the OpenLDAP Foundation (http://www.openldap.org/) This product includes software developed by Computing Services at Carnegie Mellon University: Cyrus SASL (http://www.cmu.edu/computing/) See 'p4 help legal' for full Cyrus SASL and OpenLDAP license information Version of OpenLDAP Libraries: 2.4.40 Version of Cyrus SASL Libraries: 2.1.26 Rev. P4D/DARWIN90X86_64/2015.2/1366233 (2016/03/17). License: none Preliminary setup: Spin up a local repo. Executing command: p4 init Matching server configuration from 'p4poke.perforce.com:1667': case-sensitive (-C0), non-unicode (-n) Server ttyler-dvcs-1459735316 saved. Executing command: p4 status One.h - reconcile to add //stream/main/One.h#1 Two.h - reconcile to add //stream/main/Two.h#1 Reconcile and submit. //stream/main/One.h#1 - opened for add //stream/main/Two.h#1 - opened for add Submitting change 1. Locking 2 files ... add //stream/main/One.h#1 add //stream/main/Two.h#1 Change 1 submitted. == Release r1 == Stream //stream/r1 saved. Executing command: p4 populate -f -r -S //stream/r1 2 files branched (change 2). Rename Two.h directly in main. //stream/main/Two.h#1 - opened for edit //stream/main/TheNumberTwo.h#1 - moved from //stream/main/Two.h#1 Submitting change 3. Locking 2 files ... move/add //stream/main/TheNumberTwo.h#1 move/delete //stream/main/Two.h#2 Change 3 submitted. == Release r2 == Stream //stream/r2 saved. Executing command: p4 populate -f -r -S //stream/r2 3 files branched (change 4). == Bug Fix in r1 == Make changes in r1. r1 Updating One.h and Two.h in r1. Executing command: p4 edit One.h Two.h //stream/r1/One.h#1 - opened for edit //stream/r1/Two.h#1 - opened for edit Submitting ... Submitting change 5. Locking 2 files ... edit //stream/r1/One.h#2 edit //stream/r1/Two.h#2 Change 5 submitted. Scenario 2: Merging 2-step r1->main, main->r2. TOFU SNAFU. == Merging r1 to main == Executing command: p4 switch main Executing command: p4 switch main Merging ... Executing command: p4 merge -S r1 //stream/main/One.h#1 - integrate from //stream/r1/One.h#2 ... must resolve content from //stream/r1/One.h#2 //stream/main/TheNumberTwo.h#1 - integrate from //stream/r1/Two.h#2 (remapped from //stream/main/Two.h) ... must resolve content from //stream/r1/Two.h#2 ... must resolve move to //stream/main/Two.h Resolving with -am ... Executing command: p4 resolve -am /tmp/repro/One.h - merging //stream/r1/One.h#2 Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting //ttyler-dvcs-1459735316/One.h - copy from //stream/r1/One.h /tmp/repro/TheNumberTwo.h - merging //stream/r1/Two.h#2 Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting //ttyler-dvcs-1459735316/TheNumberTwo.h - copy from //stream/r1/Two.h /tmp/repro/TheNumberTwo.h - resolving move to //stream/main/Two.h //ttyler-dvcs-1459735316/TheNumberTwo.h - ignored //stream/main/Two.h Submitting: Merged r1 -> main. Submitting change 6. Locking 2 files ... integrate //stream/main/One.h#2 integrate //stream/main/TheNumberTwo.h#2 Change 6 submitted. Executing command: p4 switch r2 Executing command: p4 switch r2 Merging main -> r2... Executing command: p4 merge -F -r -S r2 //stream/r2/One.h#1 - integrate from //stream/main/One.h#2 ... must resolve content from //stream/main/One.h#2 //stream/r2/TheNumberTwo.h#1 - integrate from //stream/main/TheNumberTwo.h#2 ... must resolve content from //stream/main/TheNumberTwo.h#2 Resolving with -am ... Executing command: p4 resolve -am /tmp/repro/One.h - merging //stream/main/One.h#2 Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting //ttyler-dvcs-1459735316/One.h - copy from //stream/main/One.h /tmp/repro/TheNumberTwo.h - merging //stream/main/TheNumberTwo.h#2 Diff chunks: 0 yours + 1 theirs + 0 both + 0 conflicting //ttyler-dvcs-1459735316/TheNumberTwo.h - copy from //stream/main/TheNumberTwo.h Submitting: Merged main -> r2. Submitting change 7. Locking 2 files ... integrate //stream/r2/One.h#2 integrate //stream/r2/TheNumberTwo.h#2 Change 7 submitted. Looks like it's right this time. However, it's suboptimal because: 1. We need to use '-F' to Merge up. That's suboptimal. That's a TOFU SNAFU. 2. It goes against the North of Main merge flow. The optimal path for content is to merge from older -> newer -> newer -> main, e.g. r1 -> r2 -> r3 -> main. Having to merge thru main just to handle renames properly is wrong.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 19088 | C. Thomas Tyler |
Added Scenario 4, The "North of Main" Populate/Copy Overlay Strategy, which works around the problem. |
||
#2 | 18865 | C. Thomas Tyler |
Added Scenario 1 and 2. Both are broken in different ways. |
||
#1 | 18862 | C. Thomas Tyler | Added repro. |