hgext3rd/evolve/rewriteutil.py
changeset 5234 ea3f9e171b9a
parent 5233 efd1aa8c313c
child 5236 6c0797ec50b6
--- a/hgext3rd/evolve/rewriteutil.py	Sun Nov 10 16:32:34 2019 +0530
+++ b/hgext3rd/evolve/rewriteutil.py	Sat Dec 14 13:31:45 2019 +0530
@@ -73,8 +73,10 @@
         raise error.Abort(msg, hint=hint)
     newunstable = disallowednewunstable(repo, revs)
     if newunstable:
-        msg = _(b"%s will orphan %i descendants")
-        msg %= (action, len(newunstable))
+        msg = _(b"performing '%s' in the middle of a stack will orphan %s")
+        if len(newunstable) > 1:
+            msg += (b" and its %d descendants") % (len(newunstable) - 1)
+        msg %= (action, repo[newunstable.first()])
         hint = _(b"see 'hg help evolution.instability'")
         raise error.Abort(msg, hint=hint)
     divrisk = revs_hascontentdivrisk(repo, revs)