monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: the line-ending discussion


From: Glen Ditchfield
Subject: Re: [Monotone-devel] Re: the line-ending discussion
Date: Thu, 02 Feb 2006 21:48:21 -0600
User-agent: KMail/1.9.1

On Thursday 02 February 2006 18:48, Graydon Hoare wrote:
>    1. workspace file -> std::vector<std::string>
>    2. workspace file <- std::vector<std::string>
> ...
> Operations 1 and 2 are done by splitting or joining. The split and join
> operations are governed by the following rules:
>     - At first, monotone's default behavior will be to use the "native"
>       line-ending forms (only LF on unix, only CR on mac, only CRLF on
>       windows). If you are sharing your workspace between platforms on
>       NFS or SMB, you are out of luck. For now.

For operation 2, this is good.  For operation 1, would it be good to split in 
a platform-agnostic manner, provided that the file is internally consistent?
- If the file contains LFs but no CRs, split on LFs.
- If the file contains CRs but no LFs, split on CRs.
- If the file contains CRLFS but no single LFs or CRs, split on CRLF pairs
- Otherwise, split on native line-ends.

This would help with NFS/SMB mounts, and text-like files generated by 
cross-platform utilities, and with text file e-mail attachments, and with 
text files in tar/zip/sit archives, and with gzipped-XML file formats, and 
with ... well, anyone else have some examples?  




reply via email to

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