# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1522237388 -19800 # Node ID 1b9c2720faee1da0a02719482d6e14688ab35d1d # Parent 92a2d3217de90a6af0a0ba0650e339ceee7049b5 tests: add test about handling phase-divergent merges We don't handle phase-divergent merges and we should. Upcoming patches will add the ability to handle them. diff -r 92a2d3217de9 -r 1b9c2720faee tests/test-evolve-phase-divergence.t --- a/tests/test-evolve-phase-divergence.t Wed Mar 28 14:11:13 2018 +0530 +++ b/tests/test-evolve-phase-divergence.t Wed Mar 28 17:13:08 2018 +0530 @@ -1161,3 +1161,72 @@ +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -q + +Testing the evolution of a phase-divergent merge with no conflicts +------------------------------------------------------------------ + + $ hg glog -r 154b0179fb9b:: + @ 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: + | () draft + | o 35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3: + |/ () draft + o 32:8a70f55b2af3 added p and q + | () public + o 31:154b0179fb9b phase-divergent update to 849cee0a874b: + | () public + ~ + + $ echo h > h + $ hg ci -Aqm "added h" + $ hg prev + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + [36] phase-divergent update to 8a70f55b2af3: + $ echo i > i + $ hg ci -Aqm "added i" + $ hg merge -r ef8c23f37b55 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + $ hg ci -m "merge h and i" + + $ hg glog -r 605c306d4f87:: + @ 39:12ebe0d625d7 merge h and i + |\ () draft + | o 38:9bb561db4230 added i + | | () draft + o | 37:ef8c23f37b55 added h + |/ () draft + o 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: + | () draft + ~ + + $ hg up ef8c23f37b55 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg merge -r 9bb561db4230 + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + $ hg ci -m "merge h and i successor" + created new head + $ hg glog -r 605c306d4f87:: + @ 40:d2aeda868461 merge h and i successor + |\ () draft + +---o 39:12ebe0d625d7 merge h and i + | |/ () draft + | o 38:9bb561db4230 added i + | | () draft + o | 37:ef8c23f37b55 added h + |/ () draft + o 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: + | () draft + ~ + + $ hg prune -r 12ebe0d625d7 --succ . + 1 changesets pruned + + $ hg phase 12ebe0d625d7 --hidden --public + 1 new phase-divergent changesets + +Resolution of phase-divergent merge commit using `hg evolve` + +XXX: we should handle phase-divergent merges + $ hg evolve --phase-divergent + skipping d2aeda868461 : we do not handle merge yet