# HG changeset patch # User Pierre-Yves David # Date 1595413712 -7200 # Node ID 21ea3de27eb5871838881a5df88b2c32ad8686b4 # Parent 920b89d514305ce9060a4cfeb29096ddc465f8db test-obsolete: remove revnum usage for a good share of the test diff -r 920b89d51430 -r 21ea3de27eb5 tests/test-obsolete.t --- a/tests/test-obsolete.t Wed Jul 22 12:24:58 2020 +0200 +++ b/tests/test-obsolete.t Wed Jul 22 12:28:32 2020 +0200 @@ -534,7 +534,7 @@ rebasing 3:0d3f46688ccc "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 @@ -564,10 +564,10 @@ 3 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'\'\'\''$")'` 1 new obsolescence markers obsoleted 1 changesets $ hg push ../other-new --traceback @@ -585,7 +585,7 @@ (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''' @@ -681,7 +681,7 @@ 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 @@ -692,7 +692,7 @@ 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$")'` 1 new obsolescence markers 2 new content-divergent changesets $ hg log -r 'contentdivergent()' @@ -712,7 +712,7 @@ summary: add obsolet_conflicting_d - $ hg up --hidden 3 -q + $ hg up --hidden 'min(desc("re:^add obsol_c$"))' -q updated to hidden changeset 0d3f46688ccc (hidden revision '0d3f46688ccc' has diverged) working directory parent is obsolete! (0d3f46688ccc) @@ -736,7 +736,7 @@ Check import reports new unstable changeset: - $ hg up --hidden 2 + $ hg up --hidden 'desc("re:^add c$")' 1 files updated, 0 files merged, 1 files removed, 0 files unresolved updated to hidden changeset 4538525df7e2 (hidden revision '4538525df7e2' has diverged) @@ -866,17 +866,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 + $ hg debugobsolete --rev 'desc("re:^add obsolet_conflicting_d$")' a7a6f2b5d8a54b81bc7aa2fba2934ad6d700a79e 50f11e5e3a63806e678c734e525502f522d37e38 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'}