Kevin Grover wrote:
> Another, more robust solution could be to have an svn:plug-in property
> that would be set to 'text-diff', 'xml-diff', 'winword-diff'. Things
> like text-diff could be configured to standard diff (and XML-diff, if
> present by default, could be the same).
If you do this, then suddenly svn:mime-type becomes completely redundant
-- except for browsing pages straight from the repository, but that
would be better accomplished by hooking into Apache's mime-magic.
And this might not be such a bad thing.
So here's a proposal:
* Declare svn:mime-type's diff-hint semantics deprecated, to be
removed in svn-2.0.
* Introduce, e.g., svn:file-type that serves as a hint to diff;
offhand, there's text, binary, XML, archive (e.h., tar, zip, jar,
etc.).
* Define a reserved namespace for svn:file-type values such that
custom, application-specific types can be defined in a
future-proof way.
* Define a syntax for svn:file-type values so that, e.g., file
encodings or character sets can be embedded in them.
I envision something like:
standard value: svn:file-type = svn:text:utf-16-le
custom value: svn:file-type = vnd:msword-xml
The downside of this proposal is that it reinvents the wheel, since MIME
already supports all that.
The alternative would be to introduce full MIME content-type and
content-transfer-encoding semantics; however, that would require some
serious UI work to create simple shortcuts for the most often used
combination. I suspect users would be much happier if they could say, e.g.,
svn ps svn:file-type text:uft-8
rather than
svn ps svn:content-type "text/plain; charset=UTF-8"
svn ps svn:content-transfer-encoding binary
On the other hand, MIME is tailored for e-mail, not general text; hence,
for example, you can't use "Content-Transfer-Encoding: 8bit" for any
UTF-8 file, because that assumes CRLF line endings and sets an upper
bound to line length.
This whole fubar isn't all that trivial to solve. :)
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-17 14:44:02 CET