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

Re: [Issue 422] Changed - "svn diff" needs to be fleshed out.

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-09-05 13:36:10 CEST

On Tue, Sep 04, 2001 at 02:28:50PM -0500, Ben Collins-Sussman wrote:
>...
> 1. svn diff foo.c
>
> This can be done entirely client-side, by comparing foo.c
> against the hidden pristine copy in SVN/text-base/. This is
> what we have now.

If we ever allow text-base to be punted, then we potentially have more work
to do here.

> 2. svn diff -r 5 -r 7 foo.c
>
> This is a diff best computed by the repository, since it has
> version 5 and 7 of this file at its instant disposal. To make
> this work, we need to:
>
> - make libsvn_repos call out to /usr/bin/diff
> - add new functionality to the "RA" layer definition in svn_ra.h.
> Specifically, a client needs a new vtable routine to request
> this diff, and the RA layer needs a generic way of
> schlepping plain text back to the client.

Oh, screw that. Big time. The server should never have to fork like that.
The only thing missing here is context within our svndiff. Once we have
that, then an svndiff can be transformed into a context diff or a unified
diff.

[ if anybody mentions the "foo" diff output format, I'll punch 'em ]

And note: passing plain text is cake. The real issue is the RA API;
marshalling that into a network request in no biggy.

> 3. svn diff -r 5 foo.c
>
> This means:
>
> - asking the RA layer for 5:foo.c's entire textual contents,
> so we can compare against our local foo.c. Similar to
> situation #2.

Not hard. We fetch files all the time.

> Again, this is not a nightmare to implement, but means expanding what
> our RA vtable can do -- easy to do in the ra_local case. But for
> ra_dav, it means coming up with new ways to marshall plaintext over
> DAV message bodies. Right now, I'd rather help gstein & others fix
> the *current* bugs in ra_dav, rather than adding new functionality
> there. :-)

Agreed :-)

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:36:40 2006

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