# HG changeset patch # User Pierre-Yves David # Date 1540459963 -7200 # Node ID 36d559ca5332940bc42f7147a2ff7d5d9dcf8958 # Parent 96525b95d083da152ffe366bcbb98565dd264a41 stack-index: add some test featuring content diversion This will be useful to display various issues. diff -r 96525b95d083 -r 36d559ca5332 tests/test-topic-stack-complex.t --- a/tests/test-topic-stack-complex.t Sun Oct 14 13:37:11 2018 +0200 +++ b/tests/test-topic-stack-complex.t Thu Oct 25 11:32:43 2018 +0200 @@ -134,3 +134,37 @@ s2@ split1 (current) s1: Added a and b s0^ Added foo (base) + +Test case with divergence +------------------------- + + $ hg evolve --all + move:[s3] split2 + atop:[s2] split1 + move:[s4] Added e and f + working directory is now at ec94a1ed1330 + $ hg up s4 + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg id -r . + ec94a1ed1330 tip + $ hg up --hidden 'min(precursors(.))' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + updated to hidden changeset f1d3649d6a8b + (hidden revision 'f1d3649d6a8b' was rewritten as: ec94a1ed1330) + working directory parent is obsolete! (f1d3649d6a8b) + (use 'hg evolve' to update to its successor: ec94a1ed1330) + $ hg amend -d '0 1' + 1 new orphan changesets + 2 new content-divergent changesets + $ hg rebase -r . -d ec94a1ed1330~1 + rebasing 9:eb3b16fef8ea "Added e and f" (tip foo) + $ hg stack + ### topic: foo (2 heads) + ### target: default (branch) + s5: Added e and f + s3^ split2 (base) + s4@ Added e and f (current) + s3: split2 + s2: split1 + s1: Added a and b + s0^ Added foo (base)