diff --git a/mercurial/rewriteutil.py b/mercurial/rewriteutil.py --- a/mercurial/rewriteutil.py +++ b/mercurial/rewriteutil.py @@ -54,7 +54,10 @@ def precheck(repo, revs, action=b'rewrit newunstable = disallowednewunstable(repo, revs) if newunstable: - raise error.InputError(_(b"cannot %s changeset with children") % action) + hint = _(b"see 'hg help evolution.instability'") + raise error.InputError( + _(b"cannot %s changeset with children") % action, hint=hint + ) def disallowednewunstable(repo, revs): diff --git a/tests/test-amend.t b/tests/test-amend.t --- a/tests/test-amend.t +++ b/tests/test-amend.t @@ -197,6 +197,7 @@ Amend in the middle of a stack $ echo 2 >> B $ hg amend abort: cannot amend changeset with children + (see 'hg help evolution.instability') [10] #if obsstore-on 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 @@ -58,6 +58,7 @@ Change in middle of the stack (linear co $ hg branch -r 1::3 foo abort: cannot change branch of changeset with children + (see 'hg help evolution.instability') [10] Change with dirty working directory @@ -129,6 +130,7 @@ Changing on a branch head which is not t $ hg branch -r 2 stable abort: cannot change branch of changeset with children + (see 'hg help evolution.instability') [10] Enabling the allowunstable config and trying to change branch on a branch head diff --git a/tests/test-fix.t b/tests/test-fix.t --- a/tests/test-fix.t +++ b/tests/test-fix.t @@ -1173,6 +1173,7 @@ an orphan. We must respect experimental. $ hg commit -m "second" $ hg --config experimental.evolution.allowunstable=False fix -r '.^' abort: cannot fix changeset with children + (see 'hg help evolution.instability') [10] $ hg fix -r '.^' 1 new orphan changesets 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 @@ -550,7 +550,7 @@ Test collapsing a middle revision in-pla $ hg rebase --collapse -r 1 -d 0 abort: cannot rebase changeset with children - (use --keep to keep original changesets) + (see 'hg help evolution.instability') [10] Test collapsing in place 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 @@ -453,7 +453,7 @@ Source on have two descendant heads but $ cd ah1 $ hg rebase -r '2::8' -d 1 abort: cannot rebase changeset with children - (use --keep to keep original changesets) + (see 'hg help evolution.instability') [10] $ hg rebase -r '2::8' -d 1 -k rebasing 2:c9e50f6cdc55 "C" @@ -499,7 +499,7 @@ Base on have one descendant heads we ask $ cd ah2 $ hg rebase -r '3::8' -d 1 abort: cannot rebase changeset with children - (use --keep to keep original changesets) + (see 'hg help evolution.instability') [10] $ hg rebase -r '3::8' -d 1 --keep rebasing 3:ffd453c31098 "D" @@ -542,7 +542,7 @@ rebase subset $ cd ah3 $ hg rebase -r '3::7' -d 1 abort: cannot rebase changeset with children - (use --keep to keep original changesets) + (see 'hg help evolution.instability') [10] $ hg rebase -r '3::7' -d 1 --keep rebasing 3:ffd453c31098 "D" @@ -582,7 +582,7 @@ rebase subset with multiple head $ cd ah4 $ hg rebase -r '3::(7+5)' -d 1 abort: cannot rebase changeset with children - (use --keep to keep original changesets) + (see 'hg help evolution.instability') [10] $ hg rebase -r '3::(7+5)' -d 1 --keep rebasing 3:ffd453c31098 "D" diff --git a/tests/test-split.t b/tests/test-split.t --- a/tests/test-split.t +++ b/tests/test-split.t @@ -467,6 +467,7 @@ Split a non-head without rebase #if obsstore-off $ runsplit -r 1 --no-rebase abort: cannot split changeset with children + (see 'hg help evolution.instability') [10] #else $ runsplit -r 1 --no-rebase >/dev/null @@ -518,6 +519,7 @@ Split a non-head with obsoleted descenda $ rm .hg/localtags $ hg split $B --config experimental.evolution=createmarkers abort: cannot split changeset with children + (see 'hg help evolution.instability') [10] $ cat > $TESTTMP/messages < Split B diff --git a/tests/test-unamend.t b/tests/test-unamend.t --- a/tests/test-unamend.t +++ b/tests/test-unamend.t @@ -284,6 +284,7 @@ Unamending in middle of a stack $ hg --config experimental.evolution=createmarkers unamend abort: cannot unamend changeset with children + (see 'hg help evolution.instability') [10] $ hg unamend