You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2013/04/19 19:16:36 UTC

Re: [RFC] Configurable default "force" mode for 'svn diff'

On 04/19/2013 12:56 PM, Watson, Paul wrote:
>>>> You know, in light of the fact you can use the runtime
>>>> configuration to establish the constant use of an external diff
>>>> tool, it seems that it would be beneficial to have another
>>>> configuration knob that means "My external diff tool can handle
>>>> binary files, too, so please assume --force mode
>>>> thankyouverymuch."
>
> 
> Rather than a single diff tool, how about if a diff tool could be
> specified for each mime-type? A mime-type without a diff tool specified
> would use the default internal.

That's a sane request, and certainly not a unique one.

The unfortunate fact is that diff tools don't accept the same parameters, in
the same order, etc.  So to make this happen within Subversion you really
kinda need a diff-command template for each MIME type:

{{{

[diff]
application/msword = C:\Utils\WordDiffer.exe %(file1) %(file2)
*/xml = C:\Utils\XMLDiff.exe --file1=%(file1)  --file2=%(file2)
text/* = C:\Utils\GnuDiff.exe -a -u -L%(label1) -L%(label2) %(file1) %(file2)

}}}

Also complicating things is that Subversion currently expects that diff
tools honor a sort of interface specification in terms of returned error
codes.  Obviously we could try to loosen some of that stuff up, but we don't
want to building knowledge of individual diff tools into Subversion.  (We're
in the state we're in now because we did exactly that with GNU diff.)

So I still kinda think that the use of brokering script which *does*
understand the nuances of specific differencing tools is valuable.  It could
even be a 'tools' Python script that the Subversion community maintains and
which ships with Subversion.

Of course, none of this actually answers the question I asked and upon which
my RFC was based.  :-)

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development