On Fri, Aug 12, 2005 at 08:24:52AM -0400, David Roundy wrote:
> On Thu, Aug 11, 2005 at 05:49:35PM +0100, Ian Lynagh wrote:
> > On Thu, Aug 11, 2005 at 12:29:21PM -0400, David Roundy wrote:
> > > 
> > > Argh.  That's an annoying bug.  I've got a fix (which I'll send in soon)
> > > that fixes the problems that show up in the cabal repository,

Thanks.

> I've always assumed that the new format would use the same format
> internally as the old... I really don't want to have two different internal
> formats.  When we talked about the new patch format, I had actually
> pictured parsing it into the old internal format (although I now realize
> that that would be a bit silly--best to also store the "pre-unlinesed"
> version.

Also, one of the motivations (for me) for the new format is that it will
be easier to work with.

> The new format will still have the issue, which is that *between* lines we
> need to include newlines, but *after* the last line we don't want a
> newline.  So when applying, we need to behave differently, depending on
> whether our patch is modifying the end of the file.

I'm not sure what you mean here. In my mind, the new hunk

    newhunk 8 -3 +6
    old
    foo
    new
    wibble

(or equivalent) means "Go to the 8th byte. The next 3 bytes will be
"foo". Remove them. Insert the 6 bytes "wibble".

There are various details you can fiddle with, like whether we note how
many lines are added/removed, what the starting line number is etc
(which comes down to "is the extra complexity worth it for how important
it is for users") but I'd really like a format that is trivial to apply
and coalesce.


Thanks
Ian


_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to