Greg Stein wrote:
>On Thu, Feb 07, 2002 at 09:06:51PM +0100, Marcus Comstedt wrote:
>
>>Ben Collins-Sussman <sussman@collab.net> writes:
>>
>>>We welcome anyone able to find a librarized implementation of
>>>diff/patch which is compatible with our BSD license. We also welcome
>>>anyone willing to write all that functionality from scratch. ;-)
>>>
>>Actually, "all that" may not be so much as it sounds. gpatch isn't
>>terribly large, and most of the code isn't needed for svn anyway
>>since we're only using the -f mode. If we need to replace diff as
>>well, then it becomes a little more code.
>>
>
>I've actually been thinking of a way to generate a context/unidiff straight
>from svndiff. I don't recall the original motivation :-), but once the code
>is available, then I'm sure that I'll remember :-)
>
>If the code only generated one type of diff (e.g. it didn't support all the
>switches/formats that "diff" has), then it might not be bad. Gathering
>context is relatively easy -- grab 1000 characters prior to <point> and scan
>
Yikes. It's not that easy. Vdelta is a compressor, so you'll typically
not have references to the source window, but (recursive) copes from the
target to deal with.
>it to assemble three lines (of context). If you don't have three lines, then
>grab another chunk. Same for the <end-point>. Those points are defined by
>the delta windows, and the change between start/end simply refers to some
>text from "somewhere" which gets inserted. etc etc.
>
Come to think of it, the core of the delta combiner is exactly that -- a
set of x-ray spectacles that see "through" the compression to the
original source context. Might be an oportunity for code reuse there.
Although it might seem a bit weird to create client-side context diffs
by first running a vdelta, then unpacking that again to get at the
context ...
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:05 2006