comparison tests/test-prune.t @ 6217:4466989cee8d

precheck: fix false warning about divergence creation, in hg prune In case of pruning with no successors, there is no chance for new divergence. It was happening becuase current precheck logic assumes that every revision being rewritten will be replaced with at least one successor. Changes in test file demonstrate the fixed bug.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Fri, 23 Jul 2021 00:34:29 +0530
parents ce46b853d10e
children 7650b38961a2
comparison
equal deleted inserted replaced
6216:ce46b853d10e 6217:4466989cee8d
489 489
490 $ cd .. 490 $ cd ..
491 491
492 Test that pruning (without any successors) an already pruned 492 Test that pruning (without any successors) an already pruned
493 revision doesn't give false warning about divergence creation: 493 revision doesn't give false warning about divergence creation:
494 XXX: it is a false warning and should be fixed in upcoming patch 494
495 $ hg init nofalsewarn 495 $ hg init nofalsewarn
496 $ cd nofalsewarn 496 $ cd nofalsewarn
497 $ echo a > A 497 $ echo a > A
498 $ hg ci -Aqm "added a" 498 $ hg ci -Aqm "added a"
499 $ hg ci --amend -m "added A" 499 $ hg ci --amend -m "added A"
500 $ hg prune 0 --hidden 500 $ hg prune 0 --hidden
501 abort: cannot prune b8e67c50f3e6, as that creates content-divergence with fd9fbba03735 501 1 changesets pruned
502 (add --verbose for details or see 'hg help evolution.instability')
503 [10]
504 502
505 $ cd .. 503 $ cd ..