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

Re: Subversion conflict resolution

From: Sjoerd Tieleman <Sjoerd.Tieleman_at_phil.uu.nl>
Date: 2005-11-22 15:38:05 CET

On Nov 22, 2005, at 3:08 PM, Julian Foad wrote:

> kfogel@collab.net wrote:
>> 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.
>> 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?
> These are about calling generic "diff" programs but not about doing
> so on non-text files:
> 2003-06-28 "help setting up Visual Diff"
> 2003-08-08 "Using an external diff program with Subversion"
> This is about calling an external diff3 for non-text files:
> 2005-07-11 "--diff3-cmd for binary files"
> These just discuss the status quo (no solutions):
> 2004-02-26 "visual diff"
> 2004-10-03 "--diff-cmd arguments"
> These proposed to add a separate config option for the diff arguments:
> 2003-06-30 "[PATCH] allow for default diff -x opts in config file"
> 2005-08-11 "[PATCH] add diff-cmd-args option to [helper] section."

This one is also related:

2004-7-30 "Textual binaries"

So I guess the correct thing to do would be to allow Subversion to
have this internal list of MIME-types which it thinks is textual, but
to allow this to be overridden by the user. Perhaps the notion of
"textual" is a bit misleading, it could be rephrased. So, one might
say the Subversion has an internal list of file types that are
diffable in the traditional diff/patch way and allow the user to set
the "svn:mime-type" property on special files and allow him in his
config file to set diff/merge-tools for certain mime-types (perhaps
even the Subversion internal diff, so you can give your file the
correct MIME-type, but also have Subversion deal with it).
Karl, did you find those notes you mentioned earlier?

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 22 15:39:17 2005

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