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

Re: `svn diff' progress

From: Colin Putney <cputney_at_whistler.com>
Date: 2001-12-19 03:05:13 CET

On Tuesday, December 18, 2001, at 03:31 PM, Greg Stein wrote:

> On Tue, Dec 18, 2001 at 06:10:27PM -0500, Mark Benedetto King wrote:
>> ...
>> Why not just have the diff crawler download both revisions, diff them,
>> and delete them? Am I missing something?
>
> Crawl over what? I maintain that diff between two revs can't refer to
> the
> working copy.

I'm a little confused about this as well. There are a few separate cases
here. Assume that foo.c is a versioned file in the current directory,
which is part of a working copy. I also assume that a diff is a straight
comparison between two files - no three-way diffs, or comparisons
between a diff and a file.

1) Comparing a file or directory in the working copy with a URL.

The working copy has to be crawled to find out which files need to be
compared with some revision of that file in the repository. Examples:

svn diff -r REV foo.c
svn diff http://host/respos/dir/foo.c foo.c

2) Comparing a URL with a URL.

In this case, the working copy should not be involved, since both files
are remote. But the diff still has to happen in the client (to support
plugable diff and merge tools, and to keep the processing load off the
server) so each pair of files would have to be downloaded to a temporary
work area before diffing. Examples:

svn diff -r REV1 http://host/repos/dir/foo.c -r REV2
http://host/repos/dir2/foo.c
svn diff -r REV1:REV2 http://host/repos/dir/foo.c

3) Comparing different revisions of a file or directory in the working
copy.

This case is a bit tricky. The working copy doesn't supply content for
diffing, but it *does* need to be examined to determine what files in
the repository need to be compared. In the case of comparing
directories, the tree below that directory in the working copy would
have to be crawled. Examples:

svn diff -r REV1:REV2 foo.c
svn diff http://host/respos/branch/dir/ -r REV dir

I'm not familar enough with the code to suggest an approach, but it
would have to handle all three of these cases.

Cheers,

Colin

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