[darcs-devel] [issue1357] wish: "chunky" representation for hunks

Eric Kow bugs at darcs.net
Fri Feb 19 16:38:59 UTC 2010


Eric Kow <kowey at darcs.net> added the comment:

On Fri, Feb 19, 2010 at 16:10:06 +0000, Jason Dagit wrote:
> My HunkHandles are a record that stores a filename, an offset and a
> length.  They can be used to read in a hunk patch after an initial scan
> over a patch bundle to calculate the handles.


> I think the two ideas "chunky" rep and HunkHandles have similar goals
> but the work itself is quite different.

Jason graciously explained this to me on IRC.  For tracking purposes:
 - http://irclog.perlgeek.de/darcs/2010-02-19#i_2009373
 - http://lists.osuosl.org/pipermail/darcs-users/2010-January/022760.html

So it seems that there are 4 ideas going on, three of which sort of
get swept up into the chunky-hunk umbrella.

 1. changing the in-memory representation of hunk patches

 2. changing the on-disk representation of hunk patches

 3. radically changing #1/#2 so that hunks just point to hashes of
    contents (Petr's idea)

 4. Lightly changing the in-memory representation so that we avoid
    storing much more than filename/offset in memory.  Let's step
    through these backwards.

    Unlike #3, we do not change the notion of commutation in any
    way; nor we do we change the fact that we still explicitly
    manipulate hunk contents.  No hashes here.

    Unlike #2, we do not modify the on-disk representation of hunk
    patches in any way.  (This should be fairly clear).  Just an
    online behaviour, moving some of our work from memory to disk.

    Unlike #1, we do not change the internal representation of the
    contents.  We still work with a [ByteString] representing a
    list of lines, and not a single ByteString representing a region.

Phew! Maybe HunkHandle needs a ticket of its own.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1357>
__________________________________


More information about the darcs-devel mailing list