changeset 46864:6b42343f3cb6

tests: avoid using rebaseskipobsolete=0 I'm about to delete the `rebaseskipobsolete` config. This patch updates a test to get hidden commits into the rebase state by using `hg debugobsolete` instead of setting `rebaseskipobsolete=0`. Differential Revision: https://phab.mercurial-scm.org/D10270
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 25 Mar 2021 15:38:31 -0700
parents d9601243b73c
children 466236e99eac
files tests/test-rebase-obsolete4.t
diffstat 1 files changed, 15 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-obsolete4.t	Thu Mar 25 11:35:16 2021 -0700
+++ b/tests/test-rebase-obsolete4.t	Thu Mar 25 15:38:31 2021 -0700
@@ -23,7 +23,6 @@
   $ hg init rbsrepo && cd rbsrepo
   $ echo "[experimental]" > .hg/hgrc
   $ echo "evolution=true" >> .hg/hgrc
-  $ echo "rebaseskipobsolete=on" >> .hg/hgrc
   $ echo root > root && hg ci -Am root
   adding root
   $ echo a > a && hg ci -Am a
@@ -124,30 +123,24 @@
    /
   o  0:426bada5c675 A
   
-For some reasons (--hidden, rebaseskipobsolete=0, directaccess, etc.),
+For some reasons (--hidden, directaccess, etc.),
 rebasestate may contain hidden hashes. "rebase --abort" should work regardless.
 
   $ hg init $TESTTMP/hidden-state1
   $ cd $TESTTMP/hidden-state1
-  $ cat >> .hg/hgrc <<EOF
-  > [experimental]
-  > rebaseskipobsolete=0
-  > EOF
 
   $ hg debugdrawdag <<'EOS'
   >    C
   >    |
-  >  D B # prune: B, C
-  >  |/  # B/D=B
+  >  D B # B/D=B
+  >  |/  
   >  A
   > EOS
 
   $ eval `hg tags -T '{tag}={node}\n'`
   $ rm .hg/localtags
 
-  $ hg update -q $C --hidden
-  updated to hidden changeset 7829726be4dc
-  (hidden revision '7829726be4dc' is pruned)
+  $ hg update -q $C
   $ hg rebase -s $B -d $D
   rebasing 1:2ec65233581b "B"
   merging D
@@ -155,12 +148,19 @@
   unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
   [240]
 
+  $ hg debugobsolete $B
+  1 new obsolescence markers
+  obsoleted 1 changesets
+  1 new orphan changesets
+  $ hg debugobsolete $C
+  1 new obsolescence markers
+  obsoleted 1 changesets
   $ cp -R . $TESTTMP/hidden-state2
 
   $ hg log -G
   @  2:b18e25de2cf5 D
   |
-  | %  1:2ec65233581b B (pruned using prune)
+  | %  1:2ec65233581b B (pruned)
   |/
   o  0:426bada5c675 A
   
@@ -183,14 +183,10 @@
   (no more unresolved files)
   continue: hg rebase --continue
   $ hg rebase --continue
-  rebasing 1:2ec65233581b "B"
-  rebasing 3:7829726be4dc tip "C"
+  note: not rebasing 1:2ec65233581b "B", it has no successor
+  note: not rebasing 3:7829726be4dc tip "C", it has no successor
   $ hg log -G
-  @  5:1964d5d5b547 C
-  |
-  o  4:68deb90c12a2 B
-  |
-  o  2:b18e25de2cf5 D
+  @  2:b18e25de2cf5 D
   |
   o  0:426bada5c675 A