>> I found some time tonight to start implementing a different format for
>> hunks. Very simple but meant to allow skipping over data.
Cool.
>> hunk <filename> <line#> <#bytes of old content> <#bytes new content>
>> <dump of old lines><dump of new lines>
>> 1) How many bytes do line endings add to the length of the old or new
>> content? Is it okay to assume line endings are exactly one byte in
>> patches? I know this will hold in unix-land, but what about win32?
Please assume that line endings are exactly one byte, and make an
implementation that is correct under Unix. If there are any issues
with legacy platforms, we can always fix them before your work moves
from unstable to stable.
> hunk <file> <byte#> <line#> <#old bytes> <#old lines> <#new bytes> <#new
> lines>
> old:
> <the old data>
> new:
> <the new data>
I'd prefer a format that offers slightly more redundancy, just in case
something goes wrong with the line endings. I suggest
> hunk <file> <byte#> <line#> <#old bytes> <#old lines> <#new bytes> <#new
> lines>
> old:
> <the old data>
> new:
> <the new data>
> end.
Notice the string ``end.'' at the end, checking for which will catch
corruption in the new data.
Question: do we want to allow for arbitrary amounts of padding in
order to page-align the data? This might provide a slight performance
benefit when mmapping.
Juliusz
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel