I found some time tonight to start implementing a different format for hunks. Very simple but meant to allow skipping over data.
hunk <filename> <line#> <#bytes of old content> <#bytes new content> <dump of old lines><dump of new lines> There are two problems that come up almost immediately with this format (I think). 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? 2) Currently when using darcs interactively (in darcs record for example) what you see on the screen is a dump of what goes into the patch file. So the direct result of my new patch format is that the patch goes from being easily readable by humans to a bunch of garbage all lumped together. I'm looking for suggestions on how we should solve these problems. I'd be happy to share what I have, but I warn you that the code is hackish at the moment because I'm just prototyping and trying to figure out what changes would really be needed to get this working. On the positive side, with my new format I only fail two of the test scripts and both of them assume a very specific hunk format. I also have not done any benchmarking to see if performance is better with the new format, but I think it will definitely lend itself to better performance. Thanks, Jason _______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
