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

Re: Textual binaries

From: Marcus Sundman <sundman_at_iki.fi>
Date: 2004-07-30 22:26:23 CEST

> > > > Any way to convince Subversion that this particular type is
> > > > actually text and let me diff it? Or is this an RFE?
> > >
> > > Subversion has an internal list of mime-types that it thinks are
> > > textual: text/*, and a few others. Otherwise it assumes that any
> > > other mime-type is binary, and un-diffable.
> >
> > That's just stupid. There is no thing as "text vs. binary"! All files
> > are binary. There isn't such a thing as "plain text". A "text file" is
> > a binary file in some particular encoding.
>
> In terms of storing bytes in the repository, you're correct. The
> repository makes no distinction between text and binary files. It
> stores and compresses all files as 'blobs of bytes'.

*I* would probably not do it that way, but the point is that there is no
general "text vs. binary" distinction. There is rather a distinction
between *each* type of file, and whether the encoding is part of the
semantics of the file or not (i.e. whether or not it may be transcoded).

> But the svn client has the job of doing line-based contextual diffs.
> This cannot be done on anything but a line-based "text" file.

OK. So the client is able to do this for a text file according to the value
of the "charset" attribute of its mime-type, right? Or how else will it
know which byte/bit sequence constitutes a line break? A per-character diff
would be even more difficult to write, since then you would have to
recognize any character in a file, not just line breaks.
(Of course a transcoding plugin system would make this easier, as well as
fix some other problems.)

> > Why on earth don't you add support for mapping each mime-type to some
> > kind of plugin that knows how to diff/merge/annotate that particular
> > type of files?
>
> That's our long-term plan.

Great! Maybe I should join the dev list when the time comes. Any idea about
the time scale until the shift of focus to these issues?

- Marcus Sundman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 30 22:23:30 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.