On Mon, Nov 22, 2010 at 11:00 AM, Eric Kow <ko...@darcs.net> wrote: > 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. > > If so, it seems like a quick&dirty fix (instead of fix what produces stupid-hunks just check for them in commute). Would be interesting to know what was the comment of the author when s/he record that patch.
> > 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. > Are you worried because this stupid-hunks are created (e.g. by colesce) with invalid line numbers? Or are you worried because the use of commute could lead to invalid (out of range) line numbers? > > -- > Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> > For a faster response, try +44 (0)1273 64 2905 or > xmpp:ko...@jabber.fr <xmpp%3ako...@jabber.fr> (Jabber or Google Talk only) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkzqTTgACgkQBUrOwgisBPmqyQCfS8pIScKLjKWdtspSyCwQelh/ > GugAoLdbdfzpcqF69eClzasBRNE6vhBl > =EPDz > -----END PGP SIGNATURE----- > > -- Iago Abal Rivas
_______________________________________________ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users