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

Re: proposal: diff preview for gui client

From: Martin Hauner <martin.hauner_at_gmx.net>
Date: 2005-06-18 17:26:02 CEST

Ben Collins-Sussman wrote:
>
> On Jun 12, 2005, at 2:23 AM, Martin Hauner wrote:
>
>> Philip Martin wrote:
>>
>>
>>> [diff preview]
>>> In the short term I suppose a new svn_wc_diff_callbacks2_t will
>>> do, in the long term we might need a new RA function that tells us
>>> which things have changed without sending the details of the changes,
>>> i.e. no text-deltas (and maybe no property changes either).
>>>
>
> IIUC, 'svn merge' is now doing exactly this in svn 1.2.
> [..]
> So in svn 1.2, cmpilato changed 'svn merge' to request one of our old-
> fashioned tree-delta reports, one which we used to call a "skelta".
> It's a tree-delta without any text-deltas, just a description of which
> files need to be fetched. 'svn merge' now quickly sucks the whole
> skelta into a tmpfile, then parses the skelta slowly, doing
> svn_ra_get_file()'s as needed.
>
> So it sounds like we don't need a new RA function here at all, do we?
> 'svn merge' is already doing this very thing, so it must be already
> possible.

Yes, it can be done without a new ra function.

I created a new api function svn_client_diff_preview with a callback
function svn_diff_preview_func_t. It uses a simple svn_delta_editor_t
implementation as input to svn_ra_do_diff. So no new ra function.
The delta editor creates svn_diff_preview_t structures with the
requested information and then calls the callback with the created
info structure when close_file or close_directory gets called.

It is still unfinished, it only does repos/repos preview and it doesn't
handle properties so far. Since i started with copying the diff code
(there is a lot of necessary preparation) there is also some work to
extract the common code between diff and diff_preview.

Apart from that it already works quite nice from subcommander :-)

If anyone is interested i can post an unfinished patch for review.

-- 
Martin
Subcommander, http://subcommander.tigris.org
a cross platform Win32/Unix/MacOSX subversion gui client & diff/merge tool.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 18 17:25:57 2005

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.