# HG changeset patch # User Martin von Zweigbergk # Date 2021-02-12 05:23:05 # Node ID d083c12032c652d71536c86bbcf4e9e9ec13f5ed # Parent 27ba8acd568464e85ffacdb33357d9583bf45cae tests: update divergence test for `hg fix` to actually result in divergence We have a test that checks that `hg fix` errors out if it might cause divergence. However, the test simply prunes the commit it then tries to fix, so fixing it wouldn't actually cause divergence. That works because the implementation is simple enough that it doesn't notice the difference. I'm about to make the implementation smarter, so let's fix the test first. Differential Revision: https://phab.mercurial-scm.org/D10267 diff --git a/tests/test-fix.t b/tests/test-fix.t --- a/tests/test-fix.t +++ b/tests/test-fix.t @@ -1106,14 +1106,13 @@ obsolete revision. $ printf "foo\n" > foo.changed $ hg commit -Aqm "foo" - $ hg debugobsolete `hg parents --template '{node}'` - 1 new obsolescence markers - obsoleted 1 changesets + $ hg ci --amend -m rewritten $ hg --hidden fix -r 0 abort: fixing obsolete revision could cause divergence [255] $ hg --hidden fix -r 0 --config experimental.evolution.allowdivergence=true + 2 new content-divergent changesets $ hg cat -r tip foo.changed FOO