hgext/evolve.py
changeset 1738 cb5edd4b160c
parent 1736 c9a79b432907
child 1743 299cdaa24fa5
--- a/hgext/evolve.py	Thu Sep 22 09:15:30 2016 -0700
+++ b/hgext/evolve.py	Sat Oct 08 15:49:12 2016 +0200
@@ -2932,11 +2932,12 @@
             else:
                 ui.status(_("no more change to split\n"))
 
-        tip = repo[newcommits[-1]]
-        bmupdate(tip.node())
-        if bookactive is not None:
-            bmactivate(repo, bookactive)
-        obsolete.createmarkers(repo, [(repo[r], newcommits)])
+        if newcommits:
+            tip = repo[newcommits[-1]]
+            bmupdate(tip.node())
+            if bookactive is not None:
+                bmactivate(repo, bookactive)
+            obsolete.createmarkers(repo, [(repo[r], newcommits)])
         tr.close()
     finally:
         lockmod.release(tr, lock, wlock)