D10270: tests: avoid using rebaseskipobsolete=0
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Mar 25 23:36:06 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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`.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10270
AFFECTED FILES
tests/test-rebase-obsolete4.t
CHANGE DETAILS
diff --git a/tests/test-rebase-obsolete4.t b/tests/test-rebase-obsolete4.t
--- a/tests/test-rebase-obsolete4.t
+++ b/tests/test-rebase-obsolete4.t
@@ -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
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list