Sjoerd Tieleman <Sjoerd.Tieleman@phil.uu.nl> writes:
> A quick search gives me some discussion from around July 2004:
> [ custom diff tools, a question is asked whether one can select a diff
> tool based on the svn:mime-type property ]
> Branko Čibej:
> Yes, of course. The "diff tool" could be a script that looks at the SVN
> file properties in the working copy (via "svn propget svn:mime-type,"
> for example). However, note that this would work when explicitly calling
> invoking "svn diff". It would _not_ magically make Subversion merge
> differences in binary files using your tool during "svn update", because
> Subversion's notion of when a file is binary is hard-coded, and if it
> thinks a file is binary, it won't invoke diff3 to do the merge.
> So, this is kind of a bummer, because as I understand, Subversion sees
> everything not marked as "text/*" as a binary file, and as such diff
> tools are not called. So, this means that even if you specify in your
> Subversion config file that your "special diff script" should always be
> used, you are still left out in the cold for files with other types
> (such as "application/xml"). So, for Subversion to be able to do this,
> the hard-coded notion of not *ever* performing a diff/merge when we have
> something other than "text/*" should have to be replaced with something
> more elegent (which could be turned off by default and only turned on
> by adding something to your config file, at the users discretion), but
> which allows "experienced" users to perform diffs/merges on anything
> other than text types.
Yes, absolutely, this is a real problem.
There was a huge discussion here recently about the right way to fix
this, but after crawling around the archives for twenty minutes, I
still can't find it :-(. I must be searching on the wrong keywords;
does anyone remember the thread?
I have some notes here from a discussion C. Michael Pilato and I had
about this a while go, in which we came to a complicated (but IIRC
sensible) conclusion about how to solve it. I don't know whether our
conclusions matched those in the recent thread, unfortunately, because
I didn't follow the thread closely, and Mike's and my notes are over
in the office and I'm working from home today.
I'll try to get those notes when I next go in to the office, and post
them here, so they don't languish.
Meanwhile, if you have time, you could perform a valuable service by
a) filing this as an issue (we don't seem to have one)
b) tracking down those mail threads and linking to them from the issue
I think there was some reason why the obvious solution (always invoke
the external diff or diff3 program if the user named one, regardless
of the target's mime-type) had some problematic edge cases. I can't
remember what those edge cases were though, and I might be totally
wrong about their existence, so if you want to throw that solution
into the issue as at least a first-draft proposal, that's fine.
Thanks for following up,
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Mon Nov 21 18:55:30 2005