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: Richard Levitte - VMS Whacker
Subject: Re: [Monotone-devel] Re: Looking at the code affected in bug 9752 leaves a weird taste...
Date: Wed, 18 Aug 2004 12:49:11 +0200 (CEST)

In message <address@hidden> on Wed, 18 Aug 2004 11:07:28 +0100, Bruce Stephens 
<address@hidden> said:

monotone> Richard Levitte - VMS Whacker <address@hidden> writes:
monotone> 
monotone> [...]
monotone> 
monotone> > One way to solve this problem is not to bother with it at all, i.e.
monotone> > view all files as binary for internal representation.  It looks to
monotone> > me like this is already the case in parts of the code, for example
monotone> > in calculate_ident(), but I haven't look too thoroughly in that
monotone> > code, so I don't really know...  Anyhow, if we keep files in the
monotone> > database as binary blobs and only bother with line separators and
monotone> > character conversion for visual purposes (for example to display the
monotone> > diff between files), we're quite safe.
monotone> 
monotone> That seems cleanest to me: store files in some canonical
monotone> form, and then the indication of file type (what subversion
monotone> uses a MIME type for) is really an indication of how to
monotone> convert between that canonical form and something that's
monotone> useful on the client's platform.

What does "canonical form" mean to you?  My though was that monotone
would store the actual bytes of the file as read from the file system.
This will work for any byte- and stream-oriented file system.  If we
should ever think about record-oriented file systems, like the one
used on VMS, that's another level of portability (and worms).

monotone> However, if that's stored in the database rather than in a
monotone> hook (and I think it ought to be in the database),

Oh, it definitely should be stored in the database, since it's an
attribute of the file, not a matter of local interpretation (which
will get it wrong in all cases but one: the correct interpretation).

The question is, what should monotone do when a file is added?  It
could use "standard" things like the command 'file' and the MIME type
mapping file 'mailcap', when available, but other than that, how
should it behave?  Maybe there should be an option '--type' that can
take a MIME type?

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.

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         address@hidden
                                        http://richard.levitte.org/




reply via email to

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