[darcs-users] Doubts about commuteFilepatches

Eric Kow kowey at darcs.net
Mon Nov 22 11:00:08 UTC 2010


On Wed, Nov 17, 2010 at 16:32:54 +0000, Iago Abal wrote:
> Question 1: Darcs diff could generate non-sensible hunks? That will be a
> bug, I think.

It might not come from the differ.  I wonder what else might generate
hunks. Could this somehow result from operations like patch coalescing,
or maybe generating the primitives used during conflict marking?  There
may be other sources still.

> Let me call Hunk f l [] [] "stupid-hunk": A stupid-hunk h is almost
> equivalent to the Identity patch (but it requires h.file to exist, and line
> h.line to be in "in bounds"). I think could be easily proved that a
> stupid-hunk will always commute with another Hunk.

Well I can see that the stupid hunks always commute past. I guess I'm
vaguely concerned that there's some sort of patch theory property that
gets violated by these odd indices, or that one day we'll be trying to
apply a stupid hunk to line 42 of a now 10 line file.  Sure we could
catch the stupid hunk case and systematically no-op (need to check if
we do), but it does look weird.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:kowey at jabber.fr (Jabber or Google Talk only)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20101122/cbf34b9d/attachment.pgp>


More information about the darcs-users mailing list