monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves


From: Jon Bright
Subject: Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste...
Date: Wed, 18 Aug 2004 13:14:45 +0200
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

Richard Levitte - VMS Whacker wrote:

If we're discussing MIME types, we're gonna get back to line end
conversion for text/* types, so I'm guessing that when you talk about
"canonical form", we're not just gonna store the file as it is.

Canonical form should almost certainly be LF-only for text files, but it doesn't really matter whether it's LF-only or CR+LF, so long as there *is* a canonical form in the DB.

I'd argue MIME types aren't useful in this context. We're only really interested in two types of file, text and binary. For text files, we're further interested in whether the text file wants the local line-ending convention when it's checked out or some fixed one. We're not interested if the type's application/msword or text/vnd.wap.wml. The latter example also illustrates another issue with using MIME types - fine, it's WML. WML doesn't specify a line-ending convention. OK, WML's XML and XML probably does have something to say about line ends. But do we really want/need a monotone-internal database telling us what line-end convention which MIME type takes? And do we want to rely on people actually obeying the RFCs when they're writing their WML? Wouldn't a --type=[text|text-alwayslf|text-alwayscrlf|binary] parameter be easier for all concerned?

(Does text/plain even imply a line-ending convention?)

When re-examining the file later (after checkout), I don't think we really care what line-ending it's got at that point - a line ending's a line ending's a line ending, as far as monotone's concerned, and they're all going to be canonicalised?

--
Jon Bright
Silicon Circus Ltd.
http://www.siliconcircus.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]