Skip to content
Snippets Groups Projects
Commit b91960aed018 authored by Sune Foldager's avatar Sune Foldager
Browse files

rebase: improve error and debug messages

parent c156bf947e26
No related branches found
No related tags found
No related merge requests found
......@@ -381,5 +381,5 @@
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]:
......@@ -385,5 +385,5 @@
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,8 +392,8 @@
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:
......@@ -396,8 +396,8 @@
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))
......
......@@ -129,5 +129,5 @@
% 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
......@@ -133,4 +133,4 @@
% 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment