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

Ben Franksen ben.franksen at online.de
Fri Feb 16 00:46:16 UTC 2018


Am 15.02.2018 um 07:48 schrieb Ganesh Sittampalam:
> On 14/02/2018 23:34, Ben Franksen wrote:
> 
>> If we had primitive "hunk move" patches we could avoid conflicts in many
>> cases.
> 
> I'd love to have this, and spent a while thinking about it some years
> ago. I think the commute rules will be quite tricky to get right, as
> there are lots of cases, e.g. overlaps between either source or
> destination of the move. Getting the boundary conditions (do touching
> patches commute or not) is also quite tricky even for hunk patches, but
> we can err on the side of being conservative.
> 
> The way I was thinking about the commute rules before was to break the
> move down into a "cut" and a "paste" operation - I don't think those
> should be actual primitive patch types, but it helps to think about them
> that way when working out the rules.
> 
> I think we'd definitely want moving between files as you mention, that
> means you can really express code refactorings properly.

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?

Cheers
Ben



More information about the darcs-devel mailing list