diff -r a019067fea9e -r 444e664616c7 tests/test-evolve-phase-divergence.t --- a/tests/test-evolve-phase-divergence.t Thu Mar 28 12:37:55 2019 +0100 +++ b/tests/test-evolve-phase-divergence.t Tue Mar 12 09:44:05 2019 -0700 @@ -47,6 +47,9 @@ $ cp -a private alice $ cp -a private bob + $ cp -a private split + $ cp -a private split-across-branches + $ cp -a private merge-no-conflict Creating a phase-divergence changeset ------------------------------------- @@ -934,117 +937,113 @@ When the public changesets is splitted causing phase-divergence --------------------------------------------------------------- + $ cd ../split + $ echo m > m $ echo n > n $ hg ci -Aqm "added m and n" - $ hg glog -r 21ae52e414e6:: - @ 26:849cee0a874b added m and n + $ hg glog + @ 1:a51bce62c219 added m and n | () draft - o 23:428f7900a969 added g - | () public - o 22:21ae52e414e6 added f - | () public - ~ + o 0:d3873e73d99e init + () public $ hg prev 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - [23] added g + [0] init $ echo m > m $ hg ci -Aqm "added m" $ echo n > n $ hg ci -Aqm "added n" - $ hg glog -r 428f7900a969:: - @ 28:63ccb8ea7cae added n + $ hg glog + @ 3:e1154ec0206a added n | () draft - o 27:f313e2b90e70 added m + o 2:4f25cd9cd2bf added m | () draft - | o 26:849cee0a874b added m and n + | o 1:a51bce62c219 added m and n |/ () draft - o 23:428f7900a969 added g - | () public - ~ + o 0:d3873e73d99e init + () public - $ hg prune -r 849cee0a874b --succ f313e2b90e70 --succ 63ccb8ea7cae --split + $ hg prune -r a51bce62c219 --succ 4f25cd9cd2bf --succ e1154ec0206a --split 1 changesets pruned - $ hg phase -r 849cee0a874b --hidden --public + $ hg phase -r a51bce62c219 --hidden --public 2 new phase-divergent changesets - $ hg glog -r 428f7900a969:: - @ 28:63ccb8ea7cae added n + $ hg glog + @ 3:e1154ec0206a added n | () draft - * 27:f313e2b90e70 added m + * 2:4f25cd9cd2bf added m | () draft - | o 26:849cee0a874b added m and n + | o 1:a51bce62c219 added m and n |/ () public - o 23:428f7900a969 added g - | () public - ~ + o 0:d3873e73d99e init + () public $ hg evolve --all --phase-divergent - recreate:[27] added m - atop:[26] added m and n + recreate:[2] added m + atop:[1] added m and n computing new diff - committed as 870e1c3eddc3 + committed as 86419909e017 1 new orphan changesets - recreate:[28] added n - atop:[26] added m and n - rebasing to destination parent: 428f7900a969 + recreate:[3] added n + atop:[1] added m and n + rebasing to destination parent: d3873e73d99e computing new diff - committed as 154b0179fb9b - working directory is now at 154b0179fb9b + committed as 89ba615ea1ec + working directory is now at 89ba615ea1ec XXX: this is messy, we should solve things in better way - $ hg glog -r 428f7900a969:: --hidden - @ 31:154b0179fb9b phase-divergent update to 849cee0a874b: + $ hg glog --hidden + @ 6:89ba615ea1ec phase-divergent update to a51bce62c219: | () draft - | x 30:1ebf33547a82 added n + | x 5:ee4af146c5cf added n | | () draft - +---o 29:870e1c3eddc3 phase-divergent update to 849cee0a874b: + +---o 4:86419909e017 phase-divergent update to a51bce62c219: | | () draft - | | x 28:63ccb8ea7cae added n + | | x 3:e1154ec0206a added n | | | () draft - | | x 27:f313e2b90e70 added m + | | x 2:4f25cd9cd2bf added m | |/ () draft - o | 26:849cee0a874b added m and n + o | 1:a51bce62c219 added m and n |/ () public - o 23:428f7900a969 added g - | () public - ~ + o 0:d3873e73d99e init + () public XXX: not sure this is the correct - $ hg exp 154b0179fb9b + $ hg exp 89ba615ea1ec # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 154b0179fb9b53d2f853d6ba04740bb3d7a5cabe - # Parent 849cee0a874be7c4e75dfacb5ad72aa5696951ba - phase-divergent update to 849cee0a874b: + # Node ID 89ba615ea1ec3ba5b25db9f7897eb29712d7e5d6 + # Parent a51bce62c219f024bc0ae0cc0e3957ee77d7cb46 + phase-divergent update to a51bce62c219: added n - diff -r 849cee0a874b -r 154b0179fb9b m + diff -r a51bce62c219 -r 89ba615ea1ec m --- a/m Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -m XXX: not sure this is correct - $ hg exp 870e1c3eddc3 + $ hg exp 86419909e017 # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 870e1c3eddc34cc475e8e13d2fe1934210c1937e - # Parent 849cee0a874be7c4e75dfacb5ad72aa5696951ba - phase-divergent update to 849cee0a874b: + # Node ID 86419909e01787959aa6471aee605c6d604a3e0d + # Parent a51bce62c219f024bc0ae0cc0e3957ee77d7cb46 + phase-divergent update to a51bce62c219: added m - diff -r 849cee0a874b -r 870e1c3eddc3 n + diff -r a51bce62c219 -r 86419909e017 n --- a/n Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ @@ -1053,113 +1052,112 @@ When the public changeset is splitted across various branches -------------------------------------------------------------- + $ cd ../split-across-branches + $ echo p > p $ echo q > q $ hg ci -Aqm "added p and q" $ hg prev 0 files updated, 0 files merged, 2 files removed, 0 files unresolved - [31] phase-divergent update to 849cee0a874b: + [0] init $ echo p > p $ hg ci -Aqm "added p" $ hg prev 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - [31] phase-divergent update to 849cee0a874b: + [0] init $ echo q > q $ hg ci -Aqm "added q" - $ hg glog -r 154b0179fb9b:: - @ 34:e046341aa97c added q + $ hg glog + @ 3:bb87595f9a77 added q | () draft - | o 33:6f8c250eecff added p + | o 2:a47263294745 added p |/ () draft - | o 32:8a70f55b2af3 added p and q + | o 1:90859808ece6 added p and q |/ () draft - o 31:154b0179fb9b phase-divergent update to 849cee0a874b: - | () draft - ~ + o 0:d3873e73d99e init + () public - $ hg prune -r 8a70f55b2af3 --succ 6f8c250eecff --succ e046341aa97c --split + $ hg prune -r 90859808ece6 --succ a47263294745 --succ bb87595f9a77 --split 1 changesets pruned - $ hg phase -r 8a70f55b2af3 --public --hidden + $ hg phase -r 90859808ece6 --public --hidden 2 new phase-divergent changesets - $ hg glog -r 154b0179fb9b:: - @ 34:e046341aa97c added q + $ hg glog + @ 3:bb87595f9a77 added q | () draft - | * 33:6f8c250eecff added p + | * 2:a47263294745 added p |/ () draft - | o 32:8a70f55b2af3 added p and q + | o 1:90859808ece6 added p and q |/ () public - o 31:154b0179fb9b phase-divergent update to 849cee0a874b: - | () public - ~ + o 0:d3873e73d99e init + () public $ hg evolve --list - 6f8c250eecff: added p - phase-divergent: 8a70f55b2af3 (immutable precursor) + a47263294745: added p + phase-divergent: 90859808ece6 (immutable precursor) - e046341aa97c: added q - phase-divergent: 8a70f55b2af3 (immutable precursor) + bb87595f9a77: added q + phase-divergent: 90859808ece6 (immutable precursor) $ hg evolve --all --phase-divergent - recreate:[33] added p - atop:[32] added p and q + recreate:[2] added p + atop:[1] added p and q computing new diff - committed as f3e41d89b3c5 - recreate:[34] added q - atop:[32] added p and q + committed as 25875a9cb640 + recreate:[3] added q + atop:[1] added p and q computing new diff - committed as 605c306d4f87 - working directory is now at 605c306d4f87 + committed as 26f564f94bcc + working directory is now at 26f564f94bcc - $ hg glog -r 154b0179fb9b:: --hidden - @ 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: + $ hg glog --hidden + @ 5:26f564f94bcc phase-divergent update to 90859808ece6: | () draft - | o 35:f3e41d89b3c5 phase-divergent update to 8a70f55b2af3: + | o 4:25875a9cb640 phase-divergent update to 90859808ece6: |/ () draft - | x 34:e046341aa97c added q + | x 3:bb87595f9a77 added q | | () draft - | | x 33:6f8c250eecff added p + | | x 2:a47263294745 added p | |/ () draft - o | 32:8a70f55b2af3 added p and q + o | 1:90859808ece6 added p and q |/ () public - o 31:154b0179fb9b phase-divergent update to 849cee0a874b: - | () public - ~ + o 0:d3873e73d99e init + () public XXX: not sure this is correct - $ hg exp 605c306d4f87 + $ hg exp 26f564f94bcc # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID 605c306d4f87fccfdb5e7dd1c750b6d4f813defb - # Parent 8a70f55b2af35452916dc89401a5ecf6553646a5 - phase-divergent update to 8a70f55b2af3: + # Node ID 26f564f94bcc34e049eb112fd14ab1e5286f2325 + # Parent 90859808ece64c9ca64dd29992db42353c70f164 + phase-divergent update to 90859808ece6: added q - diff -r 8a70f55b2af3 -r 605c306d4f87 p + diff -r 90859808ece6 -r 26f564f94bcc p --- a/p Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -p XXX: not sure this is correct - $ hg exp f3e41d89b3c5 + $ hg exp 25875a9cb640 # HG changeset patch # User test # Date 0 0 # Thu Jan 01 00:00:00 1970 +0000 - # Node ID f3e41d89b3c5f6ee49ccc734045856d7b025f048 - # Parent 8a70f55b2af35452916dc89401a5ecf6553646a5 - phase-divergent update to 8a70f55b2af3: + # Node ID 25875a9cb6400973b846c94f6a80410067c2cb1f + # Parent 90859808ece64c9ca64dd29992db42353c70f164 + phase-divergent update to 90859808ece6: added p - diff -r 8a70f55b2af3 -r f3e41d89b3c5 q + diff -r 90859808ece6 -r 25875a9cb640 q --- a/q Thu Jan 01 00:00:00 1970 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ @@ -1168,68 +1166,57 @@ 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 - ~ + $ cd ../merge-no-conflict $ 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: + [0] init $ echo i > i $ hg ci -Aqm "added i" - $ hg merge -r ef8c23f37b55 + $ hg merge -r a53d182199c1 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 + $ hg glog + @ 3:205b2f5ecb7b merge h and i |\ () draft - | o 38:9bb561db4230 added i + | o 2:f0be5e638ecf added i | | () draft - o | 37:ef8c23f37b55 added h + o | 1:a53d182199c1 added h |/ () draft - o 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: - | () draft - ~ + o 0:d3873e73d99e init + () public - $ hg up ef8c23f37b55 + $ hg up a53d182199c1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg merge -r 9bb561db4230 + $ hg merge -r f0be5e638ecf 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 + $ hg glog + @ 4:8d4acf488ab5 merge h and i successor |\ () draft - +---o 39:12ebe0d625d7 merge h and i + +---o 3:205b2f5ecb7b merge h and i | |/ () draft - | o 38:9bb561db4230 added i + | o 2:f0be5e638ecf added i | | () draft - o | 37:ef8c23f37b55 added h + o | 1:a53d182199c1 added h |/ () draft - o 36:605c306d4f87 phase-divergent update to 8a70f55b2af3: - | () draft - ~ + o 0:d3873e73d99e init + () public - $ hg prune -r 12ebe0d625d7 --succ . + $ hg prune -r 205b2f5ecb7b --succ . 1 changesets pruned - $ hg phase 12ebe0d625d7 --hidden --public + $ hg phase 205b2f5ecb7b --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 + skipping 8d4acf488ab5 : we do not handle merge yet