equal
deleted
inserted
replaced
438 if not dest: |
438 if not dest: |
439 # Destination defaults to the latest revision in the current branch |
439 # Destination defaults to the latest revision in the current branch |
440 branch = repo[None].branch() |
440 branch = repo[None].branch() |
441 dest = repo[branch].rev() |
441 dest = repo[branch].rev() |
442 else: |
442 else: |
443 if 'qtip' in repo.tags() and (repo[dest].hex() in |
|
444 [s.rev for s in repo.mq.applied]): |
|
445 raise util.Abort(_('cannot rebase onto an applied mq patch')) |
|
446 dest = repo[dest].rev() |
443 dest = repo[dest].rev() |
|
444 |
|
445 # This check isn't strictly necessary, since mq detects commits over an |
|
446 # applied patch. But it prevents messing up the working directory when |
|
447 # a partially completed rebase is blocked by mq. |
|
448 if 'qtip' in repo.tags() and (repo[dest].hex() in |
|
449 [s.rev for s in repo.mq.applied]): |
|
450 raise util.Abort(_('cannot rebase onto an applied mq patch')) |
447 |
451 |
448 if src: |
452 if src: |
449 commonbase = repo[src].ancestor(repo[dest]) |
453 commonbase = repo[src].ancestor(repo[dest]) |
450 if commonbase == repo[src]: |
454 if commonbase == repo[src]: |
451 raise util.Abort(_('source is ancestor of destination')) |
455 raise util.Abort(_('source is ancestor of destination')) |