diff --git a/mercurial/rewriteutil.py b/mercurial/rewriteutil.py --- a/mercurial/rewriteutil.py +++ b/mercurial/rewriteutil.py @@ -80,7 +80,9 @@ if newunstable: hint = _(b"see 'hg help evolution.instability'") raise error.InputError( - _(b"cannot %s changeset with children") % action, hint=hint + _(b"cannot %s changeset, as that will orphan %d descendants") + % (action, len(newunstable)), + hint=hint, ) if not obsolete.isenabled(repo, obsolete.allowdivergenceopt): diff --git a/tests/test-amend.t b/tests/test-amend.t --- a/tests/test-amend.t +++ b/tests/test-amend.t @@ -196,7 +196,7 @@ $ hg update -q B $ echo 2 >> B $ hg amend - abort: cannot amend changeset with children + abort: cannot amend changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') [10] diff --git a/tests/test-branch-change.t b/tests/test-branch-change.t --- a/tests/test-branch-change.t +++ b/tests/test-branch-change.t @@ -57,7 +57,7 @@ Change in middle of the stack (linear commits) $ hg branch -r 1::3 foo - abort: cannot change branch of changeset with children + abort: cannot change branch of changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') [10] @@ -129,7 +129,7 @@ Changing on a branch head which is not topological head $ hg branch -r 2 stable - abort: cannot change branch of changeset with children + abort: cannot change branch of changeset, as that will orphan 2 descendants (see 'hg help evolution.instability') [10] diff --git a/tests/test-fix.t b/tests/test-fix.t --- a/tests/test-fix.t +++ b/tests/test-fix.t @@ -1172,7 +1172,7 @@ $ printf "two\n" > foo.whole $ hg commit -m "second" $ hg --config experimental.evolution.allowunstable=False fix -r '.^' - abort: cannot fix changeset with children + abort: cannot fix changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') [10] $ hg fix -r '.^' diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -549,7 +549,7 @@ o 0: f447d5abf5ea 'add' $ hg rebase --collapse -r 1 -d 0 - abort: cannot rebase changeset with children + abort: cannot rebase changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') [10] diff --git a/tests/test-rebase-scenario-global.t b/tests/test-rebase-scenario-global.t --- a/tests/test-rebase-scenario-global.t +++ b/tests/test-rebase-scenario-global.t @@ -452,7 +452,7 @@ $ hg clone -q -u . ah ah1 $ cd ah1 $ hg rebase -r '2::8' -d 1 - abort: cannot rebase changeset with children + abort: cannot rebase changeset, as that will orphan 2 descendants (see 'hg help evolution.instability') [10] $ hg rebase -r '2::8' -d 1 -k @@ -498,7 +498,7 @@ $ hg clone -q -u . ah ah2 $ cd ah2 $ hg rebase -r '3::8' -d 1 - abort: cannot rebase changeset with children + abort: cannot rebase changeset, as that will orphan 2 descendants (see 'hg help evolution.instability') [10] $ hg rebase -r '3::8' -d 1 --keep @@ -541,7 +541,7 @@ $ hg clone -q -u . ah ah3 $ cd ah3 $ hg rebase -r '3::7' -d 1 - abort: cannot rebase changeset with children + abort: cannot rebase changeset, as that will orphan 3 descendants (see 'hg help evolution.instability') [10] $ hg rebase -r '3::7' -d 1 --keep @@ -581,7 +581,7 @@ $ hg clone -q -u . ah ah4 $ cd ah4 $ hg rebase -r '3::(7+5)' -d 1 - abort: cannot rebase changeset with children + abort: cannot rebase changeset, as that will orphan 1 descendants (see 'hg help evolution.instability') [10] $ hg rebase -r '3::(7+5)' -d 1 --keep diff --git a/tests/test-split.t b/tests/test-split.t --- a/tests/test-split.t +++ b/tests/test-split.t @@ -466,7 +466,7 @@ $ cd $TESTTMP/d #if obsstore-off $ runsplit -r 1 --no-rebase - abort: cannot split changeset with children + abort: cannot split changeset, as that will orphan 3 descendants (see 'hg help evolution.instability') [10] #else @@ -518,7 +518,7 @@ $ eval `hg tags -T '{tag}={node}\n'` $ rm .hg/localtags $ hg split $B --config experimental.evolution=createmarkers - abort: cannot split changeset with children + abort: cannot split changeset, as that will orphan 4 descendants (see 'hg help evolution.instability') [10] $ cat > $TESTTMP/messages <