--- 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):