hgext/rebase.py
changeset 9578 341182ac95e4
parent 9577 b91960aed018
child 9599 f3404b7f37ca
--- a/hgext/rebase.py	Thu Oct 08 10:07:41 2009 +0200
+++ b/hgext/rebase.py	Thu Oct 08 10:39:43 2009 +0200
@@ -401,6 +401,10 @@
             return None
 
         cwdancestors = set(repo.changelog.ancestors(cwd))
+        if dest in cwdancestors:
+            repo.ui.debug('source is descendant of destination\n')
+            return None
+
         cwdancestors.add(cwd)
         rebasingbranch = cwdancestors - targetancestors
         source = min(rebasingbranch)