Imagine this scenario:
Here's a different view of the above scenario
(the numbers after "CHANGE" means that the person changed "portion X" of the file. If both users changed the same portion, we have a merge conflict ahead, if they changed different, not as much)
Alice Bob CLONE MASTER CLONE MASTER ----------------------------------------- CHANGE 1 <-----+ COMMIT +-- upcoming merge conflict ----------------------------------------- | CHANGE 1 <-----+ COMMIT PUSH ----------------------------------------- PULL <-- Bob's change +1 head MERGE <-- Attempt to get rid of extra head RESOLVE CONFLICT <-- Resolve merge conflict COMMIT ----------------------------------------- CHANGE 2 <-----+ COMMIT +-- yet another merge PUSH | conflict ahead ----------------------------------------- | CHANGE 2 <-----+ COMMIT PULL <-- Bob's change, again +1 head MERGE <-- Attempt to get rid of extra head RESOLVE ???
At this point, my question is this:
If I had simply taken Bob's version of the file, and Alice's version of the file, and given to any merge-program, it would flag both changes as in conflict.
In other words, will the conflict tool try to ask Alice to resolve both the original conflict and the new one, or only the latest one?
I'm guessing (I haven't tried this, still attempting to build some kind of test script to test this problem) that Mercurial will only ask Alice to resolve the latest conflict.
What if I configure Mercurial to use a 3rd party diff/merge program? Will this still apply? For instance, I have configured my installation to use Beyond Compare, will the two files (Bob's with only his changes and Alice's with her changes + the merge resolution) be given with or without the initial resolution present? In other words, if using Beyond Compare, will the correct thing happen here too (assuming it does at all.)
Mercurial will require only that the latest conflict be resolved, and that will work fine with external change tools.
When Alice does her second merge, she's merging her own previous merge with bob's new delta and only that change needs to be integrated anew.
Really clear diagram, BTW. Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With