On Tue, Nov 12, 2013 at 01:50:25PM +0100, Tommy Pettersson wrote:

||  On Fri, Nov 08, 2013 at 08:12:29AM +0100, Gian Piero Carrubba wrote:
||  > While reading Darcs Using/Model[0], I noticed the following:
||  > 
||  >      We’ve been asked before why it’s important for adjacent hunks to 
||  >      depend on each other. TODO: do we know why? David said so once in 
||  >      person, but I didn’t understand it at the time – EYK
||  > 
||  > It would be great if someone knowing the answer could modify the page 
||  > writing down the explanation.
||  
||  It's hard to explain in an easy way, so here goes an example.
||  
||  If adjacent hunks were allowed to commute, we could do this:
||  
||  1. Clone a repo a number of times.
||  
||  2. Create a set of adjacent hunks in the first repo.
||  
||  3. Pull a different one of these adjacent hunks to each of the
||     cloned repos.
||  
||  Now, each of these pulled hunks will start at the same line
||  number.

My two amateur cents: only if they do not remove any lines.

||          If we try to pull them together in yet another clone of
||  the original repo, the first hunk we pull will go to this line
||  number. But what about the second hunk? It wants to go to the
||  same line nuber, and it knows nothing about the hunk that is
||  already there. Should we put it before or after?

Suppose hunk A replaces lines [A1:A2), and hunk B replaces lines [A2:A3).

These hunks are adjacent. However, their relative order in the file is
undetermined only if A1 = A2 = A3. So only hunks that remove no lines
must be ordered by a dependency (and conflict if they don't have one).

For symmetry reasons I suspect it may be necessary that the same may
hold for hunks that only remove lines, but I haven't thought this
through thoroughly.

Anyway... I'm afraid the question still stands.

Vincent.
-- 
Vincent Zweije <[email protected]>   | "If you're flamed in a group you
<http://www.xs4all.nl/~zweije/>      | don't read, does anybody get burnt?"
[Xhost should be taken out and shot] |            -- Paul Tomblin on a.s.r.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to