Mercurial > evolve
changeset 2784:d17d193c4145
precheck: update the orphan message to something me generic
This will help to reuse it for other commands.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 23 Jul 2017 19:45:28 +0200 |
parents | 3e9c3119410a |
children | b5a48e4aeec6 |
files | hgext3rd/evolve/rewriteutil.py tests/test-fold.t tests/test-metaedit.t |
diffstat | 3 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/rewriteutil.py Sun Jul 23 19:53:51 2017 +0200 +++ b/hgext3rd/evolve/rewriteutil.py Sun Jul 23 19:45:28 2017 +0200 @@ -68,7 +68,8 @@ raise error.Abort(msg, hint=hint) newunstable = disallowednewunstable(repo, revs) if newunstable: - msg = _("cannot fold chain not ending with a head or with branching") + msg = _("%s will orphan %i descendants") + msg %= (action, len(newunstable)) hint = _("see 'hg help evolution.instability'") raise error.Abort(msg, hint=hint)
--- a/tests/test-fold.t Sun Jul 23 19:53:51 2017 +0200 +++ b/tests/test-fold.t Sun Jul 23 19:45:28 2017 +0200 @@ -163,11 +163,11 @@ > evolution = createmarkers, allnewcommands > EOF $ hg fold --from 'desc("r4")' - abort: cannot fold chain not ending with a head or with branching + abort: fold will orphan 1 descendants (see 'hg help evolution.instability') [255] $ hg fold --from 'desc("r3")::desc("r11")' - abort: cannot fold chain not ending with a head or with branching + abort: fold will orphan 1 descendants (see 'hg help evolution.instability') [255]
--- a/tests/test-metaedit.t Sun Jul 23 19:53:51 2017 +0200 +++ b/tests/test-metaedit.t Sun Jul 23 19:45:28 2017 +0200 @@ -118,7 +118,7 @@ (587528abfffe will become unstable and new unstable changes are not allowed) [255] $ hg metaedit 'desc(A)::desc(B)' --fold --config 'experimental.evolution=createmarkers, allnewcommands' - abort: cannot fold chain not ending with a head or with branching + abort: fold will orphan 4 descendants (see 'hg help evolution.instability') [255] $ hg metaedit --user foobar