# HG changeset patch # User Pierre-Yves David # Date 1595413541 -7200 # Node ID d55e83faeaf82b260334f59a31eaef51bac7be4f # Parent 272094174185f50eaea5a4e70e1b884fb83795c3 test-obsolete: remove divergence casually introduced by rebase This content-divergence is getting in the way of the behavior improvement in introduced in c26335fa4225. So we remove it. diff -r 272094174185 -r d55e83faeaf8 tests/test-obsolete.t --- a/tests/test-obsolete.t Wed Jul 22 14:23:58 2020 +0200 +++ b/tests/test-obsolete.t Wed Jul 22 12:25:41 2020 +0200 @@ -530,21 +530,17 @@ should not rebase extinct changesets - $ hg rebase -b '3' -d 4 --traceback --config experimental.rebaseskipobsolete=0 - rebasing 3:0d3f46688ccc "add obsol_c" + $ hg rebase -b '3' -d 4 --traceback + note: not rebasing 3:0d3f46688ccc "add obsol_c", already in destination as 4:725c380fe99b "add obsol_c'" rebasing 8:159dfc9fa5d3 "add obsol_d''" - 2 new content-divergent changesets $ hg --hidden log -q -r 'successors(min(desc("re:^add obsol_c$")))' 4:725c380fe99b - 10:2033b4e49474 $ hg up tip ? files updated, 0 files merged, 0 files removed, 0 files unresolved (glob) $ hg log -G --template='{rev} - {node|short} {desc}\n' - @ 11 - 9468a5f5d8b2 add obsol_d'' + @ 10 - 8396b69aa9f7 add obsol_d'' | - * 10 - 2033b4e49474 add obsol_c - | - * 4 - 725c380fe99b add obsol_c' + o 4 - 725c380fe99b add obsol_c' | o 1 - 7c3bad9141dc add b | @@ -560,11 +556,10 @@ adding changesets adding manifests adding file changes - added 2 changesets with 1 changes to [12] files (re) - 3 new obsolescence markers + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers obsoleted 1 changesets - 2 new content-divergent changesets - $ hg up -q 'desc("re:^add obsol_c$")' + $ hg up -q 'desc("re:^add obsol_c'\''$")' $ mkcommit "obsol_d'''" created new head $ hg debugobsolete `getid 'max(desc("re:^add obsol_d'\'\''$"))'` `getid 'desc("re:^add obsol_d'\'\'\''$")'` @@ -588,12 +583,10 @@ $ hg phase --hidden --public 'max(desc("re:^add obsol_d'\'\''$"))' 1 new phase-divergent changesets $ hg log -G --template='{rev} - ({phase}) {node|short} {desc}\n' - @ 12 - (draft) 6db5e282cb91 add obsol_d''' + @ 11 - (draft) 5a9eef7b778b add obsol_d''' | - | o 11 - (public) 9468a5f5d8b2 add obsol_d'' + | o 10 - (public) 8396b69aa9f7 add obsol_d'' |/ - o 10 - (public) 2033b4e49474 add obsol_c - | o 4 - (public) 725c380fe99b add obsol_c' | o 1 - (public) 7c3bad9141dc add b @@ -601,9 +594,9 @@ o 0 - (public) 1f0dee641bb7 add a $ hg log -r 'phasedivergent()' - changeset: 12:6db5e282cb91 + changeset: 11:5a9eef7b778b tag: tip - parent: 10:2033b4e49474 + parent: 4:725c380fe99b user: test date: Thu Jan 01 00:00:00 1970 +0000 instability: phase-divergent @@ -612,7 +605,7 @@ $ hg push ../other-new/ pushing to ../other-new/ searching for changes - abort: push includes phase-divergent changeset: 6db5e282cb91! + abort: push includes phase-divergent changeset: 5a9eef7b778b! (use 'hg evolve' to get a stable history or --force to ignore warnings) [255] @@ -625,31 +618,26 @@ $ echo 42 >> f $ hg commit --amend --traceback --quiet $ hg log -G - @ changeset: 14:705ab2a6b72e + @ changeset: 13:6491691ca36f | tag: tip - | parent: 10:2033b4e49474 + | parent: 4:725c380fe99b | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: add f | - | * changeset: 12:6db5e282cb91 - |/ parent: 10:2033b4e49474 + | * changeset: 11:5a9eef7b778b + |/ parent: 4:725c380fe99b | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | instability: phase-divergent | summary: add obsol_d''' | - | o changeset: 11:9468a5f5d8b2 - |/ user: test + | o changeset: 10:8396b69aa9f7 + |/ parent: 4:725c380fe99b + | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: add obsol_d'' | - o changeset: 10:2033b4e49474 - | parent: 4:725c380fe99b - | user: test - | date: Thu Jan 01 00:00:00 1970 +0000 - | summary: add obsol_c - | o changeset: 4:725c380fe99b | parent: 1:7c3bad9141dc | user: test @@ -674,10 +662,9 @@ 909a0fb57e5d909f353d89e394ffd7e0890fec88 159dfc9fa5d334d7e03a0aecfc7f7ab4c3431fea 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 1f0dee641bb7258c56bd60e93edfa2405381c41e 83b5778897adafb967ef2f75be3aaa4fce49a4cc 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 83b5778897adafb967ef2f75be3aaa4fce49a4cc 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 0d3f46688ccc6e756c7e96cf64c391c411309597 2033b4e494742365851fac84d276640cbf52833e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - 159dfc9fa5d334d7e03a0aecfc7f7ab4c3431fea 9468a5f5d8b2c5d91e17474e95ae4791e9718fdf 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} - 9468a5f5d8b2c5d91e17474e95ae4791e9718fdf 6db5e282cb91df5c43ff1f1287c119ff83230d42 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - 0b1b6dd009c037985363e2290a0b579819f659db 705ab2a6b72e2cd86edb799ebe15f2695f86143e 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} + 159dfc9fa5d334d7e03a0aecfc7f7ab4c3431fea 8396b69aa9f7b4ea03ed94c63641e3c021d71f0c 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} + 8396b69aa9f7b4ea03ed94c63641e3c021d71f0c 5a9eef7b778bf2ba5e6cc1b741ec5a2110ba1480 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + bc294e7f0681bbed7b83047814e9eadabead2f8d 6491691ca36ffa1b1c48d9bf8605ac5a25d200f6 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '8', 'operation': 'amend', 'user': 'test'} Check divergence detection (note: multiple successors is sorted by changeset hash) @@ -685,7 +672,7 @@ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit "obsolet_conflicting_d" $ hg summary - parent: 15:50f11e5e3a63 tip + parent: 14:553bdab4dee8 tip add obsolet_conflicting_d branch: default commit: (clean) @@ -696,16 +683,16 @@ 1 new obsolescence markers 2 new content-divergent changesets $ hg log -r 'contentdivergent()' - changeset: 12:6db5e282cb91 - parent: 10:2033b4e49474 + changeset: 11:5a9eef7b778b + parent: 4:725c380fe99b user: test date: Thu Jan 01 00:00:00 1970 +0000 instability: phase-divergent, content-divergent summary: add obsol_d''' - changeset: 15:50f11e5e3a63 + changeset: 14:553bdab4dee8 tag: tip - parent: 11:9468a5f5d8b2 + parent: 10:8396b69aa9f7 user: test date: Thu Jan 01 00:00:00 1970 +0000 instability: content-divergent @@ -715,11 +702,11 @@ Check import reports new unstable changeset: $ hg up --hidden 'desc("re:^add c$")' - 1 files updated, 0 files merged, 4 files removed, 0 files unresolved + 1 files updated, 0 files merged, 3 files removed, 0 files unresolved updated to hidden changeset 4538525df7e2 - (hidden revision '4538525df7e2' has diverged) + (hidden revision '4538525df7e2' was rewritten as: 725c380fe99b) working directory parent is obsolete! (4538525df7e2) - (4538525df7e2 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue) + (use 'hg evolve' to update to its successor: 725c380fe99b) $ hg export 'desc("re:^add obsol_d'\'\''$")' | hg import - applying patch from stdin 1 new orphan changesets @@ -729,7 +716,7 @@ ============================== $ hg log -G --hidden - @ changeset: 16:a5f7a21fe7bc + @ changeset: 15:a5f7a21fe7bc | tag: tip | parent: 2:4538525df7e2 | user: test @@ -737,44 +724,39 @@ | instability: orphan | summary: add obsol_d'' | - | * changeset: 15:50f11e5e3a63 - | | parent: 11:9468a5f5d8b2 + | * changeset: 14:553bdab4dee8 + | | parent: 10:8396b69aa9f7 | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | instability: content-divergent | | summary: add obsolet_conflicting_d | | - | | o changeset: 14:705ab2a6b72e - | | | parent: 10:2033b4e49474 + | | o changeset: 13:6491691ca36f + | | | parent: 4:725c380fe99b | | | user: test | | | date: Thu Jan 01 00:00:00 1970 +0000 | | | summary: add f | | | - | | | x changeset: 13:0b1b6dd009c0 - | | |/ parent: 10:2033b4e49474 + | | | x changeset: 12:bc294e7f0681 + | | |/ parent: 4:725c380fe99b | | | user: test | | | date: Thu Jan 01 00:00:00 1970 +0000 - | | | obsolete: amended using amend as 14:705ab2a6b72e + | | | obsolete: amended using amend as 13:6491691ca36f | | | summary: add f | | | - | | | * changeset: 12:6db5e282cb91 - | | |/ parent: 10:2033b4e49474 + | | | * changeset: 11:5a9eef7b778b + | | |/ parent: 4:725c380fe99b | | | user: test | | | date: Thu Jan 01 00:00:00 1970 +0000 | | | instability: phase-divergent, content-divergent | | | summary: add obsol_d''' | | | - | o | changeset: 11:9468a5f5d8b2 - | |/ user: test + | o | changeset: 10:8396b69aa9f7 + | |/ parent: 4:725c380fe99b + | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | summary: add obsol_d'' | | - | o changeset: 10:2033b4e49474 - | | parent: 4:725c380fe99b - | | user: test - | | date: Thu Jan 01 00:00:00 1970 +0000 - | | summary: add obsol_c - | | | | x changeset: 9:83b5778897ad | | parent: -1:000000000000 | | user: test @@ -786,7 +768,7 @@ | | | parent: 3:0d3f46688ccc | | | user: test | | | date: Thu Jan 01 00:00:00 1970 +0000 - | | | obsolete: rebased using rebase as 11:9468a5f5d8b2 + | | | obsolete: rebased using rebase as 10:8396b69aa9f7 | | | summary: add obsol_d'' | | | | | | x changeset: 7:909a0fb57e5d @@ -808,7 +790,7 @@ | | | user: test | | | date: Thu Jan 01 00:00:00 1970 +0000 | | | obsolete: rewritten as 6:95de7fc6918d - | | | obsolete: rewritten as 15:50f11e5e3a63 + | | | obsolete: rewritten as 14:553bdab4dee8 | | | summary: add d | | | | o | changeset: 4:725c380fe99b @@ -822,7 +804,6 @@ | | user: test | | date: Thu Jan 01 00:00:00 1970 +0000 | | obsolete: rewritten as 4:725c380fe99b - | | obsolete: rebased using rebase as 10:2033b4e49474 | | summary: add obsol_c | | x | changeset: 2:4538525df7e2 @@ -850,7 +831,7 @@ simple rewrite with a prune attached to it $ hg debugobsolete --rev 'desc("re:^add obsolet_conflicting_d$")' - a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 50f11e5e3a63806e678c734e525502f522d37e38 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 553bdab4dee8f0032cd60de38be72d1d2e8225d5 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} Transitive rewrite