rebase: make sure the newancestor is used during the whole update
(issue1561)
Before this change, newancestor was used only once as a replacement
for ancestor.ancestor, but merge.update calls ancestor.ancestor
several times, so it ends up with the "wrong" ancestor (the real
ancestor, but we want the parent of the rebased changeset for all but
the first rebased changeset).
Added a new test case for this: test-rebase-newancestor.
Also, in one scenario in test-rebase-collapse, there was a spurious
conflict caused by the same issue, so that test case was fixed by
removing the now unneeded conflict resolution and the output was
adapted accordingly.
% - Rebasing B onto E - check keep
@ 5:F:notdefault
|
| o 4:E:
| |
| o 3:D:
|/
| o 2:C:
| |
| o 1:B:
|/
o 0:A:
merging A
warning: conflicts during merge.
merging A failed!
abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
% - Solve the conflict and go on
rebase completed
@ 7:C:
|
o 6:B:
|
| o 5:F:notdefault
| |
o | 4:E:
| |
o | 3:D:
|/
| o 2:C:
| |
| o 1:B:
|/
o 0:A:
% - Rebase F onto E - check keepbranches
@ 5:F:notdefault
|
| o 4:E:
| |
| o 3:D:
|/
| o 2:C:
| |
| o 1:B:
|/
o 0:A:
merging A
warning: conflicts during merge.
merging A failed!
abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
% - Solve the conflict and go on
saving bundle to
adding branch
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
rebase completed
@ 5:F:notdefault
|
o 4:E:
|
o 3:D:
|
| o 2:C:
| |
| o 1:B:
|/
o 0:A: