# HG changeset patch # User Pierre-Yves David # Date 1611285845 -3600 # Node ID 6dbfd71cdcba712d9b5ff277175344a2f16c30f1 # Parent bc323205241bb90adff18dbe08b93344886f9bad divergence-resolution: clarify some test case We explain some situation, and the expected output. This is expected to be affected by the next changesets. diff -r bc323205241b -r 6dbfd71cdcba tests/test-evolve-content-divergent-corner-cases.t --- a/tests/test-evolve-content-divergent-corner-cases.t Fri Jan 22 04:10:44 2021 +0100 +++ b/tests/test-evolve-content-divergent-corner-cases.t Fri Jan 22 04:24:05 2021 +0100 @@ -344,6 +344,40 @@ o 0:9092f1db7931 added a () [default] draft +In this case, we have two divergent changeset: +- one did not changed parent +- the other did changed parent + +So we can do a 3 way merges merges. on one side we have changes (the parent +change) and on the other one we don't, we should apply the change. + +BROKEN: Currently, the logic is broken and pick the wrong parent + + $ hg evolve --list --rev 'contentdivergent()' + ff6f7cd76a7c: updated e + orphan: 9150fe93bec6 (obsolete parent) + content-divergent: de4ea3103326 (draft) (precursor 8d71eadcc9df) + + de4ea3103326: updated e + content-divergent: ff6f7cd76a7c (draft) (precursor 8d71eadcc9df) + + + $ hg glog --hidden --rev '::(ff6f7cd76a7c+de4ea3103326+8d71eadcc9df)' + @ 6:de4ea3103326 updated e + | () [default] draft + | * 5:ff6f7cd76a7c updated e + | | () [default] draft + | | x 4:8d71eadcc9df added e + | |/ () [default] draft + | x 3:9150fe93bec6 added d + | | () [default] draft + | o 2:155349b645be added c + |/ () [default] draft + o 1:5f6d8a4bf34a added b + | () [default] draft + o 0:9092f1db7931 added a + () [default] draft + $ hg evolve --content-divergent --any --update --config ui.interactive=true < c > EOF diff -r bc323205241b -r 6dbfd71cdcba tests/test-evolve-content-divergent-relocation.t --- a/tests/test-evolve-content-divergent-relocation.t Fri Jan 22 04:10:44 2021 +0100 +++ b/tests/test-evolve-content-divergent-relocation.t Fri Jan 22 04:24:05 2021 +0100 @@ -64,6 +64,35 @@ o 0:8fa14d15e168 added hgignore () [default] draft +In this case, we have two divergent changeset: +- one did not changed parent +- the other did changed parent + +So we can do a 3 way merges merges. on one side we have changes (the parent +change) and on the other one we don't, we should apply the change. + +BROKEN: Currently, the logic is broken and pick the wrong parent + + $ hg evolve --list --rev 'contentdivergent()' + 7ed0642d644b: added b + content-divergent: da4b96f4a8d6 (draft) (precursor b1661037fa25) + + da4b96f4a8d6: added b + content-divergent: 7ed0642d644b (draft) (precursor b1661037fa25) + + + $ hg glog --hidden --rev '::(7ed0642d644b+da4b96f4a8d6+b1661037fa25)' + * 6:da4b96f4a8d6 added b + | () [default] draft + | @ 5:7ed0642d644b added b + | | () [default] draft + | | x 2:b1661037fa25 added b + | |/ () [default] draft + | o 1:c7586e2a9264 added a + |/ () [default] draft + o 0:8fa14d15e168 added hgignore + () [default] draft + $ hg evolve --content-divergent merge:[5] added b with: [6] added b