Show More
@@ -401,6 +401,10 b' def buildstate(repo, dest, src, base, co' | |||
|
401 | 401 | return None |
|
402 | 402 | |
|
403 | 403 | cwdancestors = set(repo.changelog.ancestors(cwd)) |
|
404 | if dest in cwdancestors: | |
|
405 | repo.ui.debug('source is descendant of destination\n') | |
|
406 | return None | |
|
407 | ||
|
404 | 408 | cwdancestors.add(cwd) |
|
405 | 409 | rebasingbranch = cwdancestors - targetancestors |
|
406 | 410 | source = min(rebasingbranch) |
@@ -70,7 +70,7 b" echo '% D onto B - E maintains C as pare" | |||
|
70 | 70 | hg rebase -s 3 -d 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
71 | 71 | hg glog --template '{rev}: {desc}\n' |
|
72 | 72 | |
|
73 | echo '% These will fail' | |
|
73 | echo '% These will fail (using --source)' | |
|
74 | 74 | createrepo > /dev/null 2>&1 |
|
75 | 75 | echo '% E onto D - rebase onto an ancestor' |
|
76 | 76 | hg rebase -s 4 -d 3 |
@@ -79,4 +79,13 b' hg rebase -s 3 -d 4' | |||
|
79 | 79 | echo '% E onto B - merge revision with both parents not in ancestors of target' |
|
80 | 80 | hg rebase -s 4 -d 1 |
|
81 | 81 | |
|
82 | echo | |
|
83 | echo '% These will abort gracefully (using --base)' | |
|
84 | echo '% E onto E - rebase onto same changeset' | |
|
85 | hg rebase -b 4 -d 4 | |
|
86 | echo '% E onto D - rebase onto an ancestor' | |
|
87 | hg rebase -b 4 -d 3 | |
|
88 | echo '% D onto E - rebase onto a descendant' | |
|
89 | hg rebase -b 3 -d 4 | |
|
90 | ||
|
82 | 91 | exit 0 |
@@ -127,10 +127,18 b' o | 1: B' | |||
|
127 | 127 | |/ |
|
128 | 128 | o 0: A |
|
129 | 129 | |
|
130 | % These will fail | |
|
130 | % These will fail (using --source) | |
|
131 | 131 | % E onto D - rebase onto an ancestor |
|
132 | 132 | abort: source is descendant of destination |
|
133 | 133 | % D onto E - rebase onto a descendant |
|
134 | 134 | abort: source is ancestor of destination |
|
135 | 135 | % E onto B - merge revision with both parents not in ancestors of target |
|
136 | 136 | abort: cannot use revision 4 as base, result would have 3 parents |
|
137 | ||
|
138 | % These will abort gracefully (using --base) | |
|
139 | % E onto E - rebase onto same changeset | |
|
140 | nothing to rebase | |
|
141 | % E onto D - rebase onto an ancestor | |
|
142 | nothing to rebase | |
|
143 | % D onto E - rebase onto a descendant | |
|
144 | nothing to rebase |
General Comments 0
You need to be logged in to leave comments.
Login now