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

Re: svn diff, svn merge, and vendor branches (long)

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-12-07 18:51:55 CET

On Sat, 2002-12-07 at 12:09, Philip Martin wrote:
> Eric Gillespie <epg@pretzelnet.org> writes:
>
> > > simple. Making it work the way you would prefer would involve more
> > > work, more special cases and more code. It would in fact be making
> > > svn diff "smart", the very crime of which you have accused it.
> >
> > What? Not at all. The current problem is svn is doing
> > something itself (i don't know what exactly). If it just handed
> > the two arguments to diff(1), the diff would come out meaningful.
>
> Currently 'svn diff' uses the same reporter/editor mechanism
> irrespective of whether the URLs are directories or files. It appears
> that you, and Greg Hudson, believe that diff should use a different
> algorithm for comparing files and directories. That sounds like
> increasing diff's "smartness", not reducing it.

Sometimes it can be hard to quantify how smart something is. In this
case, from a user perspective, "svn diff" appears to be being overly
clever; instead of comparing the two files directly, it is pretending
that the two files each live in a directory consisting of only one file,
and then comparing the directories with each other, which might result
in a diff between the file contents if the files share ancestry, or
might just result in a deletion and addition. From an implementation
perspective, "svn diff" might appear fairly dumb, since it's performing
a simple case of one reduction to another.

I wouldn't try to analyze this situation in terms of smartness or
dumbness; I would just say that the reduction of the file case to the
directory case is rather lossy, and (as you seem to have agreed, after
looking at the merge code) should be replaced with special handling.

(Reducing the file case to the directory case *does* make sense for
checkouts and updates and commits and statuses. Just not diffs.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 7 18:52:41 2002

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.