In discussing this with Jelmer on IRC, it seems that when rebase is trying to re-apply the merge, it is re-applying something that is already in the ancestry. For example:
A
|\
B C
|\|
D E
|
F
If you rebase "F" on top of "D", then you get something like:
A
|
B
|\
D |
| |
C'|
|/
E'
|
F'
And it is a little weird to merge B into a descendent of itself. So what you
should really get is:
A
|
B
|
D
|
C'
|
F'
On the other hand if you have:
A-.
|\ \
B C D
| |/
E F
And you rebase 'F' onto 'E', then you *should* get:
A
|\
B D
| |
E |
| |
C'|
|/
F'
So I think when rebase comes to a node which is a merge, it should check if all
merged revisions are already present. If so, then it should just skip that
node, and move to the next. Otherwise do the same cherry-pick merge, of the
changes against the primary parent, and mark the merged revision id.
In discussing this with Jelmer on IRC, it seems that when rebase is trying to re-apply the merge, it is re-applying something that is already in the ancestry. For example:
A
|\
B C
|\|
D E
|
F
If you rebase "F" on top of "D", then you get something like:
A
|
B
|\
D |
| |
C'|
|/
E'
|
F'
And it is a little weird to merge B into a descendent of itself. So what you
should really get is:
A
|
B
|
D
|
C'
|
F'
On the other hand if you have:
A-.
|\ \
B C D
| |/
E F
And you rebase 'F' onto 'E', then you *should* get:
A
|\
B D
| |
E |
| |
C'|
|/
F'
So I think when rebase comes to a node which is a merge, it should check if all
merged revisions are already present. If so, then it should just skip that
node, and move to the next. Otherwise do the same cherry-pick merge, of the
changes against the primary parent, and mark the merged revision id.