hgext/evolve.py
changeset 466 b98490b689a5
parent 465 4a039a8c1cf3
child 468 6b1b6d338478
--- a/hgext/evolve.py	Mon Aug 20 14:13:29 2012 +0200
+++ b/hgext/evolve.py	Mon Aug 20 14:40:48 2012 +0200
@@ -272,13 +272,17 @@
         obs = orig.parents()[1]
     assert obs.obsolete()
     newer = obsolete.newerversion(repo, obs.node())
+    # search of a parent which is not killed
+    while newer == [()]:
+        ui.debug("stabilize target %s is plain dead,"
+                 " trying to stabilize on it's parent")
+        obs = obs.parents()[0]
+        newer = obsolete.newerversion(repo, obs.node())
     if len(newer) > 1:
         ui.write_err(_("conflict rewriting. can't choose destination\n"))
         return 2
     targets = newer[0]
-    if not targets:
-        ui.write_err(_("does not handle kill parent yet\n"))
-        return 2
+    assert targets
     if len(targets) > 1:
         ui.write_err(_("does not handle splitted parent yet\n"))
         return 2