diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -381,9 +381,9 @@ def buildstate(repo, dest, src, base, co if src: commonbase = repo[src].ancestor(repo[dest]) if commonbase == repo[src]: - raise util.Abort(_('cannot rebase an ancestor')) + raise util.Abort(_('source is ancestor of destination')) if commonbase == repo[dest]: - raise util.Abort(_('cannot rebase a descendant')) + raise util.Abort(_('source is descendant of destination')) source = repo[src].rev() else: if base: @@ -392,12 +392,12 @@ def buildstate(repo, dest, src, base, co cwd = repo['.'].rev() if cwd == dest: - repo.ui.debug('already working on current\n') + repo.ui.debug('source and destination are the same\n') return None targetancestors = set(repo.changelog.ancestors(dest)) if cwd in targetancestors: - repo.ui.debug('already working on the current branch\n') + repo.ui.debug('source is ancestor of destination\n') return None cwdancestors = set(repo.changelog.ancestors(cwd)) diff --git a/tests/test-rebase-scenario-global.out b/tests/test-rebase-scenario-global.out --- a/tests/test-rebase-scenario-global.out +++ b/tests/test-rebase-scenario-global.out @@ -129,8 +129,8 @@ o 0: A % These will fail % E onto D - rebase onto an ancestor -abort: cannot rebase a descendant +abort: source is descendant of destination % D onto E - rebase onto a descendant -abort: cannot rebase an ancestor +abort: source is ancestor of destination % E onto B - merge revision with both parents not in ancestors of target abort: cannot use revision 4 as base, result would have 3 parents