diff -r 181cbb23572e -r c2e1e637d4da hgext/rebase.py --- a/hgext/rebase.py Fri Mar 05 17:38:02 2010 -0500 +++ b/hgext/rebase.py Tue Mar 02 15:08:43 2010 -0500 @@ -440,11 +440,15 @@ branch = repo[None].branch() dest = repo[branch].rev() else: - if 'qtip' in repo.tags() and (repo[dest].hex() in - [s.rev for s in repo.mq.applied]): - raise util.Abort(_('cannot rebase onto an applied mq patch')) dest = repo[dest].rev() + # This check isn't strictly necessary, since mq detects commits over an + # applied patch. But it prevents messing up the working directory when + # a partially completed rebase is blocked by mq. + if 'qtip' in repo.tags() and (repo[dest].hex() in + [s.rev for s in repo.mq.applied]): + raise util.Abort(_('cannot rebase onto an applied mq patch')) + if src: commonbase = repo[src].ancestor(repo[dest]) if commonbase == repo[src]: