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 08:34:04 +0200
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

Hi,

graydon hoare wrote:

however, that was a conservative consensus, and it has clearly failed
in practise. so let's work out what it ought to do, not worry too much
about what the current (wrong) code does.

My personal opinion (doubtless shared by 100% of other people :-) is:

1. monotone should default to storing LF-terminated lines in the DB (having a canonical representation in the DB seems to me to be a must).

2. On Windows/DOS/similar, files should by default be checked out with CR+LF. I really dislike this idea (I'd prefer LFs everywhere), but a fair number of Windows tools deal poorly / not at all with LF-only.

3. On other OSes, the unchanged form is checked out.

4. The DB also keeps a mode, which can have one of four characters:

a) Default.  Behaviour as in 1,2,3 above.
b) Always CR+LF. Checked-out versions are thereafter always CR+LF. Whether this should store CR+LF in the DB or not, I don't know. I think it probably shouldn't alter the canonical form - hence LFs in the DB.
c) Always LF.  Checked-out versions are thereafter always LF-only.
d) Binary. Don't touch this file. Don't attempt to convert it to a canonical form on the way into the DB, don't attempt to convert it to a platform-based form on the way out.

If this were a char(1) column in the DB, people could add their own customised behaviours via an LUA hook. Values 'A'-'Z' reserved for Monotone's use, other values free for people's private extensions?

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




reply via email to

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