Patchwork [6,of,7,evolve-ext] evolve: treat no support as non fatal

login
register
mail settings
Submitter timeless@gcc2-power8.osuosl.org
Date April 14, 2016, 3:05 p.m.
Message ID <afccba390673c1aecc0f.1460646321@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14607/
State Accepted
Headers show

Comments

timeless@gcc2-power8.osuosl.org - April 14, 2016, 3:05 p.m.
# HG changeset patch
# User timeless@gmail.com
# Date 1460646130 0
#      Thu Apr 14 15:02:10 2016 +0000
# Node ID afccba390673c1aecc0f2ac1dabad3b487fc6fe9
# Parent  be067a5d1228c19f22010e0aa537b434a096cbe7
# Available At https://bitbucket.org/timeless/mutable-history/
#              hg pull https://bitbucket.org/timeless/mutable-history/ -r afccba390673
evolve: treat no support as non fatal

When running evolve --all, unhandled edges should not block other
revisions from being solved.

Patch

diff -r be067a5d1228 -r afccba390673 hgext/evolve.py
--- a/hgext/evolve.py	Thu Apr 14 03:42:48 2016 +0000
+++ b/hgext/evolve.py	Thu Apr 14 15:02:10 2016 +0000
@@ -1879,10 +1879,12 @@ 
         if not pctx.obsolete():
             pctx = orig.p2()  # second parent is obsolete ?
         elif orig.p2().obsolete():
-            raise error.Abort(_("no support for evolving merge changesets "
-                                "with two obsolete parents yet"),
-                              hint=_("Redo the merge and use `hg prune <old> "
-                                   "--succ <new>` to obsolete the old one"))
+            hint = _("Redo the merge and use `hg prune <old> "
+                     "--succ <new>` to obsolete the old one")
+            ui.warn(_("warning: no support for evolving merge changesets "
+                      "with two obsolete parents yet\n") +
+                    _("(%s)\n") % hint)
+            return False
 
     if not pctx.obsolete():
         ui.warn(_("cannot solve instability of %s, skipping\n") % orig)
diff -r be067a5d1228 -r afccba390673 tests/test-unstable.t
--- a/tests/test-unstable.t	Thu Apr 14 03:42:48 2016 +0000
+++ b/tests/test-unstable.t	Thu Apr 14 15:02:10 2016 +0000
@@ -154,9 +154,8 @@ 
   
 
   $ hg evo --all --any --unstable
-  abort: no support for evolving merge changesets with two obsolete parents yet
+  warning: no support for evolving merge changesets with two obsolete parents yet
   (Redo the merge and use `hg prune <old> --succ <new>` to obsolete the old one)
-  [255]
   $ hg log -G
   @  5:2db39fda7e2f@default(draft) cprime
   |