[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

internalized diff (was: Patch command execution)

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-02-07 23:51:23 CET

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
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.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.