Mercurial > public > mercurial-scm > hg-stable
diff mercurial/rewriteutil.py @ 47087:d90f6237b3aa
rewriteutil: say how many commits would become orphan if commit is rewritten
This copies the message from the evolve extension, but modifies it a
bit to work with the grammar (in particular with the use of "change
branch of" as `action`). I don't know why it doesn't use the same
`_formatrevs()` as for public commmits.
Differential Revision: https://phab.mercurial-scm.org/D10671
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 04 May 2021 10:49:32 -0700 |
parents | 5b6dd0d9171b |
children | 055f7b9f2307 |
line wrap: on
line diff
--- a/mercurial/rewriteutil.py Tue May 04 10:16:34 2021 -0700 +++ b/mercurial/rewriteutil.py Tue May 04 10:49:32 2021 -0700 @@ -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):