monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] line endings


From: Ethan Blanton
Subject: Re: [Monotone-devel] line endings
Date: Wed, 1 Feb 2006 22:41:39 -0500
User-agent: Mutt/1.4.1i

Howard Spindel spake unto us the following wisdom:
> It seems to me that to be completely general monotone needs a 
> per-file certificate specifying the permissible 
> transformations.  Examples of the settings available in that certificate:
> 
> 1.  Never transform anything
> 2.  Database file is LF line terminated, transform LFs to platform 
> specific in/out
> 3.  Database file is CR/LF line terminated, transform CR/LFs to 
> platform specific in/out
> 4.  Whatever additional combinations are possible (does monotone have 
> to worry about big-endian vs little-endian ever?)

I think rules like this are not necessarily an improvement.  It is
obvious that no one conversion rule solves everything -- it seems
clear to me that the only 100% Reversible and Safe method of storing
line endings would be to use, e.g., byte stuffing to ensure that there
are no bare internal-line-ending markers in any text files which were
not actually end-of-line markers in the platform on which the file was
created, which have been canonicalized.

With this condition, a correct definition of the end-of-line sequence
for the current platform, and a way to say "this file has no
end-of-line markers (is binary)", the problem is solved.  Without this
condition, there are a number of heuristics which can be used (and are
used in many systems) to approximate the correct behavior which work
in Most Cases.

Muddying the waters by arbitrarily complicating database
representation (e.g., allowing various end-of-line representations in
the database) does not seem profitable to me.

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
                -- Cesare Beccaria, "On Crimes and Punishments", 1764

Attachment: pgp4Tv24T6sjf.pgp
Description: PGP signature


reply via email to

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