precheck: point to the instability doc when aborting
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 23 Jul 2017 19:53:51 +0200
changeset 2783 3e9c3119410a
parent 2782 2bd0b0996cfb
child 2784 d17d193c4145
precheck: point to the instability doc when aborting This will help user to understand what is going on.
hgext3rd/evolve/rewriteutil.py
tests/test-fold.t
tests/test-metaedit.t
--- a/hgext3rd/evolve/rewriteutil.py	Sun Jul 23 19:52:06 2017 +0200
+++ b/hgext3rd/evolve/rewriteutil.py	Sun Jul 23 19:53:51 2017 +0200
@@ -69,7 +69,7 @@
     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")
+        hint = _("see 'hg help evolution.instability'")
         raise error.Abort(msg, hint=hint)
 
 def bookmarksupdater(repo, oldid, tr):
--- a/tests/test-fold.t	Sun Jul 23 19:52:06 2017 +0200
+++ b/tests/test-fold.t	Sun Jul 23 19:53:51 2017 +0200
@@ -164,11 +164,11 @@
   > EOF
   $ hg fold --from 'desc("r4")'
   abort: cannot fold chain not ending with a head or with branching
-  (new unstable changesets are not allowed)
+  (see 'hg help evolution.instability')
   [255]
   $ hg fold --from 'desc("r3")::desc("r11")'
   abort: cannot fold chain not ending with a head or with branching
-  (new unstable changesets are not allowed)
+  (see 'hg help evolution.instability')
   [255]
 
 test --user variant
--- a/tests/test-metaedit.t	Sun Jul 23 19:52:06 2017 +0200
+++ b/tests/test-metaedit.t	Sun Jul 23 19:53:51 2017 +0200
@@ -119,7 +119,7 @@
   [255]
   $ hg metaedit 'desc(A)::desc(B)' --fold --config 'experimental.evolution=createmarkers, allnewcommands'
   abort: cannot fold chain not ending with a head or with branching
-  (new unstable changesets are not allowed)
+  (see 'hg help evolution.instability')
   [255]
   $ hg metaedit --user foobar
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved