Mercurial > hg-stable
changeset 46838:d083c12032c6
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 11 Feb 2021 21:23:05 -0800 |
parents | 27ba8acd5684 |
children | eb2a6f66c463 |
files | tests/test-fix.t |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-fix.t Tue Mar 23 22:48:27 2021 -0700 +++ b/tests/test-fix.t Thu Feb 11 21:23:05 2021 -0800 @@ -1106,14 +1106,13 @@ $ 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