# HG changeset patch # User Sushil khanchi # Date 1626981530 -19800 # Node ID ce46b853d10ea9a3ef716fc9675264966c98a721 # Parent 1a33b31ad9a32c484054484d00ebf8cb85e7fd5b prune: add a test to demonstrate a bug Test shows that pruning without any successor warns about creating divergence which is not possible and is a false warning. For the knowledge, this pattern of pruning (without any successor) an already pruned cset is sometime used to keep successors locally but vanish them at server side. diff -r 1a33b31ad9a3 -r ce46b853d10e tests/test-prune.t --- a/tests/test-prune.t Sun Dec 12 17:19:12 2021 +0300 +++ b/tests/test-prune.t Fri Jul 23 00:48:50 2021 +0530 @@ -488,3 +488,18 @@ (use 'hg evolve' to update to its parent successor) $ cd .. + +Test that pruning (without any successors) an already pruned +revision doesn't give false warning about divergence creation: +XXX: it is a false warning and should be fixed in upcoming patch + $ hg init nofalsewarn + $ cd nofalsewarn + $ echo a > A + $ hg ci -Aqm "added a" + $ hg ci --amend -m "added A" + $ hg prune 0 --hidden + abort: cannot prune b8e67c50f3e6, as that creates content-divergence with fd9fbba03735 + (add --verbose for details or see 'hg help evolution.instability') + [10] + + $ cd ..