Mercurial > evolve
diff tests/test-obsolete.t @ 5466:c2aa46a1f47c mercurial-4.8
test-compat: merge mercurial-4.9 into mercurial-4.8
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 31 Jul 2020 19:12:44 +0800 |
parents | 8d28fa24f7cd |
children | d04a9bf34b79 669270305ccb |
line wrap: on
line diff
--- a/tests/test-obsolete.t Fri May 08 20:36:32 2020 +0800 +++ b/tests/test-obsolete.t Fri Jul 31 19:12:44 2020 +0800 @@ -523,22 +523,17 @@ should not rebase extinct changesets -#excluded 'whole rebase set is extinct and ignored.' message not in core - $ 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(3)' + $ 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 | @@ -554,14 +549,13 @@ 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 10 + $ hg up -q 'desc("re:^add obsol_c'\''$")' $ mkcommit "obsol_d'''" created new head - $ hg debugobsolete `getid 11` `getid 12` + $ hg debugobsolete `getid 'max(desc("re:^add obsol_d'\'\''$"))'` `getid 'desc("re:^add obsol_d'\'\'\''$")'` obsoleted 1 changesets $ hg push ../other-new --traceback pushing to ../other-new @@ -578,15 +572,13 @@ (make an obsolete changeset public) $ cd local - $ hg phase --hidden --public 11 + $ 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 @@ -594,9 +586,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 @@ -605,7 +597,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] @@ -618,31 +610,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 @@ -667,76 +654,51 @@ 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'} -#no produced by 2.3 -33d458d86621f3186c40bfccd77652f4a122743e 3734a65252e69ddcced85901647a4f335d40de1e 0 {'date': '* *', 'user': 'test'} (glob) + 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) - $ hg up 9468a5f5d8b2 # add obsol_d'' + $ hg up 'max(desc("re:^add obsol_d'\'\''$"))' # add obsol_d'' 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) update: (2|9|11) new changesets, (3|9|10) branch heads \(merge\) (re) phases: 3 draft phase-divergent: 1 changesets - $ hg debugobsolete `getid a7a6f2b5d8a5` `getid 50f11e5e3a63` + $ hg debugobsolete `getid 'desc("re:^add d$")'` `getid 'desc("re:^add obsolet_conflicting_d$")'` 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 summary: add obsolet_conflicting_d - $ hg up --hidden 3 -q - updated to hidden changeset 0d3f46688ccc - (hidden revision '0d3f46688ccc' has diverged) - working directory parent is obsolete! (0d3f46688ccc) - $ hg evolve - parent is obsolete with multiple successors: - [4] add obsol_c' - [10] add obsol_c - [2] - $ hg olog -a - o 2033b4e49474 (10) add obsol_c - | rebased(parent) from 0d3f46688ccc using rebase by test (Thu Jan 01 00:00:00 1970 +0000) - | - | o 725c380fe99b (4) add obsol_c' - |/ rewritten from 0d3f46688ccc by test (Thu Jan 01 00:00:00 1970 +0000) - | - @ 0d3f46688ccc (3) add obsol_c - | rewritten from 4538525df7e2 by test (Thu Jan 01 00:00:00 1970 +0000) - | - x 4538525df7e2 (2) add c - - Check import reports new unstable changeset: - $ hg up --hidden 2 - 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg up --hidden 'desc("re:^add c$")' + 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) - $ hg export 9468a5f5d8b2 | hg import - + (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 @@ -745,7 +707,7 @@ ============================== $ hg log -G --hidden - @ changeset: 16:a5f7a21fe7bc + @ changeset: 15:a5f7a21fe7bc | tag: tip | parent: 2:4538525df7e2 | user: test @@ -753,44 +715,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 @@ -802,7 +759,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 @@ -824,7 +781,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 @@ -838,7 +795,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 @@ -860,17 +816,17 @@ Simple rewrite - $ hg --hidden debugobsolete --rev 3 + $ hg --hidden debugobsolete --rev 'min(desc("re:^add obsol_c$"))' 4538525df7e2b9f09423636c61ef63a4cb872a2d 0d3f46688ccc6e756c7e96cf64c391c411309597 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} simple rewrite with a prune attached to it - $ hg debugobsolete --rev 15 - a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 50f11e5e3a63806e678c734e525502f522d37e38 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + $ hg debugobsolete --rev 'desc("re:^add obsolet_conflicting_d$")' + a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 553bdab4dee8f0032cd60de38be72d1d2e8225d5 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} Transitive rewrite - $ hg --hidden debugobsolete --rev 8 + $ hg --hidden debugobsolete --rev 'min(desc("re:^add obsol_d'\'\''$"))' 909a0fb57e5d909f353d89e394ffd7e0890fec88 159dfc9fa5d334d7e03a0aecfc7f7ab4c3431fea 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 95de7fc6918dea4c9c8d5382f50649794b474c4a 909a0fb57e5d909f353d89e394ffd7e0890fec88 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 95de7fc6918dea4c9c8d5382f50649794b474c4a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}