(David emerges from the mist, after a time of being awfully sick...) On Sat, Apr 22, 2006 at 08:26:20PM +0100, Ian Lynagh wrote: > On Sat, Apr 22, 2006 at 10:15:07AM -0700, Jason Dagit wrote: > > > > 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> > > I don't know where in the list archives or bug trackers it is OTTOMH, > but what the new format should look like has been discussed before. > > I think it looked something like > > hunk <file> <byte#> <line#> <#old bytes> <#old lines> <#new bytes> <#new > lines> > old: > <the old data> > new: > <the new data>
I don't think we can have a byte# field in the hunk patch, as it'd make it impossible to commute with replace patches, since the replace patch will modify the byte# in a way that can't be computed using just the patches themselves. So I think we'll need to leave that optimization out for now. One could add it back in, if a replace patch stored the locations (perhaps both line# and byte#?) of all the matches it makes. But that's a seriously big change, and I don't think the improvement in speed of applying hunk patches will be worth the effort, at least at this stage. I think this is something I just didn't think of when you proposed this patch format before. -- David Roundy http://www.darcs.net _______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
