[darcs-users] Rebase [was: My current work on darcs]

Benjamin Franksen ben.franksen at online.de
Wed Sep 27 15:02:40 UTC 2017


On 09/08/2017 01:58 PM, Ben Franksen wrote:
> The rebase patch (that contains the suspended patches and the fixups) is
> currently mixed in with normal patches, so it can and will be commuted
> with them. This leads to a number of problems:
> 
>  * Normal patches and the rebase patch need to be made compatible by
> wrapping both in the WrappedNamed type. This is ugly and complicates the
> type hierarchy for patches.
> 
> * We have to make sure the rebase patch always gets commuted back to the
> end before we write changes to disk. This affects all commands that can
> modify the recorded state.
> 
> * The standard patch commutation interfaces aren't aware of the fact
> that there should only ever be a single rebase patch, so implementing
> them leads to "impossible" cases.

Another problem caused by this is that we currently do not allow to
transfer (push/pull) patches from a repo where a rebase is in progress
to another repo. At least for the case of pulling from a rebasing repo,
there is a good reason for that: we would (have to) pull the rebase
patch along with the others, since it may not be at the end. Then we
must commute it to the end (locally, because we never directly mutate
patches in a remote repo), then drop it, and then go on to merge the
remaining patches with our own. This can be done, of course, but it
seems pointless, to invest the effort to get this right, instead of
fixing the underlying problem, after which this would just work and the
limitation could be lifted without having to add any extra code.

> There is also some fairly elaborated type machinery at work to
> distinguish repos with and without a rebase in progress.

And this, by the way, further complicates things: we'd now have two
patch lists wich may not be compatible, since the 'rt' type parameter
does not match. And what if we also have a rebase locally? It is a
different rebase, of course, and we must avoid to mix both rebase
patches, else things go seriously wrong. Unfortunately, the type
machinery, elaborate as it is, cannot tell the difference between the
two, so it does not help us to avoid such a mistake.

Cheers
Ben



More information about the darcs-users mailing list