--- a/tests/test-fold.t Wed Aug 28 18:30:58 2019 +0700
+++ b/tests/test-fold.t Sat Sep 07 13:03:29 2019 +0700
@@ -254,7 +254,8 @@
Test order of proposed commit message
- $ hg fold --exact --hidden -r 4 -r 5 -r 6
+ $ hg fold --exact --hidden -r 4 -r 5 -r 6 \
+ > --config experimental.evolution.allowdivergence=yes
2 new content-divergent changesets
3 changesets folded
$ hg log -r tip -T '{desc}'
@@ -265,7 +266,8 @@
r6 (no-eol)
- $ hg fold --exact --hidden -r 6 -r 4 -r 5
+ $ hg fold --exact --hidden -r 6 -r 4 -r 5 \
+ > --config experimental.evolution.allowdivergence=yes
3 changesets folded
$ hg log -r tip -T '{desc}'
r4
@@ -399,17 +401,19 @@
1 new orphan changesets
2 changesets folded
-FIXME: fold should abort here because divergence is not allowed
+fold aborts here because divergence is not allowed
$ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \
> --config experimental.evolution.allowdivergence=no
- 2 new content-divergent changesets
- 2 changesets folded
+ abort: folding obsolete revisions may cause divergence
+ (set experimental.evolution.allowdivergence=yes to allow folding them)
+ [255]
but if we allow divergence, this should work and should create new content-divergent changesets
$ hg fold --exact -r 'desc("A")::desc("B")' -m 'second fold' \
> --config experimental.evolution.allowdivergence=yes
+ 2 new content-divergent changesets
2 changesets folded
$ cd ..