hgext/rebase.py
changeset 20597 9155257e6330
parent 20546 bf1d91ab1efb
child 20773 efbf15979538
--- a/hgext/rebase.py	Thu Feb 27 19:56:36 2014 -0800
+++ b/hgext/rebase.py	Fri Feb 14 00:34:20 2014 +0100
@@ -516,6 +516,12 @@
             if state.get(p.rev()) == repo[p1].rev():
                 base = p.node()
                 break
+        else: # fallback when base not found
+            base = None
+
+            # Raise because this function is called wrong (see issue 4106)
+            raise AssertionError('no base found to rebase on '
+                                 '(rebasenode called wrong)')
     if base is not None:
         repo.ui.debug("   detach base %d:%s\n" % (repo[base].rev(), repo[base]))
     # When collapsing in-place, the parent is the common ancestor, we