Binary file support
Robey Pointer
robey at lag.net
Thu Oct 13 19:46:25 BST 2005
On 13 Oct 2005, at 11:13, Wouter van Heyst wrote:
> On Thu, Oct 13, 2005 at 10:10:28AM -0700, Robey Pointer wrote:
> <snip>
>
>>> diff's heuristic for 'binary' is reported to be 'contains NUL in the
>>> first 1k'. For text diffing, another useful test is 'contains
>>> VT-102
>>> control characters'.
>>>
>>
>> I think bzr should have a property on each file indicating whether it
>> is text or binary. Even if we end up weaving every filetype, it may
>> be useful info for other reasons (like not bothering to "diff" binary
>> files). EIBTI.
>>
>> But I think it's perfectly okay to guess the filetype when adding it,
>> as long as the user can change that type later. The heuristics above
>> sound likely to work in most cases.
>>
>
> That sounds suspiciously like svn guessing the mimetype on add. Is
> that
> to much for bzr?
What do they use the mimetype for? That sounds like overkill; I
can't imagine needing to know more than text-vs-binary.
My primary experience is with perforce & tla. I know perforce tracks
binary files and guesses their type when you add them. In my
experience so far, its guessing has been right 100% of the time.
robey
More information about the bazaar
mailing list