diff -r b91960aed018 -r 341182ac95e4 hgext/rebase.py --- 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)