evolve: clarify message for ambiguous destination from split
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 19 Mar 2018 12:01:07 +0100
changeset 3542 7bd516e0a929
parent 3541 bc47c09c9782
child 3543 93deeed63908
evolve: clarify message for ambiguous destination from split Message is a bit long, but should be less scary.
hgext3rd/evolve/evolvecmd.py
tests/test-evolve-orphan-split.t
--- a/hgext3rd/evolve/evolvecmd.py	Wed Mar 14 18:24:22 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Mar 19 12:01:07 2018 +0100
@@ -132,7 +132,9 @@
             selectedrev = utility.revselectionprompt(ui, repo, list(heads),
                                                      cheader)
             if selectedrev is None:
-                msg = "cannot solve split across two branches\n"
+                msg = ("could solve instability, "
+                        "ambiguous destination: "
+                        "parent split across two branches\n")
                 ui.write_err(msg)
                 return (False, '')
             target = repo[selectedrev]
--- a/tests/test-evolve-orphan-split.t	Wed Mar 14 18:24:22 2018 +0530
+++ b/tests/test-evolve-orphan-split.t	Mon Mar 19 12:01:07 2018 +0100
@@ -220,7 +220,7 @@
   q: quit the prompt
   enter the index of the revision you want to select: foo
   invalid value 'foo' entered for index
-  cannot solve split across two branches
+  could solve instability, ambiguous destination: parent split across two branches
 
   $ hg evolve --all <<EOF
   > 4
@@ -232,7 +232,7 @@
   q: quit the prompt
   enter the index of the revision you want to select: 4
   invalid value '4' entered for index
-  cannot solve split across two branches
+  could solve instability, ambiguous destination: parent split across two branches
 
   $ hg evolve --all <<EOF
   > -1
@@ -244,7 +244,7 @@
   q: quit the prompt
   enter the index of the revision you want to select: -1
   invalid value '-1' entered for index
-  cannot solve split across two branches
+  could solve instability, ambiguous destination: parent split across two branches
 
   $ hg evolve --all <<EOF
   > q
@@ -255,7 +255,7 @@
   1: [7f87764e5b64] added a b c
   q: quit the prompt
   enter the index of the revision you want to select: q
-  cannot solve split across two branches
+  could solve instability, ambiguous destination: parent split across two branches
 
 Doing the evolve with the interactive prompt