On Tue, Jun 29, 2004 at 12:11:17AM -0500, kfogel@tigris.org wrote:
> Author: kfogel
> Date: Tue Jun 29 00:11:17 2004
> New Revision: 10100
>
> Modified:
> trunk/subversion/libsvn_subr/validate.c
> Log:
> Resolve issue #1920: Treat XML mime types as text, not binary.
>
> Patch by Branko ??ibej. See the threads linked to from the issue.
> There was an alternate patch by Kalle Olavi Niemitalo <kon@iki.fi> in
> http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=66354,
> which is a little more robust because it deals with charset addenda to
> mime-types. There was also a general objection by Ben Reser, in
> http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=68882,
> where he points out that the whole approach is wrong, and that this
> should be configurable. I agree (as probably most developers would),
> but it's always been understood that svn_mime_type_is_binary() is
> basically a kluge to get the common cases right until such time as we
> have a better system. Incrementally improving what we have, based on
> user feedback, is still a good idea IMHO.
>
> * subversion/libsvn_subr/validate.c
> (svn_mime_type_is_binary): Return false if the mime-type ends in
> "+xml" or "/xml".
I'm not sure this is an "incremental improvement." As people pointed
out there are going to be cases where XML is diffable/mergeable and
times when it isn't. The more obvious cases shouldn't match the
patterns above, but that doesn't mean there aren't any. Since we can't
agree if XML is always diffable/mergeable, then we shouldn't make it the
default.
Plus if we make it a default now, then we're going to be less inclined
(maybe prohibited, due to compatability gurantees) from removing it.
That means the people that run into problems where this gross
overgeneralization doesn't apply, are going to have to configure their
clients with different options.
Now the inverse applies too, if we don't make xml default to being
mergeable/diffable then people who expect/want that behavior are going
to have to configure it. This makes the question, which is the safest
default.
Making XML mergeable is not a safe default. If the XML data contains
binary data that can't be merged, then it is possible to lose local
modifications. On this basis I also think this violates our
compatability guarantees.
Anyone that has a mimetype matching those patterns that contains binary
data might end up losing locally modified data as a result of this
change.
On this basis, I'm -1 on this commit.
Incidentally, we should permit "charset addenda." We happen to have it
in our own repo:
$ svn pg svn:mime-type COMMITTERS
text/plain; charset=UTF-8
For what it matters, I'm the one who set that and nobody has said a word
about it being there so far...
--
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 29 21:37:05 2004