# HG changeset patch # User Pierre-Yves David # Date 1500831449 -7200 # Node ID 78b0c605313945685980a44da3e33b330711401d # Parent 58e4b51ee9029c527a19af1b5e8d677d66b90ac9 precheck: also check for unstability creation diff -r 58e4b51ee902 -r 78b0c6053139 hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Mon Jul 24 03:04:20 2017 +0200 +++ b/hgext3rd/evolve/rewriteutil.py Sun Jul 23 19:37:29 2017 +0200 @@ -66,6 +66,11 @@ msg = _("cannot %s public changesets: %s") % (action, summary) hint = _("see 'hg help phases' for details") raise error.Abort(msg, hint=hint) + newunstable = disallowednewunstable(repo, revs) + if newunstable: + msg = _("cannot fold chain not ending with a head or with branching") + hint = _("new unstable changesets are not allowed") + raise error.Abort(msg, hint=hint) def bookmarksupdater(repo, oldid, tr): """Return a callable update(newid) updating the current bookmark @@ -103,10 +108,6 @@ raise error.Abort(_("cannot fold non-linear revisions " "(multiple heads given)")) head = repo[heads.first()] - if disallowednewunstable(repo, revs): - msg = _("cannot fold chain not ending with a head or with branching") - hint = _("new unstable changesets are not allowed") - raise error.Abort(msg, hint=hint) return root, head def deletebookmark(repo, repomarks, bookmarks):