Mercurial > hg > evolve
changeset 2881:b5a48e4aeec6
precheck: handle rewrite attempt of nullrev
This is a common breaking case, so we handle and test it in the generic code.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 24 Jul 2017 01:45:03 +0200 |
parents | d17d193c4145 |
children | ae690d39fc92 |
files | hgext3rd/evolve/rewriteutil.py tests/test-fold.t |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/rewriteutil.py +++ b/hgext3rd/evolve/rewriteutil.py @@ -60,6 +60,10 @@ <action> can be used to control the commit message. """ + if node.nullrev in revs: + msg = _("cannot %s the null revision") % (action) + hint = _("no changeset checked out") + raise error.Abort(msg, hint=hint) publicrevs = repo.revs('%ld and public()', revs) if publicrevs: summary = _formatrevs(repo, publicrevs)