[darcs-devel] hunk moves as a new kind of prim patch

Ganesh Sittampalam ganesh at earth.li
Fri Feb 16 06:42:19 UTC 2018


On 16/02/2018 00:46, Ben Franksen wrote:

> My enthusiasm has been dampened a bit when I discovered that allowing
> more things too commute leads to crashes for older darcs versions. I
> fear this is going to be the case when we add HunkMoves, too. Can we
> make darcs more robust against future changes, so that it more
> gracefully exits in such cases?

Unfortunately I don't think we can ever make changes to commute
behaviour, even relaxing it, without going through a repository format
change.

Darcs' entire theory/logic is based on the idea that the same set of
patches produces the same results in every repository everywhere. If you
relax commutation, and hence merging, suddenly two patches can produce a
conflict in one version of darcs and not in another. And then what
happens to the conflict resolution patch that someone recorded in the
former version, or vice versa to the patch they recorded in the latter
version assuming there was no conflict?

Maybe we could introduce hunk moves without a format change, as
presumably a newer darcs would just fail to parse them rather than
producing incompatible patches, but I don't think it's a good idea given
we have the format mechanism for explicitly signalling these things.

Ganesh


More information about the darcs-devel mailing list