hgext/evolve.py
changeset 760 bbb3a0e1dfea
parent 757 0ff862dcddbd
child 762 942aabaa8a8e
--- a/hgext/evolve.py	Tue Jan 07 17:03:36 2014 -0800
+++ b/hgext/evolve.py	Tue Jan 07 15:52:47 2014 -0800
@@ -1140,14 +1140,37 @@
 def _solvedivergent(ui, repo, divergent, dryrun=False):
     base, others = divergentdata(divergent)
     if len(others) > 1:
-        raise util.Abort("We do not handle split yet")
+        othersstr = "[%s]" % (','.join([str(i) for i in others]))
+        hint = ("changeset %d is divergent with a changeset that got splitted "
+                "| into multiple ones:\n[%s]\n"
+                "| This is not handled by automatic evolution yet\n"
+                "| You have to fallback to manual handling with commands as:\n"
+                "| - hg touch -D\n"
+                "| - hg prune\n"
+                "| \n"
+                "| You should contact your local evolution Guru for help.\n"
+                % (divergent, othersstr))
+        raise util.Abort("We do not handle divergence with split yet",
+                         hint='')
     other = others[0]
     if divergent.phase() <= phases.public:
-        raise util.Abort("We can't resolve this conflict from the public side")
+        raise util.Abort("We can't resolve this conflict from the public side",
+                         hint="%s is public, try from %s" % (divergent, other))
     if len(other.parents()) > 1:
-        raise util.Abort("divergent changeset can't be a merge (yet)")
+        raise util.Abort("divergent changeset can't be a merge (yet)",
+                          hint="You have to fallback to solving this by hand...\n"
+                               "| This probably mean to redo the merge and use "
+                               "| `hg prune` to kill older version.")
     if other.p1() not in divergent.parents():
-        raise util.Abort("parents are not common (not handled yet)")
+        raise util.Abort("parents are not common (not handled yet)",
+                         hint="| %(d)s, %(o)s are not based on the same changeset."
+                              "| With the current state of its implementation, "
+                              "| evolve does not work in that case.\n"
+                              "| rebase one of them next to the other and run "
+                              "| this command again.\n"
+                              "| - either: hg rebase -dest 'p1(%(d)s)' -r %(o)s"
+                              "| - or:     hg rebase -dest 'p1(%(d)s)' -r %(o)s"
+                              % {'d': divergent, 'o': other})
 
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
     ui.status(_('merge:'))