> >> [[[ > >> Do not display a binary property diff in the interactive conflict > >> resolver. > >> > >> * subversion/include/svn_io.h > >> (svn_stream_detect_binary_mimetype): New. Declare. > >> > >> * subversion/libsvn_subr/stream.c > >> (svn_stream_detect_binary_mimetype): Check if atleast 85 % of the > >> bytes fall within the ascii range of printable characters. > >> > >> * subversion/libsvn_wc/props.c > >> (maybe_generate_propconflict): Call ..binary_mimetype() on the > >> mergestream. Set the conflict description according to the outcome. > >> > >> * subversion/svn/conflict-callbacks.c > >> (svn_cl__conflict_handler): Print err msg if desc->is_binary when > >> invoking 'diff-full'. > >> > >> Patch by: Daniel Näslund <daniel{_AT_}longitudo.com> > >> ]]]
On Fri, Dec 04, 2009 at 11:42:06AM +1100, Gavin 'Beau' Baumanis wrote: > Ping. > This Patch submission has received no new comments. I'm giving up on this one for now. I wanted to detect whether some properties were binary or not using the mechanism in svn_io_detect_binary_mimetype() but that one is flawed and only checks if text is outside the printable ASCII range. Japanese text will be treated as binary! I'm hoping that something will come out of the discussion in [1] regarding how to classify files as binary or text. My own humble suggestion was to use libmagic. I think that somewhere within that the aboved mentioned thread someone said that libmagic has flaws too but I can't find it now. In the end, how often do we use binary properties? Not often at all is my guess? Daniel [1] http://svn.haxx.se/dev/archive-2009-11/index.shtml#536