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

Re: svn diff with binary files

From: Gary Feldman <g1list_1a_at_marsdome.com>
Date: 2004-11-21 14:01:20 CET

kfogel@collab.net wrote:
> Eric Seppanen <eds@reric.net> writes:
>> The problem is that the the part of Subversion that fetches the files
> would have to "know" that the diff was being computed by another part
> of Subversion, instead of by some external program that Subversion
> passes off to. (Because in the latter case, you *can* diff files that
> Subversion thinks are binary.) We could do this, but it would be
> tricky to do it without introducing a layering violation. In the
> interests of simplicity, we've unofficially decided not to.

Umm, isn't it the client's responsibility (where I'm using "client" to
mean the piece of code that controls the fetching and execution of the
diff) to interrogate the type of the file before fetching, to make sure
the type is appropriate? In other words, it's the piece of code that
knows that there are multiple types of diff that also needs to know that
each type of diff has different prerequisites (in the general case).

As I look at the new external diff command, it occurs to me that by
taking a totally agnostic view to --diff-cmd, it stops being a diff
command. One could, in theory, say things like "--diff-cmd lpr",
"--diff-cmd /bin/rm", or even (if one were really perverse) "--diff-cmd
'cvs' -x 'commit'". (Actually, the manual doesn't specify how the files
are passed to the diff program, so I'm not quite sure whether these work
as given or need to be munged.) The old school UNIX geek in me says
this is great; the new school O-O QA engineer in me says it's awful. A
compromise idea that pops into mind is to have "--diff-type
diff-type-name", where "diff-type-name" is defined inside of some
configuration file. This saves the user the trouble of remembering
where the diff executable is (e.g., windiff is in some weird place on my
system).

Just some early morning thoughts, before the caffeine kicks in....

Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Nov 21 14:03:38 2004

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

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