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 18:47:20 UTC

[RFC] Configurable default "force" mode for 'svn diff' (was: External diff based on mime-type)

>> I found that this can be done with the svn command line tools. However,
>> --force must be used. Without --force, svn will see that the file has
>> svn:mime-type prop set to application/octet-stream and refuse to do
>> anything to a binary file.
> 
> I nearly suggested this earlier, but my testing failed because I didn't know
> about the --force override!  I think I'll file an issue against svnbook to
> point this out.  That is, if it's not there already and I've simply
> forgotten that fact in the time since I documented it.  :-)

For those that care:
https://code.google.com/p/svnbook/issues/detail?id=194

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."

Any opinions from the users@ readership on that idea?

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


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

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 04/19/2013 12:47 PM, C. Michael Pilato wrote:
>>> I found that this can be done with the svn command line tools. However,
>>> --force must be used. Without --force, svn will see that the file has
>>> svn:mime-type prop set to application/octet-stream and refuse to do
>>> anything to a binary file.
>>
>> I nearly suggested this earlier, but my testing failed because I didn't know
>> about the --force override!  I think I'll file an issue against svnbook to
>> point this out.  That is, if it's not there already and I've simply
>> forgotten that fact in the time since I documented it.  :-)
> 
> For those that care:
> https://code.google.com/p/svnbook/issues/detail?id=194
> 
> 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."
> 
> Any opinions from the users@ readership on that idea?

I got pretty much no feedback on this, but I liked the idea enough to
implement it anyway.  In r1478826, I introduced a new
'diff-ignore-content-type' runtime configuration option (which defaults to
'no').  Unless the feature is booed out of existence by the Subversion dev
community, it should appear in Subversion 1.9.

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


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

Posted by "C. Michael Pilato" <cm...@collab.net>.
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


RE: [RFC] Configurable default "force" mode for 'svn diff' (was: External diff based on mime-type)

Posted by "Watson, Paul" <pw...@phs.org>.
>>>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.
============================================
*-*-*- PRESBYTERIAN_HEALTHCARE_SERVICES_DISCLAIMER -*-*-*

This message originates from Presbyterian Healthcare Services or one of its affiliated organizations.
It contains information, which may be confidential or privileged, and is intended only for the
individual or entity named above. It is prohibited for anyone else to disclose, copy, distribute
or use the contents of this message. All personal messages express views solely of the sender, which are
not to be attributed to Presbyterian Healthcare Services or any of its affiliated organizations, and may not
be distributed without this disclaimer. If you received this message in error, please notify us immediately
at postmaster@phs.org. 

If you would like more information about Presbyterian Healthcare Services please visit our web site

http://www.phs.org

============================================