Mercurial > evolve
comparison tests/test-fold.t @ 5079:1f92a6aa40d6
evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
For now, pre-check will abort if rewriting a rev create divergence (and
config experimental.evolution.allowdivergence is not set to True).
But this behaviour can be improved where instead of abort maybe we
can confirm the user to either proceed with divergence or some other
options depends on what command user is running.
Changes in test file are used to overrides the pre-check for testing
purpose (using experimental.evolution.allowdivergence=yes).
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Mon, 04 Nov 2019 01:30:50 +0530 |
parents | 8a491546e81d |
children | a66c9fc9c503 |
comparison
equal
deleted
inserted
replaced
5078:66f01dd79f5d | 5079:1f92a6aa40d6 |
---|---|
403 | 403 |
404 fold aborts here because divergence is not allowed | 404 fold aborts here because divergence is not allowed |
405 | 405 |
406 $ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ | 406 $ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ |
407 > --config experimental.evolution.allowdivergence=no | 407 > --config experimental.evolution.allowdivergence=no |
408 abort: folding obsolete revisions may cause divergence | 408 abort: fold of 4b34ecfb0d56 creates content-divergence with fcfd42a7fa46 |
409 (set experimental.evolution.allowdivergence=yes to allow folding them) | 409 (add --verbose for details or see 'hg help evolution.instability') |
410 [255] | 410 [255] |
411 | 411 |
412 but if we allow divergence, this should work and should create new content-divergent changesets | 412 but if we allow divergence, this should work and should create new content-divergent changesets |
413 | 413 |
414 $ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ | 414 $ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \ |