Ganesh, you said
> indeed "deep amend-record" is initially how I thought about rebase
It occurred to me that another way to implement "deep amend" would be to
commute unrecorded changes backward until we hit the patch we want to
amend. If a commute fails, we merge i.e. force-commute, creating
conflicts on the way. Have you thought about that?
Apropos, I would really like to able to do force-commutes explicitly
with a command.
For those who are not so familiar with patch theory: the merge operation
takes two patches a:X->A and b:X->B with the same start context X and
creates two patches b':A->Y and a':B->Y that end in a common context Y
and each start where the other (unprimed version) ended. This always
"succeeds" since we have added Conflictors or Mergers to the set of
primitive patches just so that it does. Now, take another pair a:X->A,
b:A->Y of patches we want to commute. We merge a⁻¹:A->X with b:A->Y,
giving us a new context B with (a⁻¹)':Y->B and b':X->B. Then we can
define a'=((a⁻¹)')⁻¹:B->Y and thus (a,b) commutes to (b',a'), which is
what I mean with force-commute.
|